fix: folder tree selection after any action in main content#59359
Open
mykh-hailo wants to merge 1 commit intonextcloud:masterfrom
Open
fix: folder tree selection after any action in main content#59359mykh-hailo wants to merge 1 commit intonextcloud:masterfrom
mykh-hailo wants to merge 1 commit intonextcloud:masterfrom
Conversation
Signed-off-by: mykh-hailo <kristianderonta0205@gmail.com>
skjnldsv
reviewed
Apr 1, 2026
Comment on lines
+32
to
+43
| const isFolderTreeNode = computed(() => props.view.id.startsWith(`${folderTreeId}::`)) | ||
| const isDirectoryActive = computed(() => { | ||
| if (!isFolderTreeNode.value) { | ||
| return false | ||
| } | ||
|
|
||
| const currentView = String(route.params?.view ?? '') | ||
| const currentDir = normalizeDir(route.query?.dir) | ||
| const viewDir = normalizeDir(props.view.params?.dir) | ||
|
|
||
| return currentView === folderTreeId && currentDir === viewDir | ||
| }) |
Member
There was a problem hiding this comment.
Can't really say I'm happy to see custom view code into a global component, but I don't really see a better way, that's correct yeah 🤔
Contributor
There was a problem hiding this comment.
Seems like a router issue / design problem.
Because the URL is bound to active file not active folder (/files/ACTIVEFILE?dir=ACTIVEFOLDER vs /files/ACTIVEFOLDER?file=ACTIVEFILE)
So this happens because we se the to of the view to /files/FOLDERID right?
Does it work if we instead just use "additional params" and use the dir param?
Contributor
Author
There was a problem hiding this comment.
@susnux that can be a great idea.
Let me update the code on your comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
his PR improves UI behavior and layout consistency in file navigation.
It fixes incorrect selection behavior in the Files left sidebar for folder-tree entries.
Checklist
3. to review, feature component)stable32)AI (if applicable)