- Issue created by @hooroomoo
- 🇺🇸United States hooroomoo
I think it makes sense to do this after 🐛 Auto-save changes from code editor get lost if you navigate out too quickly Active which will hopefully get in soon.
There is a @todo in there that points to this issue to add checking for props/slots changes and block navigation until that's been auto-saved.
- 🇺🇸United States hooroomoo
- 🇮🇳India meghasharma
I’m able to reproduce the issue — when I update props or slots under the Component Data tab without making any changes in the JS or CSS tabs, the updates are not auto-saved.
- 🇮🇳India meghasharma
I’d like to start working on a fix, but I couldn’t locate the file where the auto-save logic should be added for props or slots updates. Could you please point me to the right place to make this change? Thank you!
- 🇺🇸United States hooroomoo
Hi @meghasharma, the todo is under the proposed resolution in the second bullet, but I can see how that could be easy to miss.
if you do a search for this issue number "3525907" in the codebase, there is a todo inside of
/ui/src/features/code-editor/hooks/useSourceCode.ts
which is where the change should be made. - 🇮🇳India meghasharma
Hi @hooroomoo,
Thanks for the info. I tried the following in useSourceCode.ts:
Added deep comparison for props and slots using lodash/isEqual.
Updated refs to track changes in props and slots.
Triggered auto-save when props, slots, or source code change.
Verified dispatching compiled JS and CSS updates.But the issue with auto-save losing changes on quick navigation still happens.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
There's no indication that this didn't end up getting saved, and there's no way to explicitly save what's currently in the code component editor (everything goes through auto-save). So bumping priority and tagging .
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Per @lauriii in chat: this is a borderline beta blocker.
- 🇺🇸United States hooroomoo
I don't consider this a novice issue after working on it
- 🇺🇸United States hooroomoo
@wim-leers No need to apologize! 🙂I thought it'd be a simpler fix before working on it too
- First commit to issue fork.
-
balintbrews →
committed 303c252c on 0.x authored by
hooroomoo →
Issue #3525907 by hooroomoo, balintbrews, meghasharma, wim leers,...
-
balintbrews →
committed 303c252c on 0.x authored by
hooroomoo →
- 🇳🇱Netherlands balintbrews Amsterdam, NL
This is beautifully done, and the UX improvement is a great addition. @hooroomoo approved the two test cases I added in a DM, so I went ahead and merged after reviewing everything else and manually testing.
- Status changed to Fixed
about 17 hours ago 7:29am 24 July 2025 Automatically closed - issue fixed for 2 weeks with no activity.