Skip to content
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

Avoid cumulative layout shifts on Files pages #2834

Closed
artfulrobot opened this issue Aug 25, 2022 · 1 comment
Closed

Avoid cumulative layout shifts on Files pages #2834

artfulrobot opened this issue Aug 25, 2022 · 1 comment
Labels

Comments

@artfulrobot
Copy link

Loading a files page shows the following:

  1. contents of a readme
  2. list of recent files
  3. list of the files

The problem is that (3) typically loads first, then (2) then (1). But 2 and 1 cause cumulative layout shifts (CLS) which means things like: you click on one folder, but just as you click, the layout shifts and now you've clicked on a different one - but you might not notice until the next page loads.

On my server (which is not going to win prizes for being high-end) the loading times for (2) and (1) can be anywhere up to a minute! So it's anyone's guess where your click is going to land. I have NC on a better server and there the problem is not so pronounced, but it is still a problem - you're waiting maybe 8-10s to be able to trust the interface has settled.

Screencast from 25-08-22 11:25:30

Describe the solution you'd like

A really simple solution would be to fix the amount of space allowed for README and recent files so that the layout shift is avoided.

Performance improvements could also really help.

Describe alternatives you've considered

I've considered looking for a way to turn off README and recent docs, but they have their uses.

@artfulrobot artfulrobot added 0. Needs triage enhancement New feature or request labels Aug 25, 2022
@szaimen szaimen transferred this issue from nextcloud/server Aug 25, 2022
@marcelklehr marcelklehr changed the title Avoid CLS problems on Files pages Avoid cumulative layout shifts on Files pages Oct 20, 2022
@juliusknorr juliusknorr moved this to 🧭 Planning evaluation (don't pick) in 📝 Office team Nov 21, 2022
mejo- added a commit that referenced this issue Jun 7, 2023
Instead of only increasing page height with growing document length,
let's stick to a fixed height (30vh) and use that one already while
loading the document.

Fixes: #2834
Fixes: #2803

Signed-off-by: Jonas <[email protected]>
mejo- added a commit that referenced this issue Jun 7, 2023
Instead of only increasing page height with growing document length,
let's stick to a fixed height (30vh) and use that one already while
loading the document.

Fixes: #2834
Fixes: #2803

Signed-off-by: Jonas <[email protected]>
mejo- added a commit that referenced this issue Jun 7, 2023
Instead of only increasing editor height with growing document length,
let's stick to a fixed height (25vh) and use that one already while
loading the document.

The editor still increases when it gets focused.

Fixes: #2834
Fixes: #2803

Signed-off-by: Jonas <[email protected]>
mejo- added a commit that referenced this issue Jun 14, 2023
Instead of only increasing editor height with growing document length,
let's stick to a fixed height (25vh) and use that one already while
loading the document.

The editor still increases when it gets focused.

Fixes: #2834
Fixes: #2803

Signed-off-by: Jonas <[email protected]>
mejo- added a commit that referenced this issue Jun 14, 2023
Instead of only increasing editor height with growing document length,
let's stick to a fixed height (150px) and use that one already while
loading the document.

The editor still increases when it gets focused.

Fixes: #2834
Fixes: #2803

Signed-off-by: Jonas <[email protected]>
@juliusknorr
Copy link
Member

Fixed by #2834

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants