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

Bugfix: Redirect when server file is renamed #17663

Merged
merged 23 commits into from
Nov 29, 2024

Conversation

madsrasmussen
Copy link
Contributor

@madsrasmussen madsrasmussen commented Nov 28, 2024

Fixes: #16488

This (PR) addresses the issue where a renamed file system workspace enters an "undefined" state. The problem arises because the file name serves as the unique identifier for the workspace. When the file name is changed, the unique identifier is also changed, causing the workspace to become "undefined." To resolve this, we need to notify the workspace about both the unique before the change and after the change, allowing us to target the correct workspace and redirect it to the new path.

The PR introduces the UmbServerFileRenameWorkspaceRedirectController, which listens for a ServerFileRenamed action event. This event includes both the previous and new uniques. If the currently open workspace matches the event, the controller will redirect it to the new location.

What to test:

  • Ensure that if you rename a file system file (script, stylesheet, or partial view) that is currently open that it will redirect the workspace to the new location.
Kapture.2024-11-29.at.08.50.36.mp4

@madsrasmussen madsrasmussen marked this pull request as ready for review November 29, 2024 07:52
Copy link
Member

@nielslyngsoe nielslyngsoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool

@nielslyngsoe nielslyngsoe merged commit c4b0bde into v15/dev Nov 29, 2024
8 of 11 checks passed
@nielslyngsoe nielslyngsoe deleted the v15/bugfix/rename-server-file-redirect branch November 29, 2024 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants