Commit Graph

441 Commits

Author SHA1 Message Date
Baptiste Lemoine b64d02798d stuff to fit screen 2020-07-24 17:04:16 +02:00
Baptiste Lemoine eef276ce01 Merge branch 'master cipherbliss' of https://framagit.org/tykayn/mastodon 2020-07-24 14:52:03 +02:00
ThibG 98f6380dee
Fix keyboard navigation in scrollable lists (#14348)
Fixes #14347
2020-07-18 18:55:36 +02:00
Baptiste Lemoine 6e9a6e82d6 Merge branch 'merged-master' 2020-07-17 21:00:06 +02:00
Baptiste Lemoine c3f46d6b28 Merge branch 'master' of https://framagit.org/tykayn/mastodon into merged-master 2020-07-17 20:49:44 +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
Baptiste Lemoine 34f4a3f56a icons for dropdown menu 2020-04-09 17:58:37 +02:00
Baptiste Lemoine e50cb7160a 🐛 add icons in dropdown menu, fix style for this dropdown
Merge remote-tracking branch 'origin'

Signed-off-by: Baptiste Lemoine <contact@cipherbliss.com>

# Conflicts:
#	.ruby-version
#	app/javascript/mastodon/components/status.js
#	app/javascript/mastodon/features/direct_timeline/components/conversation.js
#	app/javascript/mastodon/features/getting_started/components/announcements.js
#	app/javascript/mastodon/locales/fr.json
#	config/locales/kab.yml
#	config/locales/ta.yml
#	yarn.lock
2020-04-09 17:33:58 +02:00
Baptiste Lemoine ab19e98a2c add gallery container 2020-04-09 16:33:34 +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
Baptiste Lemoine 158c51edc1 accept merge from upstream 2020-03-08 17:32:42 +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
Baptiste Lemoine 2485c822be merge with master for security update of v3.1.2 2020-02-27 14:24:07 +01:00
Baptiste Lemoine bf965b4d3e hop 2020-02-27 13:48:21 +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
Baptiste Lemoine 27fe6cb789 🐛 fix answer click
Signed-off-by: Baptiste Lemoine <contact@cipherbliss.com>
2020-02-12 11:16:04 +01:00
ThibG 02236332ba
Fix native share button not being displayed for unlisted toots (#13045) 2020-02-07 13:21:25 +01:00
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