Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: PageUp/Down only working for messages list #4269

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

WofWca
Copy link
Collaborator

@WofWca WofWca commented Oct 26, 2024

Update: FYI this makes the messages list scroll smoothly when it is focused.
It will only scroll instantly when the composer is focused instead.

Some examples where this commit makes Page Up / Page Down work:

  • chat list
  • gallery
  • settings
  • contact lists
  • accoutns list
  • chat audit log

@WofWca WofWca force-pushed the wofwca/fix-page-up-down-for-non-message-list branch from 5084b9f to 9448c6c Compare October 26, 2024 11:49
Copy link
Member

@Simon-Laux Simon-Laux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM, didn't test

FYI this makes the messages list scroll smoothly when it is focused.
It will only scroll instantly when the composer is focused instead.

Some examples where this commit makes Page Up / Page Down work:
- chat list
- gallery
- settings
- contact lists
- accoutns list
- chat audit log
@WofWca WofWca force-pushed the wofwca/fix-page-up-down-for-non-message-list branch from 9448c6c to 34338c1 Compare November 1, 2024 12:50
@WofWca
Copy link
Collaborator Author

WofWca commented Nov 1, 2024

I forgot to mention that this makes the messages list scroll smoothly when it is focused.
It will only scroll instantly when the composer is focused instead.

@Simon-Laux
Copy link
Member

Simon-Laux commented Nov 1, 2024

testing result:

  • scrolling in Gallery breaks as soon as the focused item scrolls out of view.
  • rest works good

@WofWca
Copy link
Collaborator Author

WofWca commented Nov 1, 2024

Oh well. I guess it's the reality of react-window...
Maybe it makes sense to add PageUp / PageDown shortcuts in #4291, as suggested in https://www.w3.org/WAI/ARIA/apg/patterns/grid/#datagridsforpresentingtabularinformation, or simply settle on ArrowDown / ArrowUp.

@WofWca WofWca merged commit 05ee7d5 into main Nov 1, 2024
10 checks passed
@WofWca WofWca deleted the wofwca/fix-page-up-down-for-non-message-list branch November 1, 2024 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants