Conversation
0bc7e5e to
87927e5
Compare
9998b21 to
fc91cf3
Compare
artonge
commented
Sep 12, 2024
Comment on lines
275
to
283
| // If the Sidebar is closed and if openFile is false, remove the file id from the URL | ||
| if (OCA.Files.Sidebar.file === '') { | ||
| window.OCP.Files.Router.goToRoute( | ||
| null, | ||
| { ...this.$route.params, fileid: undefined }, | ||
| this.$route.query, | ||
| ) | ||
| } | ||
|
|
Contributor
Author
There was a problem hiding this comment.
Not exactly a Viewer close event, but does the job.
susnux
reviewed
Sep 12, 2024
fc91cf3 to
1800d87
Compare
susnux
approved these changes
Sep 12, 2024
Contributor
susnux
left a comment
There was a problem hiding this comment.
makes sense (ideally add a cypress tests), only thing I am not sure about if this really should be inside the virtual file list. But code makes sense and seems to work fine.
1800d87 to
11ff3d0
Compare
skjnldsv
approved these changes
Sep 14, 2024
11ff3d0 to
bb2d8e1
Compare
skjnldsv
approved these changes
Sep 14, 2024
When the viewer or the sidebar is opened, we add the fileid to the route. When both of them are closed, we do not remove the fileid from the route. This means that, upon reload, the sidebar will be opened even though it was closed previously. This PR ensure that the fileid is removed from the route when both the Sidebar and the Viewer are closed. Signed-off-by: Louis Chemineau <louis@chmn.me>
bb2d8e1 to
2da1c57
Compare
Member
|
Backports ? |
Contributor
Author
|
/backport to stable30 |
Contributor
Author
|
/backport to stable29 |
Contributor
Author
|
/backport to stable28 |
2 tasks
This was referenced Sep 15, 2024
Closed
8 tasks
Merged
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.
When the viewer or the sidebar is opened, we add the fileid to the route.
When both of them are closed, we do not remove the fileid from the route.
This means that, upon reload, the sidebar will be opened even though it was closed previously.
This PR ensure that the fileid is removed from the route when both the Sidebar and the Viewer are closed.
Screencast.from.2024-09-12.15-38-42.mp4