Repository navigation
Conversation
|
I have one reluctance: if a tab is ordered and the editor is reloaded without deployment, the restored tab will not be correctly ordered because it does not respect the flows file order. |
|
The tab order is determined by the flow file. We shouldn't be reordering regular flow tabs based on undeployed state. The scope of this should be limited to ensuring any subflows that were previously open are reopened in the expected order. |
|
I thought that it was to keep any changes done to the tabs in the editor regardless of the deployed state, so that when the User reopens the app his ongoing work is restored. This helps reducing cognitive load because I don't need to reorganize my workspace again before restarting the work where I left |
|
From the linked forum post that raised the requirement:
That's the core requirement here. |
Ok, it makes sense. But I think that what the User really meant is what @GogoVega is doing in this PR. The guy of the request even gave a ❤️ to the PR, which I interpreted as Acknowledgment of what it was done. |
|
Can the requeriment be clarified with the User before throwing away the work? |
|
If the user reorders their tabs and reloads the editor, they will be prompted to deploy before losing unsaved changes. They have to make a choice to abandon their changes. If they wanted to keep the tab order, they can hit deploy. What they cannot do is restore all of the open subflows automatically for themselves. That is the scope we should be addressing. We will address the subflow part. I do not want the editor restoring partial unsaved state. |
What is the problem you see if the unsaved tab order was restored after, maybe, an unexpected grid outage that did not let the User hit deploy? Wouldn't it be beneficial to Users if they didn't lose their hard work in such aforementioned scenarios? Maybe we can reach an agreement to show a message upon opening the editor such as "You have undeployed changes. Would you like to restore these changes?"
|
|
We can combine the two functionalities; we just need to make sure that the order matches that of the flow file. |
Types of changes
Proposed changes
Ref: https://discourse.nodered.org/t/editor-save-tabs-display-and-order-between-web-page-loads/99486
Restore tab order from last session. This also includes subflows, they will be opened and ordered.
The local storage name is
tabOrderand it's an array.Notes:
Checklist
npm run testto verify the unit tests pass