Commit Graph

396 Commits

Author SHA1 Message Date
Baptiste Lemoine d106a91363 fixs for light style 2020-02-05 17:58:51 +01:00
Baptiste Lemoine 895295e16e 🎨 cleaner data on approval requests 2020-02-03 11:29:32 +01:00
Baptiste Lemoine 3194577ee2 link to administrate an account in posts 2020-02-03 11:03:36 +01:00
Baptiste Lemoine c246d20d80 fix mess footer 2020-02-01 17:29:30 +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
Baptiste Lemoine 5175059c24 🎨 styling timelines
Signed-off-by: Baptiste Lemoine <contact@cipherbliss.com>
2019-12-23 17:00:57 +01:00
Baptiste Lemoine a43f67dd03 🎨 big answering buttons for conversations in direct messages 2019-12-23 12:41:49 +01:00
Baptiste Lemoine 26002f4b67 airmail style for notifications about direct messages 2019-12-23 11:44:49 +01:00
Baptiste Lemoine 0b5c3dba2a debug info in threads 2019-12-22 18:30:22 +01:00
Baptiste Lemoine a572fd707a 🎨 staff only link to manage trending tags and administrate user 2019-12-21 17:20:44 +01:00
Baptiste Lemoine 4e336c8e6b fix account admin info, and links in the footer on the left 2019-12-18 12:52:46 +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
Gabriel Rubens 3cc9ff872f Use inert polyfill (#12209)
* Inserting wicg-inert in project

* Import wicg-inert in moda_root component

* Update yarn.lock

* Solving code style problems

* Removing package-lock
2019-11-04 13:03:44 +01:00
Takeshi Umeda 5b46467474 Fix an issue where polls with 'expires_at' not set expired (#12222) 2019-10-27 12:45:55 +01:00
Faye Duxovni 48f75b86ae Add setting for whether to crop images in unexpanded toots (#12126) 2019-10-24 22:51:41 +02:00
ThibG 3a929dbedd Replace fav icon animation with CSS (#12175)
Fixes #12151
2019-10-24 22:47:48 +02:00
BSKY fccf83e1f2 Add noopener and/or noreferrer (#12202) 2019-10-24 22:44:42 +02:00
Eugen Rochko 6ebd74f4fa
Fix media editing modal changing dimensions when image loads (#12131) 2019-10-10 05:21:38 +02:00
Eugen Rochko 538db85d3c
Remove `lang` attribute from individual statuses (#12124)
Fix #10930
2019-10-09 03:45:05 +02:00
Eugen Rochko f665901e3c
Fix performance of home feed regeneration (#12084)
Fetching statuses from all followed accounts at once takes too long
within Postgres. Fetching them one by one and merging in Ruby
could be a lot less resource-intensive

Because the query for dynamically fetching the home timeline is so
heavy, we can no longer offer it when the home timeline is missing
2019-10-06 22:11:17 +02:00
Eugen Rochko cbaea097be
Add error description and button to copy stack trace to web UI (#12033) 2019-10-01 20:48:49 +02:00
ThibG 3babf8464b Add voters count support (#11917)
* Add voters count to polls

* Add ActivityPub serialization and parsing of voters count

* Add support for voters count in WebUI

* Move incrementation of voters count out of redis lock

* Reword “voters” to “people”
2019-09-29 22:58:01 +02:00
ThibG 15b3eeb326 Change vote results to display ex-aequo leading options as leading (#12001) 2019-09-29 21:23:40 +02:00
ThibG b0cda7a504 Fix vote checkmark in poll results (#11990) 2019-09-28 19:41:36 +02:00
Eugen Rochko 50b9276330
Fix unread indicator not updating for notifications (#11923)
Regression from #11898
2019-09-23 02:19:08 +02:00
ThibG b359974d9b Show user what options they have voted (#11195)
* Add own_votes field to poll results in REST API

Fixes #10679

* Display user votes in WebUI

* Update styling

* Add vote checkmark to public pages
2019-09-22 14:15:18 +02:00
Eugen Rochko bc5678d015
Change conversations UI (#11896)
Fix #11414, fix #9860, fix #10434
2019-09-21 20:01:16 +02:00
Eugen Rochko ba0de8fb68
Fix updates being hidden behind pending items on unmounted components (#11898) 2019-09-21 09:12:13 +02:00
Eugen Rochko 129bc871a0
Fix thread column showing pin button (#11891)
Fix #11467
2019-09-19 19:58:26 +02:00
ThibG f109867578 Fix “slow mode” issues (#11859)
* Fix weird scroll-jumping behavior with pending items

* Treat pending items as unread items

* Fix scroll position being altered because of the “X new items” button
2019-09-16 15:45:06 +02:00
ThibG 524187b653 Fix expiring polls not being displayed as such in the WebUI (#11835)
* Fix expiring polls not being displayed as such in the WebUI

* Reset expiration state and timer when a poll changes

* Refactor timer logic in `_setupTimer`, only set expiration if props have changed

* Refactor and do not use deprecated React lifecycles
2019-09-16 14:32:26 +02:00
Eugen Rochko a6a63358c3
Fix wrong sum of usage in hashtag component in web UI (#11755)
1 + 1 = 11
2019-09-04 10:10:18 +02:00
Eugen Rochko 1a00bd9244
Fix wrong pluralization in hashtag component in web UI (#11754) 2019-09-04 04:14:13 +02:00