Commit graph

517 commits

Author SHA1 Message Date
Claire ddcb9da74f
Fix opening wrong profile when clicking on username of boosting user in WebUI (#17060)
Fixes #16799
2021-11-26 22:04:09 +01:00
Eugen Rochko 6e50134a42
Add trending links (#16917)
* Add trending links

* Add overriding specific links trendability

* Add link type to preview cards and only trend articles

Change trends review notifications from being sent every 5 minutes to being sent every 2 hours

Change threshold from 5 unique accounts to 15 unique accounts

* Fix tests
2021-11-25 13:07:38 +01:00
Eugen Rochko 07341e7aa6
Add graphs and retention metrics to admin dashboard (#16829) 2021-10-14 20:44:59 +02:00
Sasha Sorokin 89b5071fde
Add single option votes tooltip in polls (#16849)
Adds a tooltip when hovering over the percentages in a poll showing how
many votes were cast for that option.

Also removes descriptions from messages here since they are not picked
up by Crowdin anyway and might be confusing to other developers :)

Fixes #16820
2021-10-13 04:59:31 +02:00
Mélanie Chauvel 900481b7fa
Improve hover and focus style in columns settings (#16222)
* Make focus visible on switches and text buttons in columns settings

* Make hover/focus visible on left/right arrows in columns settings

Use same style as for station action bar (reply/boost/fav/etc.)

* Tab first to “Pin/Unpin” before left/right arrows in columns settings
2021-10-01 00:55:51 +02:00
Eugen Rochko 52e5c07948
Change routing paths to use usernames in web UI (#16171) 2021-09-26 05:46:13 +02:00
Claire 0c24c865b7
Fix crash if a notification contains an unprocessed media attachment (#16573)
* Refactor AttachmentList

* Do not crash if a notification contains an unprocessed media attachment

Fixes #16530

* Fix spacing in compact form
2021-08-11 17:49:10 +02:00
Claire e9659ae031
Fix crashes with Microsoft Translate on Microsoft Edge (#16525)
Fixes #16509

Microsoft Edge with translation enabled rewrites the DOM in ways that confuse
react and prevent it from working properly. Wrapping the offending parts in
a span avoids this issue.
2021-07-23 02:53:17 +02:00
Claire e54a65013d
Fix replying from modal (#16516)
Fixes #16515

Not using a router object somehow made `this.history` lag behind the real
browser history whenever pushing a new history item in `replyCompose`.

Not using the context-provided router in this case was an oversight made
when porting glitch-soc changes in #16499.
2021-07-17 17:06:52 +02:00
Claire 5a1e072517
Change references to tootsuite/mastodon to mastodon/mastodon (#16491)
* Change references to tootsuite/mastodon to mastodon/mastodon

* Remove obsolete test fixture

* Replace occurrences of tootsuite/mastodon with mastodon/mastodon in CHANGELOG

And a few other places
2021-07-13 15:46:20 +02:00
Claire d3791cca0c
Improve modal flow and back button handling (#16499)
* Refactor shouldUpdateScroll passing

So far, shouldUpdateScroll has been manually passed down from the very top of
the React component hierarchy even though it is a static function common to
all ScrollContainer instances, so replaced that with a custom class extending
ScrollContainer.

* Generalize “press back to close modal” to any modal and to public pages

* Fix boost confirmation modal closing media modal
2021-07-13 15:45:17 +02:00
Mélanie Chauvel 68181b9506
Make media_gallery.toggle_visible less confusing to translate (#15993)
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
2021-05-08 01:56:40 +02:00
Claire aa1b43f467
Fix display of toots without text content (#15665)
* Fix display of toots without text content

- fixes CWs from other implementations not showing up if toot has no text
  contents
- fixes the “Read more” thread indicator not showing up on threaded toots
  with no text contents

* Move content-less toot's CW to conents
2021-05-05 23:41:02 +02:00
fusagiko / takayamaki c35a6b9e01
fix component name (#16138)
It seems forget renaming when It copied from MissingIndicator.

Co-authored-by: fusagiko / takayamaki <takayamaki@users.noreply.github.com>
2021-05-03 14:59:49 +02:00
Eugen Rochko bf903dc510
Change onboarding by replacing tutorial with follow recommendations in web UI (#16060) 2021-04-19 14:45:15 +02:00
Takeshi Umeda baed52c2a7
Fix not to show follow button in global suggestion (#16045)
* Fix not to show follow button in global suggestion

* Fix style
2021-04-16 10:06:42 +02:00
Claire 0635c8760d
Fix WebUI crashing when SVG support is disabled (#15809)
Fixes #14910
2021-02-28 01:01:34 +01:00
abcang 2127f40e6b
Fix default searchTokens (#15775) 2021-02-22 11:26:08 +01:00
Mélanie Chauvel f5fefdc11a
Slightly reorder three dots menu on toots to make it more intuitive (#15647)
* Slightly reorder three dots menu on toots to make it more intuitive

- Make “Pin to profile” always appear at the same place
- Add separator to group “Bookmark” and “Pin to profile”
- Fix separator being the first item in some cases

* Fix missing semicolon and keep status_action_bar.js and action_bar.js in sync
2021-02-11 01:05:04 +01:00
Claire 07b46cb332
Add dropdown for boost privacy in boost confirmation modal (#15704)
* Various dropdown code quality fixes

* Prepare support for privacy selection in boost modal

* Add dropdown for boost privacy in boost confirmation modal
2021-02-11 00:53:12 +01:00
ThibG 3efa0c54b6
Change custom emoji to be animated when hovering container (#15637)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2021-01-31 21:25:31 +01:00
ThibG 5fcac81302
Add “translate” class to other user strings (#15611)
* Add “translate” class to other user strings

Follow-up to #15610.

Allow Google Translate to work on more user content:
- poll options
- reply indicator (contents of the status being replied to)
- directory account cards
- account note in follow requests list

* Fix incorrect styling of account bio

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2021-01-22 10:09:23 +01:00
ThibG 7d0031a515
Fix Google Translate breaking web interface (#15610)
- marks the page as a whole as untranslatable
- still marks user text as translatable

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2021-01-21 14:29:54 +01:00
Takeshi Umeda ba748a83f2
Fix logo button style (#15428)
* Fix bell button rtl style

* Remove size and style props from button component

* Fix logo button style

* Update jest snapshot
2020-12-26 23:50:34 +01:00
Eugen Rochko 1f564051b6
Change RTL detection to rely on unicode-bidi paragraph by paragraph (#14573) 2020-12-15 12:56:43 +01:00
Jeong Arm 7aee364795
Fix open media hotkey (#15308)
* Fix open media hotkey

* Update status.js

Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
2020-12-09 00:24:13 +01:00
Takeshi Umeda 765626a3a7
Fix the Open handler for PreviewCard (#15305) 2020-12-08 12:07:54 +01:00
Eugen Rochko 9620ee90be
Fix unnecessary re-rendering of various components when typing in web UI (#15286) 2020-12-07 19:36:36 +01:00
Eugen Rochko a8c471fcc0
Fix not being able to open audio modal in web UI (#15283)
Fix #15280

Also adds the new action bar and blurhash-based background
color to audio and video modals
2020-12-07 04:29:37 +01:00
Eugen Rochko 014733d1e4
Fix too low contrast on new media modal background in web UI (#15284)
Fix #15258
2020-12-07 02:32:27 +01:00
Eugen Rochko 1e89e2ed98
Change media modals look in web UI (#15217)
- Change overlay background to match color of viewed image
- Add interactive reply/boost/favourite buttons to footer of modal
- Change ugly "View context" link to button among the action bar
2020-11-27 03:24:11 +01:00
Eugen Rochko 272566043a
Remove fade-in animation from modals in web UI (#15199) 2020-11-21 23:54:36 +01:00
Eugen Rochko f970e1fab6
Fix hardcoded frame rate for frame by frame video navigation in web UI (#15198) 2020-11-21 23:19:04 +01:00
Eugen Rochko 18ca4e0e9a
Fix pop-out player appearing on mobile screens in web UI (#15157)
Fix #15092
2020-11-16 05:16:39 +01:00
dependabot[bot] e16b0fb15a
Bump detect-passive-events from 1.0.5 to 2.0.1 (#15003)
* Bump detect-passive-events from 1.0.5 to 2.0.1

Bumps [detect-passive-events](https://github.com/rafgraph/detect-passive-events) from 1.0.5 to 2.0.1.
- [Release notes](https://github.com/rafgraph/detect-passive-events/releases)
- [Commits](https://github.com/rafgraph/detect-passive-events/compare/v1.0.5...v2.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Migrate to detect-passive-events v2

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2020-11-05 02:21:05 +09:00
Mélanie Chauvel 1d07f51039
Make visibility icon clickable as part of the time of a toot (#15053)
- Makes permalink to a toot more easily clickable
- Fix clicking between icon and time in fact clicking the display name
- Fix clicking slightly under time in fact clicking the display name
2020-10-27 03:00:47 +01:00
ThibG 4c45b43cb8
Change how CDN_HOST is passed down to make assets build reproducible (#14381)
* Change how CDN_HOST is passed down to make assets build reproducible

* Change webpacker/webpack configuration to dynamically load publicPath based on meta header

* Fix embedded layout missing the cdn-host meta header
2020-10-13 01:19:35 +02:00
OSAMU SATO 96761752ec
Add duration parameter to muting. (#13831)
* Adding duration to muting.

* Remove useless checks
2020-10-13 01:01:14 +02:00
ThibG f54ca3d08e
Fix browser notification permission request logic (#13543)
* Add notification permission handling code

* Request notification permission when enabling any notification setting

* Add badge to notification settings when permissions insufficient

* Disable alerts by default, requesting permission and enable them on onboarding
2020-10-13 00:37:21 +02:00
Eugen Rochko a549415868
Fix regressions in icon buttons in web UI (#14915) 2020-10-04 15:02:36 +02:00
Eugen Rochko d88a79b456
Add pop-out player for audio/video in web UI (#14870)
Fix #11160
2020-09-28 13:29:43 +02:00
ThibG ff89025979
Add unread notification markers (#14818)
* Add unread notification markers

Fixes #14804

* Allow IntersectionObserverArticle's children to be updated
2020-09-26 20:57:07 +02:00
ThibG b67caf9be4
Add paragraph about browser add-ons when encountering some errors (#14801)
* Add paragraph about browser add-ons when encountering some errors

When a crash is caused by a NotFoundError exception, add a paragraph
to the error page mentioning browser add-ons.

Indeed, crashes with NotFoundError are often caused by browser extensions
messing with the DOM in ways React.JS can't recover from (e.g. issues #13325
and #14731).

* Reword error messages
2020-09-14 15:05:22 +02:00
Tdxdxoz a3ec9af9b0
Fix: also use custom private boost icon for detailed status (#14471)
* use custom private boost icon for detail status

* only use className
2020-08-24 14:13:44 +02:00
proxy 46210a65d1
reword "boost to original audience" as per #14596 (#14598) 2020-08-23 00:08:31 +02:00
Takeshi Umeda debf6ae316
Fix click range discrepancies in gifv (#14615) 2020-08-23 00:08:12 +02:00
ThibG c7cfd4e67a
Fix scrolling issues when closing some dropdown menus (#14606) 2020-08-21 14:14:28 +02:00
ThibG 98f6380dee
Fix keyboard navigation in scrollable lists (#14348)
Fixes #14347
2020-07-18 18:55:36 +02:00
Sasha Sorokin 17b1d71536
Fix following_counter plural to include "one" (#14342)
That should've worked just fine, but unfortunately, Crowdin wasn't able
to pick up on our non-existent "one" category, thus appending empty
translation block to people's translations. Empty block WILL BE used by
any ICU FormatMessage library, thus resulting in an empty translation
for "one" category, and that requires immediate fix.

This commit duplicates contents of the "other" plural category.
2020-07-17 07:08:23 +02:00
Sasha Sorokin 3ef94c0044
Improve safety of Blurhash component (#14278)
There was a missed empty hash check. As well as rendering is now wrapped
in try/catch block, so app won't crash if any Blurhash component fails
to render its contents as it's not that critical.
2020-07-09 22:32:36 +02:00
ThibG 6fda3cbbeb
Freeze scroll position when a dropdown menu is open in the TL (#14271)
* Freeze scroll position when a dropdown menu is open in the TL

* Apply this to direct TL as well

* Fix case when mouse leaves the menu
2020-07-09 15:09:19 +02:00
Sasha Sorokin 61c07c3731
Replace repetitive blurhash code with component (#14267)
This commit replaces all unnecessarily repeated code for decoding and
embedding blurhash canvases with separate component - <Blurhash>.

Under the hood Blurhash component will use effect dependent on its
props. This gives a few benefits: it will only be re-rendered whenever
the hash or width/height/dummy props update, and will not render if
canvas won't get to the final DOM, because then effect won't fire,
which prevents weird bugs like #14257.
2020-07-09 13:01:30 +02:00
Sasha Sorokin cb2adaaf9d
Replace shortNumberFormat with <ShortNumber> (#14061)
This commit introduces new utility component - ShortNumber. It should
work almost the same way as original shortNumberFormat function,
though it also localizes units and accepts one more prop - renderer.

Renderer is a function that takes rendered short formatted number
and also ready-to-pluralize number to format display result accordingly.
Ready-to-pluralize number allows to correctly select plural for
compactly notated numbers, respecting thousands and other units.

Issue #12451 accurately describes the issue with using raw numbers
when replacing counter with short version. In short, it doesn't work
with languages such as Russian, that require different plurals,
according to the unit number was compacted to.

All previous usages of shortNumberFormat were replaced with new
function, and as it became unused, it was removed to avoid misleading.
2020-07-06 14:27:32 +02:00
Eugen Rochko 99f3a55540
Add color extraction for audio thumbnails (#14209) 2020-07-05 18:28:25 +02:00
Yamagishi Kazutoshi 5e8f51b29f
Replace to testing-library from enzyme (#14152) 2020-06-29 13:58:07 +02:00
Eugen Rochko 64aac30733
Add customizable thumbnails for audio and video attachments (#14145)
- Change audio files to not be stripped of metadata
- Automatically extract cover art from audio if it exists
- Add `thumbnail` parameter to `POST /api/v1/media`, `POST /api/v2/media` and `PUT /api/v1/media/:id`
- Add `icon` to represent it in attachments in ActivityPub
- Fix `preview_url` containing URL of missing missing image when there is no thumbnail instead of null
- Fix duration of audio not being displayed on public pages until the file is loaded
2020-06-29 13:56:55 +02:00
Takeshi Umeda f7bdfec5bb
Change to correct the role of the boost button (#14132) 2020-06-25 22:44:19 +02:00
Takeshi Umeda 418f0a33e9
Add a visibility icon to status (#14123)
* Add a visibility icon to status

* Change to using the icon element

* Fix RTL

* Add a public globe
2020-06-25 22:43:59 +02:00
Eugen Rochko bb9ca8a587
Fix audio/video/images/cards not reacting to window resizes in web UI (#14130)
* Fix audio/video/images/cards not reacting to window resizes in web UI

* Update app/javascript/mastodon/features/audio/index.js

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2020-06-24 10:25:32 +02:00
Eugen Rochko 419ad6248b
Change volume control and download buttons in web UI (#14122)
* Fix audio download button not starting download in web UI

* Fix volume controls on audio and video players in web UI

* Remove download button from video player in web UI
2020-06-23 12:20:14 +02:00
Eugen Rochko 75a2b8f815
Change design of audio players in web UI (#14095) 2020-06-21 02:27:19 +02:00
Eugen Rochko 3e9dc4044b
Add hints about incomplete remote content to web UI (#14031) 2020-06-14 22:29:40 +02:00
ThibG c813789e06
Fix TL sometimes jumping when closing modals (#14019)
Fixes #14018
2020-06-10 13:57:13 +02:00
ThibG 8e96510b25
Hide sensitive preview cards with blurhash (#13985)
* Use preview card blurhash in WebUI

* Handle sensitive preview cards
2020-06-06 17:41:56 +02:00
Yamagishi Kazutoshi f96a891853
Fix ref attr for react-textarea-autozsize (#13936) 2020-06-02 03:24:04 +02:00
Mélanie Chauvel 40d81620b0
Change wording from “Hide media” to “Hide image/images” in Web UI (#13834) 2020-05-25 12:30:34 +02:00
ThibG 77ec0875ea
Fix page incorrectly scrolling when bringing up dropdown menus (#13574)
Fixes #13573

For some reason (I suspect this may be related to focusing the item before it
got drown by the browser), Firefox scrolls to top when bringing up dropdown
menus with pre-selected items.

This commit uses the “preventScroll” option as, due to the placement behavior,
the menu should be visible anyway and not trigger scrolling.
2020-04-28 13:19:39 +02:00
ThibG c955f98d36
Fix expanded video player issues (#13541)
Fixes #13536

- Expanding a paused video doesn't autoplay anymore
- Default volume level for the expanded video inherited from the original video

Position/playing state/volume are carried over from the original video player
to the modal, but they're not reported back to the modal as it would require
deeper changes.
2020-04-25 12:16:05 +02:00
ThibG 80182eda62
Fix and refactor keyboard navigation in dropdown menus (#13528)
Fixes #13527

- Fixes caught keyboard events being needlessly propagated
- Let up/down arrows wrap around like the tab key does
- Refactor common code
2020-04-21 15:13:26 +02:00
ThibG e12a5635da
Fix not being able to vote (#13490)
Fix regression introduced by ab8d7c0680
2020-04-17 21:54:25 +02:00
Gurgen Hayrapetyan ab8d7c0680
Fix Poll fetchPoll action not being debounced. (#13485)
* Fix Poll fetchPoll action not being debounced.

* Fix unused import in the Poll component
2020-04-16 20:16:20 +02:00
Sasha Sorokin 37b3985bfa
Improve polls: option lengths & redesign (#13257)
This commit redesign the polls and increases characters limit for the
options from 25 to 50 characters, giving pollsters more freedom.

Summarizing, the redesign is making the polls more adaptive for upcoming
changes to the options characters limit: the bar, or a "chart", is now
displayed separately from the option itself; vote check mark is moved
next to the option text, making the percentages take less space. Option
lengths are taken into account and text is wrapped to multiple lines
if necessary to avoid overflow.
2020-04-02 17:10:55 +02:00
Eugen Rochko 4bf5aeae83
Fix pinning a column in web UI sometimes redirecting out of web UI (#13376)
Fix #13216
2020-04-02 03:12:10 +02:00
Mélanie Chauvel (ariasuni) 1fb92037e4
Improve toot clicking areas (#13327)
* Make the area to the left “Show Thread” also expand the toot in Web UI

* Clicking the left part of a conversation with the avatars now opens it in Web UI
2020-03-31 19:40:23 +02:00
ThibG b998ec7c72
Fix WebUI crash in single-column mode on prehistoric browsers (#13267)
Fixes #13266
2020-03-17 20:43:55 +01:00
mayaeh 310d729745
Change the string "hidden" to "blocked" in WebUI (#13221)
* Change the string "hidden" to "blocked" in WebUI.

* update
2020-03-09 09:13:21 +01:00
Mélanie Chauvel (ariasuni) 5e4b649655
Change the tooltip "Toggle visibility" to "Hide media" in web UI (#13199) 2020-03-08 16:09:34 +01:00
Bèr Kessels fd76955f39
Code style improvements in JavaScript (#13159)
* JS-linter: fix trailing comma's

* Configure eslinter to ignore this onchange error.
2020-03-08 16:02:36 +01:00
Eugen Rochko 39453de232
Change the string "Hide everything from …" to "Block domain …" in web UI (#13178)
Blocking a domain is closer to blocking all its users than to a mute
action.
2020-03-05 23:20:49 +01:00
ThibG ff3a11d01d
Add source-mapped stacktrace to error message in web UI (#13082)
* Add source-mapped stack trace to copyable text in error boundary

* Add the error message to the copied report, not only the stack trace
2020-02-19 22:36:52 +01:00
ThibG 02236332ba
Fix native share button not being displayed for unlisted toots (#13045) 2020-02-07 13:21:25 +01:00
Eugen Rochko 10e209d8e0
Change number animations direction based on decrease or increase (#12971) 2020-01-27 11:04:11 +01:00
ThibG 42d2a915e4 Change last_status_at to be a date, not datetime (#12966)
* Return last_status_at as date, not datetime

* Fix relative timestamp for dates when delay is inferior to 1 day

* Also fix public directory

* Fix error when last_status_at isn't set
2020-01-26 23:13:48 +01:00
Eugen Rochko b9d74d4076
Add streaming API updates for announcements being modified or deleted (#12963)
Change `all_day` to be a visual client-side cue only

Publish immediately if `scheduled_at` is in the past

Add `published_at` and `updated_at` to announcements JSON
2020-01-26 20:07:26 +01:00
ThibG 90b13ffd00 Fix “new items glow” being displayed above settings and announcements (#12958) 2020-01-25 19:40:36 +01:00
Eugen Rochko 76f1ed834e
Add number animations (#12948) 2020-01-25 05:23:05 +01:00
Eugen Rochko f52c988e12
Add announcements (#12662)
* Add announcements

Fix #11006

* Add reactions to announcements

* Add admin UI for announcements

* Add unit tests

* Fix issues

- Add `with_dismissed` param to announcements API
- Fix end date not being formatted when time range is given
- Fix announcement delete causing reactions to send streaming updates
- Fix announcements container growing too wide and mascot too small
- Fix `all_day` being settable when no time range is given
- Change text "Update" to "Announcement"

* Fix scheduler unpublishing announcements before they are due

* Fix filter params not being passed to announcements filter
2020-01-23 22:00:13 +01:00
ThibG 2d5addde03 Fix “X new items” not showing up for slow mode on empty timelines (#12875) 2020-01-20 16:34:42 +01:00
Eugen Rochko 1ded3bb752
Change reported media attachments to always be hidden in admin UI (#12879)
Also:

- Fix Mastodon logo not showing up in status embeds
- Fix blurhash not being used in status embeds
- Fix blurhash not being used in admin UI
- Fix autoplay param not working correctly on status embeds
2020-01-18 19:50:43 +01:00
Matt Panaro 9cbbc50fcd Fix 12661 (#12744)
* Revert "persist last-intersected status update and restore when ScrollableList is restored"

This reverts commit 07e26142ef6a8e74bd2ac5e9b461a5a1699bd4c8.

accidentally merged spurious code in https://github.com/tootsuite/mastodon/pull/12661.  https://github.com/tootsuite/mastodon/pull/12735 removes the slowdown that this code was trying to solve; and other functionality successfully restores the view state of the list

* Revert "cache currently-viewing status id to avoid calling redux with identical value"

This reverts commit c93df2159fbd3888a5c48d8a8b8ae61dbbc54b89.

accidentally merged spurious code in https://github.com/tootsuite/mastodon/pull/12661.  https://github.com/tootsuite/mastodon/pull/12735 removes the slowdown that this code was trying to solve; and other functionality successfully restores the view state of the list
2020-01-02 22:46:42 +01:00
Matt Panaro 2a5da8c961 refactor IntersectionObserver to observe viewport in single-column mode (#12735) 2019-12-31 21:39:25 +01:00
Eugen Rochko ca78b1473e
Fix undefined error regression in status component in web UI (#12712)
Regression from #12661
2019-12-30 03:55:11 +01:00
Matt Panaro 31f7c3fc5d Summary: fix slowness due to layout thrashing when reloading a large … (#12661)
* Summary: fix slowness due to layout thrashing when reloading a large set of status updates

in order to limit the maximum size of a status in a list view (e.g. the home timeline), so as to avoid having to scroll all the way through an abnormally large status update (see https://github.com/tootsuite/mastodon/pull/8205), the following steps are taken:
•the element containing the status is rendered in the browser
•its height is calculated, to determine if it exceeds the maximum height threshold.
Unfortunately for performance, these steps are carried out in the componentDidMount(/Update) method, which also performs style modifications on the element.  The combination of  height request and style modification during javascript evaluation in the browser leads to layout-thrashing, where the elements are repeatedly re-laid-out (see https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing & https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Performance_best_practices_for_Firefox_fe_engineers).
The solution implemented here is to memoize the collapsed state in Redux the first time the status is seen (e.g. when fetched as part of a small batch, to populate the home timeline) , so that on subsequent re-renders, the value can be queried, rather than recalculated.  This strategy is derived from https://github.com/tootsuite/mastodon/pull/4439 & https://github.com/tootsuite/mastodon/pull/4909, and should resolve https://github.com/tootsuite/mastodon/issues/12455.

Andrew Lin (https://github.com/onethreeseven) is thanked for his assistance in root cause analysis and solution brainstorming

* remove getSnapshotBeforeUpdate from status

* remove componentWillUnmount from status

* persist last-intersected status update and restore when ScrollableList is restored

e.g. when navigating from home-timeline to a status conversational  thread and <Back again

* cache currently-viewing status id to avoid calling redux with identical value

* refactor collapse toggle to pass explicit boolean
2019-12-29 05:39:48 +01:00
Jeong Arm 76adde4fe2 Fix media open hotkey (#12546) 2019-12-05 00:50:51 +01:00
ThibG c05ed8a625 Fix poll options not being selectable via keyboard (#12538)
* Fix poll options not being selectable via keyboard

Fixes #12384

* Improve styling of poll option checkboxes/radio buttons

* Use more appropriate ARIA roles for poll options

* Allow switching between single and multiple choice from keyboard

* Coding style

* Avoid using .bind()
2019-12-03 19:53:16 +01:00
ThibG 27d5d02925 Fix blocking/unblocking users from status dropdown menu (#12535)
Fixes #12511
2019-12-02 18:25:24 +01:00
ThibG 35b142a7ad Fix lost focus when modals open/close (#12437)
* Fix lost focus after modal closes

Regression caused by the use of the wicg-inert polyfill

* Fix regression introduced by wicg-inert

* Catch errors to please CodeClimate
2019-11-30 18:19:47 +01:00
ThibG a690b3e470 Add hotkey for opening media files (#12498)
* [WiP] Add hotkey to open media

* Give focus to play/pause button when opening video modal
2019-11-29 17:02:35 +01:00
Eugen Rochko 853a67ed16
Add relationship-based options to status dropdowns (#12377)
Move bookmark action in inline statuses from action bar to dropdown
2019-11-19 21:24:16 +01:00
ThibG dfea7368c9 Add bookmarks (#7107)
* Add backend support for bookmarks

Bookmarks behave like favourites, except they aren't shared with other
users and do not have an associated counter.

* Add spec for bookmark endpoints

* Add front-end support for bookmarks

* Introduce OAuth scopes for bookmarks

* Add bookmarks to archive takeout

* Fix migration

* Coding style fixes

* Fix rebase issue

* Update bookmarked_statuses to latest UI changes

* Update bookmark actions to properly reflect status changes in state

* Add bookmarks item to single-column layout

* Make active bookmarks red
2019-11-13 23:02:10 +01:00