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

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

artonge
Copy link
Contributor

@artonge artonge commented Oct 9, 2024

Fix #48545

@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
@artonge artonge requested review from nfebe and Pytal October 21, 2024 09:52
@skjnldsv
Copy link
Member

Rebased

@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Oct 29, 2024
@skjnldsv skjnldsv force-pushed the artonge/fix/file_list_jump_on_viewer_close branch from c79368f to 7b27d05 Compare October 29, 2024 10:43
@skjnldsv skjnldsv merged commit 4b59c99 into master Oct 29, 2024
118 checks passed
@skjnldsv skjnldsv deleted the artonge/fix/file_list_jump_on_viewer_close branch October 29, 2024 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug feature: files javascript
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
4 participants