Commit graph

58 commits

Author SHA1 Message Date
Eugen Rochko f5bf5ebb82 Replace sprockets/browserify with Webpack (#2617)
* Replace browserify with webpack

* Add react-intl-translations-manager

* Do not minify in development, add offline-plugin for ServiceWorker background cache updates

* Adjust tests and dependencies

* Fix production deployments

* Fix tests

* More optimizations

* Improve travis cache for npm stuff

* Re-run travis

* Add back support for custom.scss as before

* Remove offline-plugin and babili

* Fix issue with Immutable.List().unshift(...values) not working as expected

* Make travis load schema instead of running all migrations in sequence

* Fix missing React import in WarningContainer. Optimize rendering performance by using ImmutablePureComponent instead of
React.PureComponent. ImmutablePureComponent uses Immutable.is() to compare props. Replace dynamic callback bindings in
<UI />

* Add react definitions to places that use JSX

* Add Procfile.dev for running rails, webpack and streaming API at the same time
2017-05-03 02:04:16 +02:00
Yamagishi Kazutoshi 46943b64c6 Reset textarea height when press submit key (#2681)
* Reset textarea height when press submit key

* dry

* DON'T NEED props
2017-05-02 20:08:21 +02:00
Tomohiro Suwa 416c9675fc Don't toot request with only blank characters (#2154)
* Don't toot request with only blank characters

* Enable toot button if no text
2017-04-26 15:18:09 +02:00
Eugen 501514960a Followers-only post federation (#2111)
* Make private toots get PuSHed to subscription URLs that belong to domains where you have approved followers

* Authorized followers controller, stub for bulk action

* Soft block in the background

* Add simple test for new controller

* Rename Settings::FollowersController to Settings::FollowerDomainsController, paginate results,
rename "private" post setting to "followers-only", fix pagination style, improve post privacy
preferences style, improve warning style

* Extract compose form warnings into own container, show warning when posting to followers-only with unlocked account
2017-04-24 00:38:37 +02:00
Stephen Burgess 995f0ad51c feat(cw-button): Add aria controls to CW trigger (#2303)
Add an ID to the CW spoiler input field to give aria-controls a handle on it. Pass that id to the CW trigger button. Modify text icon button component to accept aria controls id value. Add aria-expanded value to text icon button to indicate when it is expanded.
2017-04-23 20:33:44 +02:00
Stephen Burgess cca41ea544 Replace inline styles with CSS classes (BEM) (#2338)
* fix(classnames): Status icon style classnames

Take out inline css and put into classnames for the following components: account, avatar, icon button, status action bar, notification.

* fix(status): Move styles from inline to classes for statuses

Move styles to classnames in components.scss for the following components:

display name
media gallery
status
status content
video player

* fix(classnames): Add classnames to rest of components

Take out inline styles and apply them to classnames in the sass for the following components:

button
column back button
slim column back button
collapsable column
dropdown menu
loading indicator
status list

* fix(classnames): Remove all non-dynamic inline styles

Components affected:

autosuggested
permalink
action bar
header
character counter
compose form
emoji dropdown
privacy dropdown
reply indicator
upload form
account auth
followers
getting started
column settings
mutes
settings
reblogs
status checkbox
report
action bar
status
card
boost modal
media modal
video modal

* fix(permalink): Do not lose classname

* fix(tests): Add space back in display name

* fix(status__wrapper): Remove duplicate css name

Remove incorrect style attribute. Remove style attribute all together. Cursor defaults to "auto" when not specified as 'default'.

* fix(nl): do not lose translations
2017-04-23 04:26:55 +02:00
Yamagishi Kazutoshi 1948f9e767 Remove deprecated features at React v15.5 (#1905)
* Remove deprecated features at React v15.5

- [x] React.PropTypes
- [x] react-addons-pure-render-mixin
- [x] react-addons-test-utils

* Uncommented out & Add browserify_rails options

* re-add react-addons-shallow

* Fix syntax error from resolve conflicts

* follow up 59a77923b3
2017-04-21 20:05:35 +02:00
Andrey Blinov 972f6bc861 Fix Textarea height should be reset upon sending toot #2189 (#2236) 2017-04-20 23:53:54 +02:00
Tomohiro Suwa 7832425fdd Fix css for toot button when uploading images (#2161) 2017-04-19 19:21:23 +02:00
Tomohiro Suwa f23281e31e Disable toot button when above 500 characters (#2088)
* Disable toot button when above 500 characters

* Consider multibyte characters

* Consider spoiler_text
2017-04-18 19:35:55 +02:00
Koala Yeung 08059ddda9 jslint: fix jslint warnings (#1704)
* jslint: remove trailing space

* jslint: fix no-nested-ternary issue

Follow the jslint [no-nested-ternary](http://eslint.org/docs/rules/no-nested-ternary)
rule. Rewritten ternary with if-then.
2017-04-15 02:57:26 +02:00
Koala Yeung faefd8ec8f Update javascript English translation files and some defaultValue (#1676)
* Reorder javascript English locale file

 * Reorder translation string in order of the locale key.

* Add javascript English locale missing language keys

 * Search all javascript language keys by command:
   `grep -REho '<FormattedMessage .*\/>' ./app/assets/javascripts/.`

 * Add all the missing language keys and their values to `en.jsx`.

* Add javascript English locale missing language keys (2)

* Find all `defineMessages` calls with this command:
  `grep -Rl 'defineMessages({.*' ./app/assets/javascripts/.`

* Open all these files. Find the language key (`id`) in these
  statements.

* Add all the missing language keys and their values to `en.jsx`.

* Remove javascript English locale obsoleted language keys

 * Find all language keys that no longer exists in the source code
  and remove them. The removed keys include:

    * "compose_form.private"
    * "compose_form.unlisted"
    * "getting_started.about_addressing"
    * "getting_started.about_shortcuts"
    * "notification.mention"
    * "search.account"
    * "search.hashtag"
    * "tabs_bar.mentions"
    * "tabs_bar.public"

* Javascript English locale file add note

 * Add notes to contributors about the English translation files.
   Hope that will make translation process smoother.

* Update javascript locale defaultValue in code

 * Update the defaultValue in code according to the relevant
   translation in English locale file.
2017-04-13 12:57:41 +02:00
Jessica Stokes 8a6096a3de Allow typing a toot while an image uploads (#1429)
This patch stops disabling the toot text field when an image is uploading. Instead, you can type to your heart's content and when the image uploads it'll append the image URL, and restore the position of your cursor to wherever it was in the toot text just prior. Effectively, the image URL is appended to the toot, and typing is not interrupted at all! 
2017-04-10 21:30:58 +02:00
Eugen Rochko 6ec6fe259a Compose form layout fixes 2017-03-26 13:08:15 +02:00
Eugen Rochko 1fd88e3bad Fix up visual indicators for compose form privacy 2017-03-25 20:24:30 +01:00
Eugen Rochko d8c5a83827 Redesigned compose form 2017-03-25 19:14:12 +01:00
Eugen Rochko d7c6c6dbe1 Fancier drag & drop indicator, emoji icon for emoji, upload progress (fix #295) 2017-03-24 03:55:45 +01:00
Eugen Rochko 89fc2d7f48 Fix #372 - Emoji picker 2017-03-02 00:57:55 +01:00
Eugen Rochko 95ebfa5610 Simplify passing of prop 2017-03-01 13:57:30 +01:00
Kibigo 91c79f2445 Better smart/dumb component separation 2017-03-01 02:56:15 -08:00
Eugen Rochko 2c50687279 Improve compose form performance, upgrade JS dependencies. LightingBox
now allows to cycle through multiple images
2017-02-26 01:23:44 +01:00
Eugen Rochko 974d712fbe Improve performance of compose form 2017-02-22 15:43:07 +01:00
Eugen Rochko e8ea9669c9 Fix links and wording 2017-02-19 22:42:38 +01:00
Eugen Rochko ec521e6bfc Add remote mentions warning when composing a private status 2017-02-13 18:38:00 +01:00
Eugen Rochko 2ab7bd13e2 Merge branch 'patch-5' of https://github.com/yiskah/mastodon into yiskah-patch-5 2017-02-13 17:22:40 +01:00
Eugen Rochko 677e95031e Clean up collapsible components 2017-02-13 17:20:18 +01:00
shel 968fae2603 Add privacy disclaimer
I haven't had a chance to test this, because I don't currently have a fully functioning computer I can set up a dev-environment on, but this *should* make it so when a user toggles a post to be private, a disclaimer appears clarifying what "private" really means.
2017-02-11 17:42:19 -05:00
Eugen Rochko c424df5192 Progress on moving color styles to Sass 2017-02-09 01:20:09 +01:00
Eugen Rochko 347a153b3d Add API modifiers to limit returned toots from public/hashtag timelines
to only those from local users; Add link to "extended information" to
getting started in the UI; Add defaults for posting privacy; Change
how publish button looks depending on posting privacy chosen
2017-02-06 23:16:20 +01:00
hoodie ac3f5a8316 easier comprehension of toot settings and properties (#595)
sounds complex, but really it just reorganizes the posting options and
adds a seperator line
2017-02-03 15:54:23 +01:00
Zachary Spector 237cb41ab4 Less ambiguous sensitive content toggle label (#556) 2017-01-27 19:31:14 +01:00
Eugen Rochko 999cde94a6 Instead of using spoiler boolean and spoiler_text, simply check for non-blank spoiler_text
Federate spoiler_text using warning attribute on <content /> instead of a <category term="spoiler" />
Clean up schema file from accidental development migrations
2017-01-25 01:29:16 +01:00
blackle bf0f6eb62d Implement a click-to-view spoiler system 2017-01-23 21:07:40 -05:00
blackle 889709a2a6 Show 'do not display in public timeline' when replying to self 2017-01-16 10:26:44 -05:00
Eugen Rochko 926459fc0a Fix typo introduced in #470 which made unlisted toggle only fade in/out and not also collapse 2017-01-15 14:59:25 +01:00
Effy Elden 32d756fb22 Hide 'Do not display on public timeline' for reply toots. Fixes #412. 2017-01-15 06:10:23 +11:00
Eugen Rochko 00b9ba64c9 Fixed unexpected error 2017-01-05 14:23:59 +01:00
Eugen Rochko a1de2e332d Fix compose form bug 2017-01-05 14:18:38 +01:00
Eugen Rochko ca7dce4a5a Fix selection resetting in compose form after unrelated data updates 2017-01-05 14:11:18 +01:00
Misty De Meo c100b83b98 Automatically position cursor when writing a reply toot 2017-01-04 20:04:14 -08:00
Jessica Stokes 1da73ecade
Fix Command-enter tooting
metaKey is only set correctly on keyDown, not keyUp, so this swaps to using that
2017-01-04 18:29:43 -08:00
Mitchell Hentges 4d300e2507 On file-drag, show a border around textarea 2017-01-03 00:43:45 -08:00
Eugen Rochko 2146ac91a0 Follow requests send e-mail notifications, but are excluded from notifications API
Better initial state for unlisted/nsfw toggles
2016-12-26 21:52:03 +01:00
Eugen Rochko 0bc6da89d2 Hide unlisted toggle when private is active, hide nsfw toggle when no files added 2016-12-24 01:28:10 +01:00
Anthony Bellew 538d109a82 Re-add unlisted toggle to the UI 2016-12-24 01:28:02 +01:00
Eugen Rochko de9b6e3a6a Compose form in the UI now has public/private toggle instead of public/unlisted 2016-12-23 00:38:16 +01:00
Eugen Rochko 4df38516e6 Fix key up listener on compose form 2016-12-14 18:38:28 +01:00
Eugen Rochko b27066e154 Re-implemented autosuggestions component for the compose form
Fix #205, fix #156, fix #124
2016-12-14 18:21:31 +01:00
Eugen Rochko 6e7e97c849 Fix metaKey usage 2016-12-11 23:54:32 +01:00
Eugen Rochko 73c142fb94 Fix #167 - Enable cmd+enter on Mac to submit form 2016-12-11 23:39:25 +01:00