-
Notifications
You must be signed in to change notification settings - Fork 105
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
Update editor tab on member rename #1907
Update editor tab on member rename #1907
Conversation
I will have a formal review in later for this, but should we consider implementing the same for stream files? Perhaps the function you added to get the tab should be part of Tools? |
* The findMemberTab function is now defined in Tools.js as a function of the Tools namespace
Two things:
|
I will add the check to the IFS browser, and also resolve the conflicts. |
* The IFS browser no longer allows the user to rename/move a file if the user is currently editing the file and there are unsaved changes * When the user renames or moves an IFS file, all tabs where the file was open are now closed and reopened with the new file path * Rewrote function findMemberTab as findUriTabs; the function now accepts URIs for members or streamfiles, and returns all tabs in which the resource is open (instead of just one) * Added helper function areEquivalentUris to check whether two URIs (both assumed to represent members or streamfiles) are equivalent
I made a few more commits; the new logic should now apply to the IFS browser as well as the object browser. Also, I noticed that if I use the IFS browser to rename/move an IFS file to a new path, if an IFS file already exists at the new path, it will be overwritten. Is that the intended behavior? (I ask because if I try to do the same thing using the IFS utility in ACS, the operation fails and no files are modified.) If it's a problem, I wouldn't mind looking into it. |
@chrjorgensen What do you you think about @steph-beneschan-256's finding of the file being overwritten? |
@worksofliam It has always been like that - since the command executed on the server is a I think our users has gotten used to this behavior, we don't have any issues about this... |
src/locale/ids/fr.json
Outdated
@@ -127,6 +127,8 @@ | |||
"enddbgsvr.succeeded": "Serveur de débogage arrêté.", | |||
"error": "erreur", | |||
"errors": "erreurs", | |||
"file.path.not.parsed": "The file path could not be parsed.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebjulliand French - pleeeease! 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@steph-beneschan-256 I tested this PR and it worked great. 👍
I also changed the texts into localized strings and translated into Danish.
@sebjulliand Could you translate the French texts and make the final approvement?
Co-authored-by: Sébastien Julliand <[email protected]>
Co-authored-by: Sébastien Julliand <[email protected]>
Co-authored-by: Sébastien Julliand <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved!
Changes
This is meant to provide a workaround to issue #1554 . It seems that the VS Code API does not let us directly change an open tab's label or uri, so instead I opted to have the system close the tab, then open a new one with the updated uri. Notably, the new tab will not necessarily be in the same position as the old one.
Hopefully this will suffice as a temporary solution, but I will continue to look into this.
Checklist
console.log
s I added