Commit Graph

299 Commits

Author SHA1 Message Date
Baptiste Lemoine c246d20d80 fix mess footer 2020-02-01 17:29:30 +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
Baptiste Lemoine d7a17f9834 fix some columns show on smaller screens 2020-01-04 16:27:50 +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 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 248e22cf6c style and place footer links 2019-12-28 11:19:51 +01:00
Baptiste Lemoine 3008f5e026 links and tags 2019-12-23 17:09:56 +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 948e2e5e9b automatically enable snow on the 3 last weeks of the year, add links to external utilities 2019-12-23 15:04:13 +01:00
Baptiste Lemoine 26002f4b67 airmail style for notifications about direct messages 2019-12-23 11:44:49 +01:00
Baptiste Lemoine 03fd10d068 Merge branch 'master' of https://github.com/tootsuite/mastodon into messaging
 add snow effect conditionnally

# Conflicts:
#	package.json
#	yarn.lock
2019-12-23 11:01:09 +01:00
Baptiste Lemoine 8661eb28a4 split conversation example 2019-12-22 18:48:13 +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 9c968a0b23 refacto messaging into several components 2019-12-21 17:03:26 +01:00
Baptiste Lemoine 15a9f2633f stuff for messaging box 2019-12-21 15:16:13 +01:00
Baptiste Lemoine efe3acd0c5 todo on messaging 2019-12-18 16:16:08 +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
Baptiste Lemoine 7e30a3a575 demo structure for message stream 2019-12-15 22:48:15 +01:00
Baptiste Lemoine acdac0c88a add link to moderation hashtags 2019-12-15 22:42:42 +01:00
ThibG 911cc14481 Add follow_request notification type (#12198)
* Add follow_request notification type

The notification type already existed in the backend but was never pushed
to the front-end. This also means translation strings were also available
for the backend, from the notification mailer.

Unlike other notification types, these are off by default, to match what
I remember of Gargron's view on the topic: that follow requests should not
clutter notifications and should instead be reviewed at the user's own
leisure in the dedicated column.

Since follow requests have their own column, I've deemed it unnecessary to
add a specific tab for them in the notification quick filter.

* Show follow request link in single-column if there are pending requests, even if account isn't locked

* Push follow requests from notifications to the follow_requests list

* Offer to accept or reject follow request from the notification

* Redesign follow request notification
2019-12-01 17:25:29 +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
ThibG e7a7f88df7 Fix OCR with delete & redraft (#12465) 2019-11-25 01:42:51 +01:00
ThibG e86234b1e9 Change media description label to be context-sensitive (#12270)
“Describe for the visually impaired” makes no sense when the uploaded media
is an audio file.
2019-11-21 11:39:07 +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
ThibG 3db3c10762 Fix filtered out items being counted as pending items (#12266) 2019-11-04 13:02:16 +01:00
ThibG 7488a9e154 Add support for submitting media description with ctrl+enter (#12272) 2019-11-04 12:59:17 +01:00
Hinaloe 8568018935 dont crash with null-ref (#12274) 2019-11-04 12:58:19 +01:00
umonaca f4be89e24d Improve swipe experience (#12168) 2019-10-24 22:48:11 +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 c9b8ba50f8
Fix audio attachments opening in video modal from media tab in web UI (#12056)
Fix video attachments having a GIF label in media tab in web UI
2019-10-03 03:34:58 +02:00
Eugen Rochko f51f99c3c2
Fix media editing modal and profile directory in light theme (#12059)
Also:

- Fix embed modal in light theme
- Fix confirmation modal in light theme
2019-10-03 03:17:29 +02:00
Jeong Arm 3abe003f59 Fix drag and drop link to composebox (#12055) 2019-10-02 17:10:56 +02:00
ThibG 559da46fd4 Fix typo in mute confirmation dialog (#12044) 2019-10-01 23:55:11 +02:00
ThibG 9027bfff0c Add explanation to mute dialog, refactor and clean up mute/block UI (#11992)
* Add some explanation to the mute modal dialog

* Remove `isSubmitting` from mute modal code, this wasn't used

* Refactor block modal

Signed-off-by: Thibaut Girka <thib@sitedethib.com>

* Refactor SCSS a bit

* Put mute modal toggle to the same side as in the report dialog for consistency

* Reword mute explanation

* Fix mute explanation styling

* Left-align all text in mute confirmation modal
2019-09-29 21:46:05 +02:00
Yamagishi Kazutoshi 0a49b26793 Do not add margin light when opening modal on mobile (#11830) 2019-09-29 14:30:58 +02:00
ThibG 7baedcb61e Use blob URL for Tesseract to avoid CORS issues (#11964) 2019-09-27 02:16:11 +02:00
Eugen Rochko bdeff5ae15
Fix web UI allowing uploads past status limit via drag & drop (#11863)
Fix #11659
2019-09-16 20:42:19 +02:00
ThibG c00ab575b7 Fix media description button being disabled at 420 characters instead of 1500 (#11836) 2019-09-14 00:52:56 +02:00
Eugen Rochko b6381bdc7d
Change max length of media descriptions from 420 to 1500 characters (#11819)
Fix #11658
2019-09-13 16:00:34 +02:00
Eugen Rochko e445a8af64
Add timeline read markers API (#11762)
Fix #4093
2019-09-06 13:55:51 +02:00
mayaeh 1f22b8197c Integrate translation strings for the Profile Directory. (#11722)
Run `yarn manage:translations en`
2019-09-02 18:12:27 +02:00
Eugen Rochko cb447b28c4
Add profile directory to web UI (#11688)
* Add profile directory to web UI

* Add a line of bio to the directory
2019-08-30 00:14:36 +02:00
ThibG 81f864d4da Add special alert for throttled requests (#11677)
* Add special alert for throttled requests

* Use an extra attribute instead of an array
2019-08-27 16:50:39 +02:00
ThibG fd3d45d38f Add confirmation modal when logging out from the web app (#11671)
* [WiP] Add a confirmation modal before logging out from the web interface

* Add confirmation to logout link in getting started footer

* Please CodeClimate
2019-08-26 18:24:10 +02:00
ThibG bd4099d976 Change window resize handler to switch to/from mobile layout as soon as needed (#11656) 2019-08-25 15:48:50 +02:00
Eugen Rochko 4190e31626
Add audio player (#11644) 2019-08-23 22:38:02 +02:00
ThibG 2ca6b2bb6c Improve focal point modal on mobile (#11575)
* Reduce padding around report modal and focal point modal title

* Increase max allowed height for focal point modal content
2019-08-15 22:49:00 +02:00
ThibG d37126fd03 Allow clicking behind preview (#11576) 2019-08-15 22:47:51 +02:00