Commit Graph

109 Commits

Author SHA1 Message Date
Surinna Curtis 35fbdc36f9 Merge tootsuite/master at 3023725936 2017-11-16 01:21:16 -06:00
Nolan Lawson 60f962eedc Refactor initial state: auto_play_gif (#5576) 2017-11-01 06:58:07 +09:00
Nolan Lawson b254e6ca5f Refactor initial state: "me" (#5563)
* Refactor initial state: "me"

* remove "me" from reducers/meta.js
2017-10-31 11:27:48 +09:00
Ondřej Hruška 516eeeb43d option to add title to <Button>, use for toot buttons (#197) 2017-10-24 19:08:07 +02:00
David Yip 4f01e6e8d5 Merge remote-tracking branch 'origin/master' into gs-master 2017-10-22 22:57:41 -05:00
Ondřej Hruška d589dd7cd0 Compose buttons bar redesign + generalize dropdown (#194)
* Generalize compose dropdown for re-use

* wip stuffs

* new tootbox look and removed old doodle button files

* use the house icon for ...
2017-10-21 20:24:53 +02:00
Nolan Lawson 8392ddbf87 Remove unnecessary translateZ(0) when doing scale() (#5473) 2017-10-19 18:27:55 +02:00
Ondřej Hruška eb907a5bab
formatting fix for eslint 2017-10-18 23:44:06 +02:00
David Yip 39c9cdf7fe Remove unused filesAttached property. 2017-10-18 13:20:45 -05:00
Ondřej Hruška 4421f6598f
Fix dual toot button wrong behavior after compose re-design 2017-10-16 23:32:13 +02:00
David Yip 313ba202ef Merge pull request #182 from glitch-soc/wide-tootbox-panel
Full-width tootbox panel to make room for buttons
2017-10-16 15:49:22 -05:00
Ondřej Hruška 26f08f0791
double-decker tootbox 2017-10-16 22:10:14 +02:00
David Yip dbb1fce94d Merge remote-tracking branch 'upstream/master' into gs-master 2017-10-16 09:23:59 -05:00
Nolan Lawson fa0be3f834 Add option to reduce motion (#5393)
* Add option to reduce motion

* Use HOC to wrap all Motion calls

* fix case-sensitive issue

* Avoid updating too frequently

* Get rid of unnecessary change to _simple_status.html.haml
2017-10-16 09:36:15 +02:00
Ondřej Hruška 33e806217f
Initial doodle support 2017-10-13 18:07:01 +02:00
kibigo! 8d6b9ba494 Merge upstream 2.0ish #165 2017-10-11 10:43:10 -07:00
Eugen Rochko 488584bfc1 Track frequently used emojis in web UI (#5275)
* Track frequently used emojis in web UI

* Persist emoji usage, but debounce commits to the settings API

* Fix #5144 - Add tooltips to picker

* Display only 2 lines of frequently used emojis
2017-10-08 21:47:15 +02:00
Nolan Lawson 7de6d269d2 Use ES module build of react-router-dom (#5264) 2017-10-08 02:55:58 +02:00
Eugen Rochko d2dee6ea43 Fix custom emoji in emoji picker, persist skin tone (#5258) 2017-10-07 19:02:30 +02:00
Eugen Rochko 45682f876d Make auto-play GIFs preference affect custom emojis in web UI (#5254) 2017-10-07 02:38:52 +02:00
Nolan Lawson 97b3d0cd56 Import only Spring/Motion from react-motion (#5236) 2017-10-06 03:46:15 +02:00
Nolan Lawson fd7f0732fe Compress and combine emoji data (#5229) 2017-10-06 03:42:34 +02:00
Nolan Lawson 2aca22b8ea import only Overlay from react-overlays (#5235) 2017-10-06 03:24:33 +02:00
Eugen Rochko 7db0f8dcb2 Implement hotkeys for web UI (#5164)
* Fix #2102 - Implement hotkeys

Hotkeys on status list:

- r to reply
- m to mention author
- f to favourite
- b to boost
- enter to open status
- p to open author's profile
- up or k to move up in the list
- down or j to move down in the list
- 1-9 to focus a status in one of the columns
- n to focus the compose textarea
- alt+n to start a brand new toot
- backspace to navigate back

* Add navigational hotkeys

The key g followed by:

- s: start
- h: home
- n: notifications
- l: local timeline
- t: federated timeline
- f: favourites
- u: own profile
- p: pinned toots
- b: blocked users
- m: muted users

* Add hotkey for focusing search, make escape un-focus compose/search

* Fix focusing notifications column, fix hotkeys in compose textarea
2017-10-06 01:07:59 +02:00
Eugen Rochko 5e5f36c216 Fix #5079, fix #5186 - Emoji picker fixes (#5187) 2017-10-03 01:56:50 +02:00
Eugen Rochko 4453c9a9f5 Search popout (#5170) 2017-10-02 18:24:05 +02:00
Nolan Lawson b9c612b561 Code-split emoji-mart picker and data (#5175) 2017-10-02 07:22:24 +02:00
Eugen Rochko cdad7977fc Improve privacy dropdown, remove react-simple-dropdown dependency (#5140)
* Improve privacy dropdown, remove react-simple-dropdown dependency

* Animate privacy warning

* Fix react-router-scroll
2017-10-01 12:20:00 +02:00
Eugen Rochko d6fe0954e3 Make emoji autosuggestions immediate, usernames appear sooner (#5149)
* Do not debounce emoji search

* Make autosuggestions appear sooner
2017-09-30 05:11:44 +02:00
Eugen Rochko 887cd94e96 Increase attachment descriptions to 420 characters (#5139)
Blaze it
2017-09-29 02:30:00 +02:00
Eugen Rochko 4ec1771165 Add ability to specify alternative text for media attachments (#5123)
* Fix #117 - Add ability to specify alternative text for media attachments

- POST /api/v1/media accepts `description` straight away
- PUT /api/v1/media/:id to update `description` (only for unattached ones)
- Serialized as `name` of Document object in ActivityPub
- Uploads form adjusted for better performance and description input

* Add tests

* Change undo button blend mode to difference
2017-09-28 15:31:31 +02:00
Ondřej Hruška 83bda6c1a8
Merge commit 'b9f59ebcc68e9da0a7158741a1a2ef3564e1321e' into merging-upstream 2017-09-28 09:18:35 +02:00
Ondřej Hruška 8a24ad5828
Revert "Merge pull request #149 from glitch-soc/mojon-suggest"
This reverts commit fa3587645d, reversing
changes made to 15c9c2fd7e.
2017-09-28 08:55:53 +02:00
Eugen Rochko 5b8d0ad71b Dropdown triangles a bit nicer, smoother scrolling on touch (#5062) 2017-09-24 00:40:10 +02:00
Ondřej Hruška 210e6776fc
Fix intl warning with disabled secondary toot btn
- Moved building the secondary btn text into the if to avoid trying to translate 'none' visibility
2017-09-23 23:41:25 +02:00
Ondřej Hruška 1924a71b5a
Make secondary toot button work nicer with file attachments & revert to the original behavior if it's disabled 2017-09-23 23:38:24 +02:00
Ondřej Hruška 67f8277526 Add secondary toot button (opt-in) (#153)
Add secondary toot button + other toot button enhancements. 
Squashing so it's easy to revert if needed.
2017-09-23 23:11:02 +02:00
Eugen Rochko 1e02ba111a Add emoji autosuggest (#5053)
* Add emoji autosuggest

Some credit goes to glitch-soc/mastodon#149

* Remove server-side shortcode->unicode conversion

* Insert shortcode when suggestion is custom emoji

* Remove remnant of server-side emojis

* Update style of autosuggestions

* Fix wrong emoji filenames generated in autosuggest item

* Do not lazy load emoji picker, as that no longer works

* Fix custom emoji autosuggest

* Fix multiple "Custom" categories getting added to emoji index, only add once
2017-09-23 14:47:32 +02:00
Eugen Rochko 66126f3021 Add custom emojis to the emoji picker (#5052) 2017-09-23 05:40:28 +02:00
Eugen Rochko 846cd4e838 Switch from EmojiOne to Twemoji, different emoji picker (#5046)
* Switch from EmojiOne to Twemoji, different emoji picker

* Make emoji-mart use a local spritesheet

* Fix emojify test

* yarn manage:translations
2017-09-23 01:41:00 +02:00
Nolan Lawson 0df6442636 Use passive listener in privacy_dropdown.js (#5037) 2017-09-22 04:59:01 +02:00
Ondřej Hruška a3760b7729 TURBO shortcode search 2017-09-20 21:57:33 +02:00
Ondřej Hruška 3783062450 Emoji and Hashtag autocomplete 2017-09-20 20:21:09 +02:00
aschmitz 669fe9ee06 Change IDs to strings rather than numbers in API JSON output (#5019)
* Fix JavaScript interface with long IDs

Somewhat predictably, the JS interface handled IDs as numbers, which in
JS are IEEE double-precision floats. This loses some precision when
working with numbers as large as those generated by the new ID scheme,
so we instead handle them here as strings. This is relatively simple,
and doesn't appear to have caused any problems, but should definitely
be tested more thoroughly than the built-in tests. Several days of use
appear to support this working properly.

BREAKING CHANGE:

The major(!) change here is that IDs are now returned as strings by the
REST endpoints, rather than as integers. In practice, relatively few
changes were required to make the existing JS UI work with this change,
but it will likely hit API clients pretty hard: it's an entirely
different type to consume. (The one API client I tested, Tusky, handles
this with no problems, however.)

Twitter ran into this issue when introducing Snowflake IDs, and decided
to instead introduce an `id_str` field in JSON responses. I have opted
to *not* do that, and instead force all IDs to 64-bit integers
represented by strings in one go. (I believe Twitter exacerbated their
problem by rolling out the changes three times: once for statuses, once
for DMs, and once for user IDs, as well as by leaving an integer ID
value in JSON. As they said, "If you’re using the `id` field with JSON
in a Javascript-related language, there is a very high likelihood that
the integers will be silently munged by Javascript interpreters. In most
cases, this will result in behavior such as being unable to load or
delete a specific direct message, because the ID you're sending to the
API is different than the actual identifier associated with the
message." [1]) However, given that this is a significant change for API
users, alternatives or a transition time may be appropriate.

1: https://blog.twitter.com/developer/en_us/a/2011/direct-messages-going-snowflake-on-sep-30-2011.html

* Additional fixes for stringified IDs in JSON

These should be the last two. These were identified using eslint to try
to identify any plain casts to JavaScript numbers. (Some such casts are
legitimate, but these were not.)

Adding the following to .eslintrc.yml will identify casts to numbers:

~~~
  no-restricted-syntax:
  - warn
  - selector: UnaryExpression[operator='+'] > :not(Literal)
    message: Avoid the use of unary +
  - selector: CallExpression[callee.name='Number']
    message: Casting with Number() may coerce string IDs to numbers
~~~

The remaining three casts appear legitimate: two casts to array indices,
one in a server to turn an environment variable into a number.

* Back out RelationshipsController Change

This was made to make a test a bit less flakey, but has nothing to
do with this branch.

* Change internal streaming payloads to stringified IDs as well

Per
https://github.com/tootsuite/mastodon/pull/5019#issuecomment-330736452
we need these changes to send deleted status IDs as strings, not
integers.
2017-09-20 14:53:48 +02:00
Ondřej Hruška cb42dd8497 Fix onboarding modal & add re-open button (#129)
* Added a button to open the onboarding modal

* Fixed onboarding modal

* added a show-me-around getting-started menu button
2017-08-08 21:42:29 +02:00
Ondřej Hruška 7a1ca8b0df Merge remote-tracking branch 'upstream/master' 2017-08-07 22:43:52 +02:00
Sorin Davidoi 8eb6d171e6 feat: Cache status height to avoid expensive renders (#4439)
* feat: Cache status height to avoid expensive renders

* feat: Escape content and emojify in reducers

* fix(css): Remove backface-visibility: hidden from .scrollable

* fix(statuses): Avoid creating DOMParses inside a loop
2017-08-07 20:32:03 +02:00
Ondřej Hruška 5942347407 Refactor Avatar and AvatarOverlay to have 'account' as prop instead of src and staticSrc (#4526)
* Refactored Avatar and AvatarOverlay (DRY) to have 'account' as prop.
Also removed animate attribute from compose navigation bar, which should
have never been there. Added test for avatar overlay.

* fix broken tests

* god dammit another bug in tests! travis please let this pass

* formatting in avatar overlay
2017-08-07 19:44:55 +02:00
Ondřej Hruška 811d895f7b Merged upstream PR #4526 2017-08-06 21:23:36 +02:00
kibigo! 8150689b48 Merge upstream (#111) 2017-08-01 13:20:29 -07:00