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

Virtualize beatmap listing #3001

Merged
merged 5 commits into from Apr 17, 2018

Conversation

3 participants
@notbakaneko
Contributor

notbakaneko commented Apr 13, 2018

sort of fixes #2117

Virtualizes the beatmap listing to keep it fast after scrolling through many pages.

I gave up on using react-virtualized and opted to forkreact-virtual-list to make it work with our flexbox layout on the page instead, since:

  • it required way too many changes to work
  • didn't do a very good job of restoring the scroll position when navigating back in history.
  • this option turned out to be massively simpler ( ゚ ヮ゚)

It doesn't eject the already loaded data yet

@nanaya

This comment has been minimized.

Collaborator

nanaya commented Apr 16, 2018

This seems to work...?

https://0paste.com/20671-fae0f485.txt

@notbakaneko

This comment has been minimized.

Contributor

notbakaneko commented Apr 16, 2018

kind of wanted to avoid the whole row wrapper element thing.

Also pushing the column count through as props to the virtual list causes it to render the correct height when the list is at the end and the window resizes wider; otherwise we'd have to store the chunked list somewhere or keep track of something to tell it to recalculate at that point

@notbakaneko

This comment has been minimized.

Contributor

notbakaneko commented Apr 16, 2018

keeping columnCount in state should allow it to rerender, though, hmm...

@nanaya

This comment has been minimized.

Collaborator

nanaya commented Apr 16, 2018

Not sure if forking the thing is better idea though. The project itself doesn't seem to be completely dead either.

@notbakaneko

This comment has been minimized.

Contributor

notbakaneko commented Apr 16, 2018

ok, apparently just changing items only isn't enough to make it update the height of the scroll area ಠ_ಠ

@notbakaneko notbakaneko added the WIP label Apr 16, 2018

@notbakaneko notbakaneko removed the WIP label Apr 17, 2018

@notbakaneko

This comment has been minimized.

Contributor

notbakaneko commented Apr 17, 2018

rebased and sorta squashed whee

@@ -53,7 +53,7 @@
@input-color: @gray-dark;
@input-border-focus: @pink;
@screen-sm-min: 900px; // sync with osu.isDesktop
@screen-sm-min: 900px; // sync with osu.isDesktop, react/beatmaps/main.coffee

This comment has been minimized.

@notbakaneko

notbakaneko Apr 17, 2018

Contributor

should probably figure out a way to import this into scripts

This comment has been minimized.

@nanaya

nanaya Apr 17, 2018

Collaborator

why not use the isDesktop function? ಠ_ಠ

This comment has been minimized.

@notbakaneko

notbakaneko Apr 17, 2018

Contributor

owait :D

notbakaneko and others added some commits Apr 17, 2018

@nanaya

nanaya approved these changes Apr 17, 2018

@nanaya nanaya merged commit 8c94dcb into ppy:master Apr 17, 2018

2 checks passed

continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@notbakaneko notbakaneko deleted the notbakaneko:feature/virtualize-beatmap-listing-smaller branch Apr 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment