Skip to content

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

Merged
skjnldsv merged 1 commit into
masterfrom
artonge/fix/file_list_jump_on_viewer_close
Oct 29, 2024
Merged

fix(files): Do not jump to top when fileId is set to currentFolder#48632
skjnldsv merged 1 commit into
masterfrom
artonge/fix/file_list_jump_on_viewer_close

Conversation

@artonge

Copy link
Copy Markdown
Collaborator

@artonge
artonge requested a review from skjnldsv as a code ownerOctober 9, 2024 16:24
@artonge
artonge requested a review from susnuxOctober 9, 2024 16:24
@artongeartonge self-assigned this Oct 9, 2024
@artongeartonge added this to the Nextcloud 31 milestone Oct 9, 2024
@artonge

Copy link
Copy Markdown
CollaboratorAuthor

/backport to stable29

@artonge

Copy link
Copy Markdown
CollaboratorAuthor

/backport to stable30

@susnux

Copy link
Copy Markdown
Contributor

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
Copy Markdown
CollaboratorAuthor

Maybe, but quick fix is enough 🙈.

@artonge
artonge enabled auto-merge October 9, 2024 18:14
@artonge
artonge requested review from Pytal and nfebeOctober 21, 2024 09:52
Fix#48545
Signed-off-by: Louis Chemineau <louis@chmn.me>
@skjnldsv

Copy link
Copy Markdown
Member

Rebased

@skjnldsvskjnldsv 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
skjnldsvforce-pushed the artonge/fix/file_list_jump_on_viewer_close branch from c79368f to 7b27d05CompareOctober 29, 2024 10:43
@skjnldsv
skjnldsv disabled auto-merge October 29, 2024 10:44
@skjnldsv
skjnldsv enabled auto-merge October 29, 2024 10:44
@skjnldsv
skjnldsv merged commit 4b59c99 into masterOct 29, 2024
@skjnldsv
skjnldsv deleted the artonge/fix/file_list_jump_on_viewer_close branch October 29, 2024 13:14
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releaseReady to be released and/or waiting for tests to finishbugfeature: filesjavascript

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

@artonge@susnux@skjnldsv@Pytal