fix: load indirect shares in editors - #3313
Conversation
9b73947 to
0249e75
Compare
JammingBen
left a comment
There was a problem hiding this comment.
Thanks! One nitpick from my side, plus it needs a rebase.
| } | ||
|
|
||
| if (isLocationCommonActive(router, 'files-common-search')) { | ||
| if (isLocationCommonActive(router, 'files-common-search') || unref(isAppActive)) { |
There was a problem hiding this comment.
I think we should check for the absence of resourcesStore.currentFolder here. If that is missing, that's an indicator that ancestor meta data needs to be loaded.
There was a problem hiding this comment.
Done — the condition now checks !resourcesStore.currentFolder instead of the app-active flag, and the branch is rebased on current main (kept the new includeInheritedShares short-circuit in front of it).
The test now covers three cases: ancestor metadata is loaded on the search page, loaded when no current folder is set, and not loaded when one is. The middle case fails without the new clause.
There was a problem hiding this comment.
You can remove the check for isLocationCommonActive(router, 'files-common-search') now though, it's covered by !resourcesStore.currentFolder already.
0249e75 to
de75a68
Compare
Description
Editor routes load files without the folder loader, so ancestor metadata stays empty. The sharing sidebar then has no ancestor IDs from which to load indirect shares.
Load ancestor metadata when the share loader runs inside an editor. The regression test covers both search and editor routes.
Related Issue
How Has This Been Tested?
Types of changes