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

[stable25] Fix missing files:navigation:changed when clicking on a dir in the favorites view #36683

Conversation

julien-nc
Copy link
Member

@julien-nc julien-nc commented Feb 13, 2023

While being in the favorites view, if one clicks a directory, the files:navigation:changed event is not emitted so Text can't update the rich workspace visibility.

This fixes nextcloud/text#3697 but has the side effect to emit the event twice when clicking on the "Favorites" nav item while being in the "All files" view.
As files:navigation:changed is only listened by Text, it does not seems too bad.

An alternative fix would be to remove the silent option from

OCA.Files.App.setActiveView('files', {silent: true});

but we don't know exactly what side effect it could have.

@julien-nc
Copy link
Member Author

@juliushaertl Problem is, in https://github.com/nextcloud/server/blob/fix/stable25/files.navigation.changed-when-entering-favorite-dir/apps/files/js/app.js#L311
_onNavigationChanged is not called when clicking on a directory in the Favorites view. IMO it should be called because we "leave" the favorites view to enter a directory so we're back in the "All files" view. This is what's missing for Text to recompute the rich workspace visibility.

I checked and the urlChanged event is emitted when clicking on the "All files" entry in the navigation menu but not when entering a directory in the favorites view.

@julien-nc julien-nc force-pushed the fix/stable25/files.navigation.changed-when-entering-favorite-dir branch from 94702ad to 3426c87 Compare February 20, 2023 10:24
@julien-nc julien-nc changed the title [stable25] Fix missing files:navigation:changed when entering a favorite dir [stable25] Fix missing files:navigation:changed when clicking on a dir in the favorites view Feb 20, 2023
@julien-nc julien-nc requested a review from danxuliu February 20, 2023 10:29
@julien-nc
Copy link
Member Author

Rebased on stable 25
Updated the PR description.
Ready for review.

@julien-nc julien-nc marked this pull request as ready for review February 20, 2023 10:31
@juliusknorr
Copy link
Member

/rebase

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@nextcloud-command nextcloud-command force-pushed the fix/stable25/files.navigation.changed-when-entering-favorite-dir branch from 3426c87 to 7ef3f37 Compare March 6, 2023 13:32
@juliusknorr juliusknorr merged commit d3c148f into stable25 Mar 6, 2023
@juliusknorr juliusknorr deleted the fix/stable25/files.navigation.changed-when-entering-favorite-dir branch March 6, 2023 22:32
@blizzz blizzz mentioned this pull request Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants