Commit Graph

542 Commits

Author SHA1 Message Date
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
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
Eugen Rochko d19d86fe2b
Change hashtag component in web UI to show numbers for 2 last days (#11742)
To deal with the midnight problem
2019-09-03 06:35:44 +02:00
Eugen Rochko 34adc8784a
Fix uncached media in web UI not being clickable (#11745) 2019-09-03 04:56:40 +02:00
Eugen Rochko d344289431
Add "not available" label on unknown media attachments (#11715) 2019-09-01 19:43:35 +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 91582937f3 Fix crash when switching back/from mobile layout (#11655)
Fixes #11630
2019-08-25 15:49:02 +02:00
Eugen Rochko 2e99e3cab3
Fix more visual issues with the audio player (#11654)
* Fix more visual issues with the audio player

- Add horizontal baseline in the middle of waveform
- Fix audio player colors in light theme
- Use audio element instead of web audio API
- Do not render any bars until the file is loaded
- Do not allow interactions with waveform until the file is loaded

* Fix code style issue
2019-08-25 15:09:19 +02:00
Eugen Rochko 4190e31626
Add audio player (#11644) 2019-08-23 22:38:02 +02:00
ThibG 37f612074e Fix items in StatusContent render list not all having a key (#11645) 2019-08-23 21:02:59 +02:00
ThibG 5ab1e0e738 Restore hashtag suggestions from local tag history (#11632)
* Restore hashtag suggestions from local tag history

* Append local hashtag suggestions instead of prepending them

* Do not display inaccurate usage statistics for hashtags not retrieved from API

* Fixup
2019-08-22 04:37:18 +02:00
ThibG 0d13a9cd13 Fix hidden statuses losing focus (#11208)
Fixes #10991
2019-08-19 19:00:33 +02:00
ThibG fd01043691 Fix “read more” button behing hidden (regression from #11404) (#11522)
* Fix “read more” button behing hidden (regression from #11404)

This has the side-effect of putting the “Read more” button below possibly
trunctated polls instead of putting the poll below the “Read more”

* Remove dead code
2019-08-08 17:05:50 +02:00
Eugen Rochko e823b49214
Fix "cancel follow request" button having unreadable text in web UI (#11521)
Fix #11478
2019-08-08 08:56:55 +02:00
ThibG 396b8cdd0f Improve focus handling with dropdown menus (#11511)
- Focus first item when activated via keyboard
- When the dropdown menu closes, give back the focus to
  the actual element which was focused prior to opening the menu
2019-08-07 13:58:53 +02:00
Eugen Rochko 5e35aa8280
Fix non-lowercase hashtags not being picked up by the streaming API (#11508)
Regression from f371b32

Fix hashtag links always being lowercase
2019-08-07 10:01:19 +02:00
Eugen Rochko 1d8d553d8b
Revert "Change links in webUI to rewrite misleading links (#11426)" (#11500)
This reverts commit b31b232edf.
2019-08-06 12:09:28 +02:00
ThibG 27a0d02d0d Improve keyboard navigation in privacy dropdown (#11492)
* Trap tab in privacy dropdown

* Give focus back to last focused element when privacy dropdown menu closes

* Actually give back focus to the element that had it before clicking the dropdown
2019-08-06 11:59:58 +02:00
ThibG a12f1a0baf Improve dropdown menu keyboard navigation (#11491)
* Allow selecting menu items with the space bar in status dropdown menus

* Fix modals opened by keyboard navigation being immediately closed

* Fix menu items triggering modal actions

* Add Tab trapping inside dropdown menu

* Give focus back to last focused element when status dropdown menu closes
2019-08-06 11:59:46 +02:00
ThibG 5c73746b69 Trap tab in modals (#11493) 2019-08-06 11:59:28 +02:00
Eugen Rochko 2dee293c4c
Fix scroll to top in single column UI (#11463) 2019-08-01 19:17:17 +02:00
Eugen Rochko 706a48ee1f
Fix column header scrolling with the page (#11458)
Regression from aa22b38
2019-08-01 12:26:58 +02:00
ThibG b31b232edf Change links in webUI to rewrite misleading links (#11426)
* [WiP] Show host for “misleading” links

* Disallow misleading targets which domain names are prefixes of link text

* Move decodeIDNA to app/javascript/mastodon/utils

* Add support for international domain names

* Change link origin tag color to darker text color

* Handle links to domains starting with www. as shortened by Mastodon

* [WiP] Ignore links that cannot be misread as URLs, rewrite other links
2019-07-30 12:13:29 +02:00
Eugen Rochko 784c88e16d
Fix emoji autosuggestions (#11442)
Regression from cfb2ed7823
2019-07-29 15:04:49 +02:00
Eugen Rochko cfb2ed7823
Add autosuggestions for hashtags (#11422) 2019-07-28 14:37:52 +02:00
ThibG 9349f1067a Fix animate on hover in poll options without CW (#11404) 2019-07-28 13:48:04 +02:00
ThibG 10e78ecf57 Change contrast of status links that are not mentions nor hashtags (#11406) 2019-07-28 06:00:51 +02:00
ThibG 7de8c51873 Play animated custom emoji on hover (#11348)
* Play animated custom emoji on hover in status

* Play animated custom emoji on hover in display names

* Play animated custom emoji on hover in bios/bio fields

* Add support for animation on hover on public pages emojis too

* Fix tests

* Code style cleanup
2019-07-21 18:10:40 +02:00
Eugen Rochko aa22b38fdb
Change single-column mode to scroll the whole page (#11359)
Fix #10840
2019-07-19 09:25:22 +02:00
koyu 8df0022e66 Added logout to dropdown menu (#11353)
* Added logout to dropdown menu

* Triggering build-and-test with empty commit as it seems it failed due to some internal failure

* Looks fine, ready to review

* Added changes from review

* method can be null without any problems

* Also target can be null
2019-07-19 03:58:46 +02:00
Eugen Rochko 9b1d3e4acb
Add option to disable real-time updates in web UI (#9984)
Fix #9031
Fix #7913
2019-07-16 06:30:47 +02:00
ThibG 3086c645fd Add option to disable blurhash previews (#11188)
* Add option to disable blurhash previews

* Update option text

* Change options order
2019-06-26 19:33:04 +02:00
Eugen Rochko 49ebda4d49
Change audio format from ogg to mp3 for wider compatibility (#11141)
* Change audio format from ogg to mp3 for wider compatibility

* Add media description as title to links of unknown media attachments
2019-06-21 22:59:44 +02:00
Eugen Rochko f7f23b4a19
Add audio uploads (#11123)
* Add audio uploads

Fix #4827

Accept uploads of OGG, WAV, FLAC, OPUS and MP3 files, and converts
them to OGG. Media attachments get a new `audio` type. In the UI,
audio uploads are displayed identically to video uploads.

* Improve code style
2019-06-19 23:42:38 +02:00
ThibG a4a502e85c Do not expand toot when clicking on a poll option (#11067)
Fixes regression introduced by e9ddd5a159
2019-06-13 00:16:46 +02:00
ThibG 5bcd98172c Fix clicking on the left side of a conversation not marking it as read (#11041) 2019-06-10 19:27:10 +02:00
ThibG e9ddd5a159 Put poll options behind content warnings (#10983)
* Put poll options behind CWs in WebUI

* Put polls behind CWs on public pages

* Add poll icon to public pages CWs

* Revert to not showing an icon in the CW button
2019-06-08 17:40:59 +02:00
Eugen Rochko cc8f6b3cda
Fix some React warnings (#10989) 2019-06-07 17:15:18 +02:00
Jeong Arm 8f3c32e29c Scroll to compose form when focus (#10970)
* Scroll to compose form when focus

* Get rid of constructor
2019-06-05 15:29:45 +02:00
Takeshi Umeda d93b82af87 Improvement variable height in single column layout (#10917)
* Improvement variable height of compose and navigation panel in single column layout

* Fix wrong quotes and missing commas
2019-06-02 10:05:54 +02:00
ThibG 3333250ede Fix React warning about legacy lifecycle calls and sensitive status resetting (#10872) 2019-05-29 17:33:15 +03:00
Takeshi Umeda 3b9c02506d Fix poll visibility on public pages (#10817)
* Fix poll visibility on public pages

* Revert "Fix poll visibility on public pages"

This reverts commit 54a9608add6f855bc6337fe3c65eaee7ba13db49.

* Revert "Change poll options to alphabetic letters when status text is hidden"

This reverts commit c53d67326201b2061990b1874a3547c3647f50d2.
2019-05-26 23:13:29 +02:00
Neil Moore 63483ee543 Create new click handler for status__expand area in status (#10837)
This click handler only activates on left-click, resolving #10798.
This matches behavior in status_content.js, as added in #536
2019-05-26 13:48:45 +02:00
Eugen Rochko 988342a56c
Fix null error in status component when determining showMedia state (#10838)
* Fix null error in status component when determining showMedia state

Also update the showMedia value if the status passed to the
component changes

* Refactor media visibility computation into a defaultMediaVisibility function

* Fix default media visibility with reblogs
2019-05-26 13:48:16 +02:00
Eugen Rochko 0e445ebb13
Improvements to the single column layout (#10835)
* Improvements to the single column layout

- Add follows and followers link to the right panel
- Increase margins around separators in right panel
- Add follow requests link with counter when account is locked to right panel

* Redirect from getting started to home when navigation panel is visible
2019-05-26 02:55:37 +02:00
ThibG a472190729 Add a keyboard shortcut to hide/show media (#10647)
* Move control of media visibility to parent component

* Add keyboard shortcut to toggle media visibility
2019-05-25 23:20:51 +02:00
Eugen Rochko 1e5532e693
Add responsive panels to the single-column layout (#10820)
* Add responsive panels to the single-column layout

* Fixes

* Fix not being able to save the preference

* Fix code style issues

* Set max-height on the compose textarea and add a link to relationship manager
2019-05-25 21:27:00 +02:00
Eugen Rochko 9ddeb30f90
Add `forceSingleColumn` prop to `<UI />` (#10807)
* Move TabsBar rendering logic from CSS to the ColumnsArea component

* Add forceSingleColumn mode

* Add unread notifications counter to tabs bar

* Add toggle to control `forceSingleColumn`

* Increase paddings in mobile layout responsively at large sizes
2019-05-23 01:35:22 +02:00
Eugen Rochko 6fe474837c
Change poll options to alphabetic letters when status text is hidden (#10685)
Fix #10569
2019-05-18 14:41:16 +02:00
Neil Moore 4ab094d35e Adds click-able div that expands status (#10733) (#10766)
The clickable div is positioned under the account avatar and covers
all empty space below it to the end of the status.
2019-05-15 06:53:23 +02:00
ThibG f2be71c293 Add emoji suggestions to CW and poll option fields (#10555)
* Refactor selectComposeSuggestion so that different paths can be updated

* Add suggestions in CW field

* Add emoji suggestion to poll options

* Attempt to fix CSS

* Hide suggestions by default

They will be enabled if the input has focus
2019-05-09 22:10:27 +02:00
ThibG 5121d9c12f When selecting a toot via keyboard, ensure it is scrolled into view (#10593) 2019-05-03 06:20:35 +02:00
Eugen Rochko 05ef3462ba
Make the "mark media as sensitive" button more obvious in web UI (#10673)
* Make the "mark media as sensitive" button more obvious in web UI

* Use eye-slash icon instead of eye icon to mean "hide"
2019-05-03 04:34:55 +02:00
Eugen Rochko 3f143606fa
Change account gallery in web UI (#10667)
- 3 items per row instead of 2
- Use blurhash for previews
- Animate/hover-to-play GIFs and videos
- Open media modal instead of opening status
- Allow opening status instead with ctrl+click and open in new tab
2019-05-02 08:34:32 +02:00
Eugen Rochko fba96c808d
Add blurhash (#10630)
* Add blurhash

* Use fallback color for spoiler when blurhash missing

* Federate the blurhash and accept it as long as it's at most 5x5

* Display unknown media attachments as blurhash placeholders

* Improve style of embed actions and spoiler button

* Change blurhash resolution from 3x3 to 4x4

* Improve dependency definitions

* Fix code style issues
2019-04-27 03:24:09 +02:00
ashleyhull-versent 2b68fe5442 tinyfix 2: unrequired arguments (#10471)
* unrequired argument

* unrequired argument
2019-04-06 12:02:03 +09:00