fix: folder tree selection after any action in main content#59359
fix: folder tree selection after any action in main content#59359mykh-hailo wants to merge 1 commit intonextcloud:masterfrom
Conversation
| 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 | ||
| }) |
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 🤔
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?
There was a problem hiding this comment.
@susnux I update some codes to make tree view selection works properly as expected.
For a technical overview, I have the FolderNavigationListItem to be active according to dir parameter of the route.
I'd appreciate it if you review and share any opinion on it.
86139a8 to
8306091
Compare
8e5c85f to
a7172a3
Compare
|
@susnux I updated the code with the latest master branch. |
aaf8ec9 to
f7243b8
Compare
a43ee10 to
be24676
Compare
Signed-off-by: mykh-hailo <kristianderonta0205@gmail.com>
be24676 to
69fe46e
Compare
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)