tidy,fix(ui): remove unused coords from params slice #8534
Merged
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.
Summary
While working on something else, I noticed there was some extra data in the params slice that was left-over Invoke v6 (x/y coords). This data was added when we created the Generate tab and gave it its own width and height settings, separate from Canvas. The bbox logic from Canvas was copied over, but we didn't remove the x/y coords.
I removed this data, added a migration, and then noticed there was an issue w/ state rehydration that caused the params slice to be reset. After some investigation I noticed that there was a design issue with state rehydration and redux slice migration in some rare scenarios. I fixed it in this PR.
Fixing this cleanly has a knock-on effect - when adding data to a redux slice, you must write a slice migration, else rehydration will fail and reset the user's data! I've updated the PR template so we are reminded to not miss this step when making changes in the future.
Related Issues / Discussions
n/a
QA Instructions
n/a
Merge Plan
n/a
Checklist
What's New
copy (if doing a release after this PR)