fix: retain dock order when lifecycle conditions are triggered #676
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.
Let me know if you can think of a better way todo this.
But... when you launch a platform. Reorder the dock entries then toggle the scheme (e.g. light -> dark) this causes the dock to be "refreshed":
workspace-starter/how-to/workspace-platform-starter/client/src/framework/workspace/dock.ts
Line 85 in 2e0d2a1
which uses
dockProviderOptions
here:workspace-starter/how-to/workspace-platform-starter/client/src/framework/workspace/dock.ts
Line 188 in 2e0d2a1
this is not updated when the dock is reordered (it's only set when the dock is initially registered)
Hence, when we call
updateDockProviderConfig
, the order is then incorrect.This PR fixes this behavious, by when
saveConfig
is called, it updates thedockProviderOptions.entries
variable to reflect the new order.