Commit Graph

27 Commits

Author SHA1 Message Date
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 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
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
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
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
Jakub Mendyk ceed1ebe5b Fix followers/follows layout issues from #8418 (#8505)
* Add alwaysShowScrollbar prop to ScrollableList

* Fix followers/follows layout issues from #8418
2018-08-29 01:19:58 +02:00
Eugen Rochko 90b64c0069
Always display tab navigation on local/federated timeline even when empty (#7663)
Fix #7659
2018-05-29 02:01:04 +02:00
ThibG e06fbc4fcf Fixes/rollback scroll changes (#7387)
* Revert "Do not re-position scroll when loading more (inserting items from below) (#7344)"

This reverts commit 8c601b54cc.

* Revert "Prevent timeline from moving when cursor is hovering over it (fixes #7278) (#7327)"

This reverts commit 58852695c8.
2018-05-06 22:26:39 +02:00
ThibG 8c601b54cc Do not re-position scroll when loading more (inserting items from below) (#7344) 2018-05-03 22:32:05 +02:00
ThibG 58852695c8 Prevent timeline from moving when cursor is hovering over it (fixes #7278) (#7327) 2018-05-03 12:09:11 +02:00
ThibG 7e0aed398f Fix scrolling behavior (#7151)
* Update React.JS

* Use React's new lifecycles for scrollable lists

* Clean up dead code

* Make CodeClimate happy
2018-04-16 21:04:24 +02:00
Akihiko Odaki 9a1a55ce52 Allow clients to fetch statuses made while they were offline (#6876) 2018-03-24 15:25:15 +01:00
Akihiko Odaki b0664a5e6c Replace onScrollToBottom with onLoadMore (#6615)
onScrollToBottom was a function to run instead of onScrollToTop and
onScroll when scrolling to the bottom. The behavior to prevent
onScrollToTop was inconvenient because the viewport can be at the bottom
and at the top at the same time if the viewport is larger than the
container.

onScrollToBottom was also called when the button to load more is clicked
on contray to the name suggests, which led notifications and
status_list_container components to mark the scrolled location is not at
the top mistakenly.

onLoadMore is a replacement for onScrollToBottom. It will be called
independently from onScrollToTop and onScroll.
2018-03-05 19:31:40 +01:00
Yamagishi Kazutoshi 763a2f8511
Replace react-router-scroll to react-router-scroll-4 (#5568) 2017-11-01 06:58:38 +09:00
Eugen Rochko 7db0f8dcb2 Implement hotkeys for web UI (#5164)
* Fix #2102 - Implement hotkeys

Hotkeys on status list:

- r to reply
- m to mention author
- f to favourite
- b to boost
- enter to open status
- p to open author's profile
- up or k to move up in the list
- down or j to move down in the list
- 1-9 to focus a status in one of the columns
- n to focus the compose textarea
- alt+n to start a brand new toot
- backspace to navigate back

* Add navigational hotkeys

The key g followed by:

- s: start
- h: home
- n: notifications
- l: local timeline
- t: federated timeline
- f: favourites
- u: own profile
- p: pinned toots
- b: blocked users
- m: muted users

* Add hotkey for focusing search, make escape un-focus compose/search

* Fix focusing notifications column, fix hotkeys in compose textarea
2017-10-06 01:07:59 +02:00
Nolan Lawson c567c87453 Toggle contain:strict on fullscreen (#5159)
* Toggle contain:strict on fullscreen

* Fix scss lint issue

* fix scss whitespace lint issue
2017-10-02 03:01:01 +02:00
unarist 6c81f9d6e5 Fix invisible load more button (#4962)
* Fix behavior while the button is invisible
e.g. pointer cursor, couldn't open contextmenu
* Avoid rendering the button to remove blank space if no more items are available or no items are rendered
2017-09-16 00:32:43 +02:00
abcang 60944d5dca Fix height cache (#4909) 2017-09-13 10:24:33 +02:00
Eugen Rochko bdc8b4fd91 Disable mouse-based pause from #4859 (#4865)
It wasn't working ideally and introduced some annoying false positivies
2017-09-09 15:09:50 +02:00
unarist c7908e2d09 Fix scroll behavior and others on paused timeline (#4864)
Resolved:

* Lot of redundant renders while mouse moving
* Scroll jumping when timeline loaded
* Scroll position isn't kept when statuses below the scrollTop was deleted then new status arrived

Unresolved:

* Scroll position isn't kept when statuses over the scrollTop was deleted then new status arrived
-> It needs to know which statuses are over the scrollTop
* New status indicator should be active when new statuses arrived while mouse moved recently
-> It needs a) update indicator in ScrollableList, or b) set scrollTop status while mouse moving
2017-09-09 14:16:11 +02:00
Eugen Rochko baa8b82179 Fix #1004 - Temporarily pause timeline if there's been recent mouse movement (#4859) 2017-09-09 02:26:41 +02:00
Clworld 1646f622a5 fix scroll position (#4821) 2017-09-06 17:29:56 +02:00
abcang 0827c09c44 Generalized the infinite scrollable list (#4697) 2017-08-28 22:23:44 +02:00