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

fix(files): Do not jump to top when fileId is set to currentFolder #48632

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

artonge
Copy link
Contributor

@artonge artonge commented Oct 9, 2024

Fix #48545

Fix #48545

Signed-off-by: Louis Chemineau <louis@chmn.me>
@artonge artonge requested a review from skjnldsv as a code owner October 9, 2024 16:24
@artonge artonge requested a review from susnux October 9, 2024 16:24
@artonge artonge self-assigned this Oct 9, 2024
@artonge artonge added this to the Nextcloud 31 milestone Oct 9, 2024
@artonge
Copy link
Contributor Author

artonge commented Oct 9, 2024

/backport to stable29

@artonge
Copy link
Contributor Author

artonge commented Oct 9, 2024

/backport to stable30

@susnux
Copy link
Contributor

susnux commented Oct 9, 2024

Seems like bandage (but ok for a quick fix I would say)

I think the underlying issue is we have two properties for three states:

States:

  1. Sidebar open
  2. File open
  3. File focused

(3 is needed because of virtual scrolling to preserve the correct files in view).

Properties that control the states:

  1. openFile
  2. Fileid in route

So I think the best solution would be to add a new query part: details for information if the sidebar should be opened.

So we end up with:

  • /files/123: Focus file 123
  • /files/123?openFile: Open the file 123 with default action (viewer)
  • /files/123?details: Open the sidebar for file 123
  • /files/123?details&openFile: Open the sidebar for file 123 while the viewer is open

This would allow to reload the page at any state and the same view will be created as before the reload. What do you think @skjnldsv @artonge ?

@artonge
Copy link
Contributor Author

artonge commented Oct 9, 2024

Maybe, but quick fix is enough 🙈.

@artonge artonge enabled auto-merge October 9, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Regression NC29.0.8rc1 - View jumps to top after file close for long file lists
2 participants