Resolve #3513221 "Prevent nav away"
Closes #3513221
Disclaimer: Claude AI
This MR:
- Introduces a new
codeEditorSlice
status property namedhasUnsavedChanges
that gets set to true when any source code changes (source JS, source CSS, global source CSS, global source JS, opened https://www.drupal.org/project/experience_builder/issues/3525907 for props and slots)- This addresses the time period when
isCompiling
andisSaving
are both false (compiled fast and saving hasn't started yet)
- This addresses the time period when
- This new flag along with
isCompiling
andisSaving
are then used inSavingOverlay.tsx
to determine whether to block navigation and show overlay - Removes spinner from Preview header
Edited by Harumi Jang