-
-
Notifications
You must be signed in to change notification settings - Fork 838
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: infinite scroll not initialized for notifications on big screens #3733
Conversation
…opdown on big screens.
Coincidentally, I experienced this for the first time last week, and it was on a 1080p screen, in a particular case where the whole list of notifications were from the same discussion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The max-height change makes sense, but I'm hesitant to remove pagination-by-default from the notifications list controller like that. Couldn't that be a frontend change, with a different limit
query param depending on screen size?
This PR does not remove pagination, it changes page size from 10 to 20 items (this is default size from AbstractSerializeController). |
rather than 20, 12 should be enough for this case? notifications listing performance is still not great, so ideally we should avoid doubling items per page. |
12 will not be enough in some cases. I have many notifications like this: In this scenario you need ate least 14-15 notifications to fill 800px of dropdown. And probably there could be cases when you have 4 notifications grouped like this - then you need even more notifications. 20 is just safe value, and performance is not terrible in my case (it is faster than discussions list or single discussion view in most cases). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this all seems reasonable. I don't see why notifications should have a special case for the default limit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this scenario you need ate least 14-15 notifications to fill 800px of dropdown.
Alright then
Changes proposed in this pull request:
On QHD screens
70vh
is bigger than space taken by 10 notifications. As a result there is no scroll for this dropdown, and as a result infinite scroll do not work in this place. I mentioned this on Discord a few months ago: https://discord.com/channels/360670804914208769/707030467450372166/1010096800511836261This PR sets max height of this dropdown to 800px and increases number of notifications loaded in this dropdown, to make sure it is always filled.
Necessity
Confirmed
composer test
).Required changes: