Page size calculation based on real page height#11524
Page size calculation based on real page height#11524PVince81 merged 8 commits intoowncloud:masterfrom nazar-pc:patch-1
Conversation
This is fix for #10060 Instead of hard coding page size as 20 items, we check real page height, and divide by 50 (height of one row). This will allow to load fewer items on small screens and enough items on large screens (4k, portrait orientation, etc.). Also checking page height on every load to respond on browser window resizing,
|
Thanks a lot for your contribution! Contributions to the core repo require a signed contributors agreement http://owncloud.org/contribute/agreement/ Alternatively you can add a comment here stating that this contribution is MIT licensed. Some more details about out pull request workflow can be found here: http://owncloud.org/code-reviews-on-github/ |
1 similar comment
|
Thanks a lot for your contribution! Contributions to the core repo require a signed contributors agreement http://owncloud.org/contribute/agreement/ Alternatively you can add a comment here stating that this contribution is MIT licensed. Some more details about out pull request workflow can be found here: http://owncloud.org/code-reviews-on-github/ |
|
I'm agree this to be public domain) |
|
@owncloud-bot ok to test |
|
💣 Test FAILed. 💣 |
apps/files/js/filelist.js
Outdated
There was a problem hiding this comment.
Please use this.$el instead of the absolute selector (I believe it should be the same element)
There was a problem hiding this comment.
Fixed by using this.$el.parent() to get access to proper element.
|
Thanks a lot for this nice fix! 😄 I suspect this will break the unit tests which are expecting a page size of 20. Like this: Then in Let me know if you need further help. |
|
Thanks a lot for your contribution! Contributions to the core repo require a signed contributors agreement http://owncloud.org/contribute/agreement/ Alternatively you can add a comment here stating that this contribution is MIT licensed. Some more details about out pull request workflow can be found here: http://owncloud.org/code-reviews-on-github/ |
That is why we use `this.$el.parent()` instead
|
I wonder whether this.$scrollContainer would be better. Have you tried the public link page with your fix, for a folder with many files ? (share with link) (I haven't tested your PR yet) |
|
@PVince81, all tests locally finished without errors, can you check once again? |
|
See #11590 |
|
@PVince81, I think you meant |
|
Great, the code looks good. Thanks. This will need another reviewer @owncloud/designers @MorrisJobke |
|
@MorrisJobke just heard you had a portrait mode screen, ideal to test this 😉 |
;) |
|
Works 👍 (But I don't even had problems on master) But this approach is much more generic. |
|
I have 2160px height in landscape mode, and 3840px in portrait (4k monitor), so, probably, you didn't reach limits. |
|
@nazar-pc, thanks for fixing this! Just tested this all-in-one and it worked for me with browser windows in portrait mode. |
|
I have 1536 px in portrait mode. And I cherry-picked the commits to stable7 (as I can reproduce the issue there) and it fixes the issue -> thanks for the fix |
|
Did you guys all test both the main file list and public sharing page ? The code looks good 👍 |
|
@PVince81 I just checked the main file list. |
|
Just tried it out in normal mode (not portrait) and it still works correctly. Running |
|
Fixed, tests doesn't fail anymore. |
|
The inspection completed: No new issues |
|
Excellent. Let's wait for Jenkins to give green light then this can be merged. |
|
@owncloud-bot retest this please |
|
💣 Test FAILed. 💣 Build result: FAILUREGitHub pull request #11524 of commit 8198e70 automatically merged.Building remotely on vm-slave-02 (SLAVE) in workspace /var/jenkins/workspace/pull-request-analyser-ng-simple > git rev-parse --is-inside-work-tree # timeout=10Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/owncloud/core.git # timeout=10Fetching upstream changes from https://github.com/owncloud/core.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse origin/pr/11524/merge^{commit} # timeout=10Checking out Revision ce79b57a2aac7c8dce6c8cde695aa79f33e6acb0 (detached) > git config core.sparsecheckout # timeout=10 > git checkout -f ce79b57a2aac7c8dce6c8cde695aa79f33e6acb0 > git rev-list c37ebe42efe2574fa2b829aff57528d9e5412a8a # timeout=10 > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » vm-slave-02pull-request-analyser-ng-simple » vm-slave-02 completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 2 second💣 Test FAILed. 💣 |
|
@owncloud-bot retest this please |
|
Jenkins still clumsy... |
|
💣 Test FAILed. 💣 Build result: FAILUREGitHub pull request #11524 of commit 8198e70 automatically merged.Building remotely on vm-slave-02 (SLAVE) in workspace /var/jenkins/workspace/pull-request-analyser-ng-simple@3 > git rev-parse --is-inside-work-tree # timeout=10Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/owncloud/core.git # timeout=10Fetching upstream changes from https://github.com/owncloud/core.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse origin/pr/11524/merge^{commit} # timeout=10Checking out Revision ce79b57a2aac7c8dce6c8cde695aa79f33e6acb0 (detached) > git config core.sparsecheckout # timeout=10 > git checkout -f ce79b57a2aac7c8dce6c8cde695aa79f33e6acb0 > git rev-list c37ebe42efe2574fa2b829aff57528d9e5412a8a # timeout=10 > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » vm-slave-02pull-request-analyser-ng-simple » vm-slave-02 completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 2 second💣 Test FAILed. 💣 |
|
Forget Jenkins... I'll run the tests locally. |
|
JS tests run locally (this is a JS-only PR) -> merging |
Page size calculation based on real page height
|
@karlitschek backport ? |
|
I realized that 7.0.3 for whatever reason doesn't contain this fix, what happened? I still have 20 items in list. |
|
And 7.0.2 too |
|
Seems we missed backporting this bugfix @karlitschek @craigpg |
|
Please backport. after 7.0.4 Thanks |
|
CC @jnfrmarks |
|
@nazar-pc I did add a patch to the OC 7.x forums as soon as I saw it wasn't included |
|
Just made cherry-pick of this pull request merge into stable7: #12624 |
|
@nazar-pc Thanks. But we need to wait until the 7.0.4 freeze is over and 7.0.4 is released. |
|
So, it may get into 7.0.5? |
|
Correct |
Backport of #11524 into stable7
This is fix for #10060
Instead of hard coding page size as 20 items, we check real page height, and divide by 50 (height of one row).
This will allow to load fewer items on small screens and enough items on large screens (4k, portrait orientation, etc.).
Also checking page height on every load to respond on browser window resizing,