Skip to content

Conversation

@inthreedee
Copy link
Member

Fixes #16510

Switching to grid view from list view can break the scrolling and fail to load more files. In this situation, only the files that were visible in list view are initially displayed. In a large enough browser window and/or high enough screen resolution, this could mean a lot of empty space on the page, and scrolling to load the rest of the files is broken/not possible.

To solve this, I used the same solution that currently exists when toggling hidden files:

if (!showHidden) {
// hiding files could make the page too small, need to try rendering next page
self._onScroll();
}

One question though: I'm stepping into the Nextcloud code for the first time. When searching the code, I found the same onGridViewChange function here, but I have no idea what this file does. It doesn't seem to implement the on_scroll function so the fix can't be applied here anyway. So I assume no changes are needed here?

_onGridviewChange: function () {

Signed-off-by: Jonathan Matthews <jgit@pixelnet.work>
@kesselb kesselb requested review from juliusknorr and skjnldsv and removed request for juliusknorr August 19, 2019 19:44
@kesselb kesselb added 3. to review Waiting for reviews bug labels Aug 19, 2019
@kesselb kesselb added this to the Nextcloud 17 milestone Aug 19, 2019
@kesselb kesselb requested a review from juliusknorr August 19, 2019 19:44
@juliusknorr
Copy link
Member

One question though: I'm stepping into the Nextcloud code for the first time. When searching the code, I found the same onGridViewChange function here, but I have no idea what this file does. It doesn't seem to implement the on_scroll function so the fix can't be applied here anyway. So I assume no changes are needed here?

The file (or that part of it) is related to the file picker dialog which also has a grid view toggle but that one doesn't seem to have the issue as the file list is always fully loaded.

@inthreedee
Copy link
Member Author

@juliushaertl I see that now, thank you very much for the explanation.

@rullzer rullzer merged commit 89d7ffe into nextcloud:master Aug 21, 2019
@welcome
Copy link

welcome bot commented Aug 21, 2019

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22
Most developers hang out on IRC. So join #nextcloud-dev on Freenode for a chat!

@inthreedee inthreedee deleted the gridview-fix branch August 21, 2019 20:39
@rullzer rullzer mentioned this pull request Aug 22, 2019
@inthreedee
Copy link
Member Author

/backport to stable16

@backportbot-nextcloud
Copy link

backport to stable16 in #17342

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

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Grid view does not display all images in large directory

4 participants