Commit Graph

401 Commits

Author SHA1 Message Date
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
ThibG
daab45d4ae Update poll remaining time just like with status timestamps (#10466) 2019-04-03 18:16:55 +02:00
ThibG
6df4a82969 Add a “Block & Report” button to the block confirmation dialog (#10360) 2019-03-26 17:34:02 +01:00
Eugen Rochko
e6cfa7ab89
Change language detector threshold from 140 characters to 4 words (#10376)
Add `lang` attribute to statuses in web UI
2019-03-26 01:23:59 +01:00
ThibG
80f0910e21 Add support for custom emojis in poll options (#10322)
* Backend changes for custom emoji support in poll options

* Serialize poll emojis in REST API

* Render custom emojis in poll options

* Render custom emoji in poll options on public pages
2019-03-20 17:29:12 +01:00
Eugen Rochko
c20d096e6a
Show disappointed elephant if web UI crashes (#10275)
* Do not crash the whole UI when loading an invalid column

* Add error boundary component to catch Web UI crashes

* Add stack trace on supported browsers

* Add component stack info, pre-format everything for github

* Make “Reload” a clickable link that calls window.location.reload()

* Remove elephant friend from error boundary, make title stand out more

* Simplify error boundary to only a graphic
2019-03-15 05:35:45 +01:00
Eugen Rochko
75cb93676b
Fix NaN in Poll component (#10213) 2019-03-07 22:18:05 +01:00
ThibG
b3668a79ec Disable the underlying button element when an ItemButton is disabled (#10194)
Fixes #10191
2019-03-06 15:10:32 +01:00
Eugen Rochko
fd128b9c7a
Fix poll options not rendering text after vote/refresh (#10189)
* Fix poll options not rendering text after vote/refresh

* Fix poll options not showing up on public pages

* Fix code style issue
2019-03-06 05:35:52 +01:00
Eugen Rochko
4407f07014
Render unicode emoji in polls using emoji pack (#10185) 2019-03-06 03:57:46 +01:00
Eugen Rochko
a198add83b
Fix various issues in polls (#10165)
* Fix ActivityPub poll results being serialized even with hide_totals

* Fix poll refresh button having a different font size

* Display poll in OpenGraph description

* Fix NoMethodError when serializing votes

Regression from #10158

* Fix polls on public pages being broken for non-logged-in users

* Do not show time remaining if poll has no expiration date
2019-03-05 03:51:18 +01:00
ThibG
cda6ece760 Display closed polls as such (#10156) 2019-03-04 22:52:41 +01:00
ThibG
4ced609497 Fixes to the polls UI (#10150)
* Allow unselecting choices in multiple choice polls

* Properly disable checkboxes/radio buttons for polls in public pages

* Visually differentiate checkboxes and radio buttons
2019-03-04 01:54:14 +01:00
Eugen Rochko
5dfa433698
Fix web UI crash on page load when detailed status has a poll (#10139) 2019-03-03 23:45:02 +01:00
Eugen Rochko
230a012f00
Add polls (#10111)
* Add polls

Fix #1629

* Add tests

* Fixes

* Change API for creating polls

* Use name instead of content for votes

* Remove poll validation for remote polls

* Add polls to public pages

* When updating the poll, update options just in case they were changed

* Fix public pages showing both poll and other media
2019-03-03 22:18:23 +01:00
ThibG
8e7fc7ec73 Fix crash when conversations have no valid participants (#10078)
* Never return empty participants for conversations

Fixes #10068

* Fix client-side crash when conversations have no participants
2019-02-19 20:00:41 +01:00
Eugen Rochko
71e28ba399
Change buttons on timeline preview to open the interaction dialog (#10054)
Fix #9922
2019-02-15 19:43:09 +01:00
Eugen Rochko
b01f26ffbd
Change conversations to always show names of other participants (#10047)
Fix #9190
2019-02-15 16:08:48 +01:00
rinsuki
f9a338b473 Fix breaks when opening a reply tree in WebUI (#10046)
fix #10045
2019-02-14 17:03:01 +01:00
ThibG
aee93bfc9c Fix timeline jumps (#10001)
* Avoid two-step rendering of statuses as much as possible

Cache width shared by Video player, MediaGallery and Cards at the
ScrollableList level, pass it down through StatusList and Notifications.

* Adjust scroll when new preview cards appear

* Adjust scroll when statuses above the current scroll position are deleted
2019-02-11 13:19:59 +01:00
Eugen Rochko
3cfadd875c Add "copy link" item to status action bars (#9983)
Fix #6848
2019-02-11 12:19:49 +09:00
ThibG
d09ce6d81b Fix IntersectionObserverArticle not hiding some out-of-view items (#9982)
IntersectionObserverArticle is made to save on RAM by avoiding fully rendering
items that are far out of view. However, it did not work for items spawned
outside the intersection observer.
2019-02-06 23:36:43 +01:00
Eugen Rochko
1f95190202
Refactor icons in web UI to use Icon component (#9951)
* Refactor uses of icons to an Icon component in web UI

* Refactor options passed to the Icon component

* Make tests work with absolute component paths
2019-02-01 00:14:05 +01:00
Clar Charr
6513f6c953 Replace unlock-alt icon with unlock (#9952) 2019-01-31 13:45:15 +01:00
Eugen Rochko
bc642ac24b
Redesign public hashtag page to use a masonry layout (#9822) 2019-01-16 19:47:46 +01:00
ThibG
6cfb357940 Make hashtag search results link to the hashtag URL (#9810)
Currently, middle-clicking on a hashtag search result will open a new
instance of the WebUI, which is inconsistent with middle-clicking on
an account result, or a hashtag in a toot.
2019-01-14 23:29:21 +01:00
kedama
cf3c0fc38c Stop gifv timeline preview explicitly when open the media gallery. (#9749) 2019-01-07 15:54:40 +01:00
0xflotus
57c91fbbed refactored account.js (#9739) 2019-01-07 08:23:09 +01:00
ThibG
6f9a7bd02c Add quick links to the admin interface in the WebUI (#8545)
* Allow to show a specific status in the admin interface

* Let the front-end know the current account is a moderator

* Add admin links to status and account menus

If the current logged-in user is an admin, add quick links to the admin
interface in account and toot dropdown menu. Suggestion by @ashkitten

* Use @statuses.first instead of @statuses[0]
2019-01-04 13:10:43 +01:00
mayaeh
c1693827ae Change the icon to "reply-all" when reply to other accounts (#9378) 2018-12-28 03:51:32 +01:00
ThibG
a6079a42b6 Fix composer not getting focus after reply confirmation dialog (#9602)
The modal-handling code gives back focus to the element focused when the
modal opened. However, in the case of reply confirmation, it would do so
*after* the composer code itself requested focus.
2018-12-21 18:52:41 +01:00
ThibG
8389b496ba Fix unnecessary loadMore calls when the end of a timeline has been reached (#9581)
Fixes #9568
2018-12-19 22:23:16 +01:00
kedama
5bf100f87b Back to the getting-started when pins the timeline. (#9561) 2018-12-18 16:43:50 +01:00
ThibG
55abff8af7 Various fixes to scrollable lists and media gallery (#9501)
* Always use the scrollable class for the ScrollList component

Fixes #9499 as well as empty timelines' scrollbar “blinking”
between loading state and empty state.

* Do not display empty message when the list is known to have more elements

Fixes #9500

* Fix LoadMore usage in account media gallery

(Even though that codepath is probably never actually used…)

* Make account media gallery more consistent with account timeline

Fixes #9498

Display “load more” more consistently, add a loading indicator on first load.

* Fix “load more” button when no data has been fetched
2018-12-12 22:32:44 +01:00
Les Orchard
cc1f13dfd0 Only consider mouse move in scrolling on item insertion (#9262)
Fixes #9259
2018-11-11 23:20:20 +01:00
Les Orchard
2f86fc5e0a Identify manual scrolling to cancel scroll to top reset on mouse idle (#9245) 2018-11-09 18:06:43 +01:00
Eugen Rochko
dd00cd19d2
Use local instead of global loading indicator for timelines, account timelines (#9224)
So that opening a profile feels faster. Also, pinned toots are not
shown before other toots have loaded. Also, if no toots are loaded,
added empty message
2018-11-08 21:35:06 +01:00
Eugen Rochko
5cbf6cf3ec
Add "Show thread" link to self-replies (#9228)
Fix #4716
2018-11-08 21:08:57 +01:00
Les Orchard
9cfd610484 Cancel list scroll reset after mouse move on wheel scroll (#9233)
- Use object properties rather than component state for
  mouseMovedRecently and scrollToTopOnMouseIdle flags

- Remove redundant scrollToTop prop call, also fixing an attempt to call
  an undefined prop.

Fixes #9217
2018-11-08 18:45:20 +01:00
Les Orchard
6a1216d2cd Temporarily hold timeline if mouse moved recently (fixes #8630) (#9200)
- On recent mouse movement, hold timeline position so statuses remain in
  place for interactions in progress.

- If the timeline had been scrolled to the top before mouse movement,
  restore scroll on mouse idle.
2018-11-05 18:59:41 +01:00
Eugen Rochko
9c38c5daa3
Fix dimensions of preview cards, fix crash in web UI, fix warning (#9133) 2018-10-29 04:42:07 +01:00
Eugen Rochko
795f0107d2
Include preview cards in status entity in REST API (#9120)
* Include preview cards in status entity in REST API

* Display preview card in-stream

* Improve in-stream display of preview cards
2018-10-28 06:35:03 +01:00