Fix: Restore palette selection after theme switch#5892
Fix: Restore palette selection after theme switch#5892rashi-cse wants to merge 2 commits intosugarlabs:masterfrom
Conversation
- Store selector TR elements in selectorRows array for state restoration - Convert palette NAME to group INDEX using MULTIPALETTES - Clear palette DOM and rebuild selectors on theme change - Restore selection using showSelection() and makePalettes() - No longer requires hover to update palette UI
|
✅ All Jest tests passed! This PR is ready to merge. |
|
✅ All Jest tests passed! This PR is ready to merge. |
|
Good fix, maybe you could handle the theme change for blocks too |
|
@zealot-zew Thanks! Good suggestion. |
|
Hi @Commanderk3 and @zealot-zew, From investigating the theme switch flow, it seems that when the theme changes, I started working on this issue but ran into some unexpected behavior with block rendering and palette interaction. I'll pause work on this for now and may revisit later if needed. Thanks! |
Fix: Restore active palette state after theme change #5825 (Issue)
Summary
This PR fixes a UI synchronization issue where switching themes caused the active palette selection to lose its highlighted state until a hover interaction occurred.
Changes
<tr>elements in aselectorRowsarray to preserve stateMULTIPALETTESshowSelection()andmakePalettes()Result
Preview of the change:
preview.mov