Skip to content

Resolve #3513221 "Prevent nav away"

Closes #3513221

Disclaimer: Claude AI 🤖 helped me with the solution

This MR:

  • Introduces a new codeEditorSlice status property named hasUnsavedChanges 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 and isSaving are both false (compiled fast and saving hasn't started yet)
  • This new flag along with isCompiling and isSaving are then used in SavingOverlay.tsx to determine whether to block navigation and show overlay
  • Removes spinner from Preview header
Edited by Harumi Jang

Merge request reports

Loading