RocketMAD
RocketMAD copied to clipboard
Improve Filter Dialog (especially) on Mobile
Description
This PR improves the responsiveness of the filter modal on mobile browsers by only partially displaying mons in chunks of 100. The user can load the next chunks by pressing the new "Load More..." button.
Furthermore, I have changed the former approach of using the IntersectionObserver
to plain lazy loading of images.
Hint: Unfortunately, this partially breaks the search functionality as only displayed items are searchable.
Motivation and Context
Currently, the huge amount of >800 mons and the corresponding amount of html nodes freezes mobile browsers when the filter dialog is opened.
How Has This Been Tested?
Own instance on desktop (OSX) and mobile (Android) Chrome.
Screenshots (if appropriate):
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
Question 1: shall I only enable this feature on mobile browsers as it seems to be not a problem on desktop?
Question 2: do you think it's worth looking for a possible solution to the broken search?
Thank you for your PR.
Question 1: shall I only enable this feature on mobile browsers as it seems to be not a problem on desktop?
Having better performance should be on every device, we don't know if our users are using potatoes computers on par with a mobile device.
Question 2: do you think it's worth looking for a possible solution to the broken search?
I believe that would be mandatory, since the search is really useful. The search would require a refactor to make both those features work together. Maybe rebuilding the filter list after a search could solve this. But this might slow down the search, and this new feature might have been for nothing. 🤔
Thank you for your input. I will see if I can find any solution to the search....