Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

[IR-3547] studio: show unsaved changes dialog when switching between scenes #10921

Merged
merged 9 commits into from
Aug 13, 2024

Conversation

dtlehrer
Copy link
Contributor

@dtlehrer dtlehrer commented Aug 8, 2024

Summary

IR-3547

  • creates confirmedSaveIfModified function, which can now be used to check for unsaved changes and display the Unsaved Changes confirmation dialog across the app
  • uses the confirmedSaveIfModified function when clicking on the SceneItem component to switch between scenes
Screen.Recording.2024-08-08.at.11.18.07.AM.mov

Subtasks Checklist

Breaking Changes

References

closes #insert number here

QA Steps

Copy link
Collaborator

@aditya-mitra aditya-mitra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally this replaces the old alert

Can you also replace this alert on page close?
image

@dtlehrer dtlehrer requested a review from aditya-mitra August 12, 2024 16:12
Copy link
Collaborator

@aditya-mitra aditya-mitra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

(I modified the beforeUnloadEvent to use browser's alert instead of our own alert because the former solution is cross-browser friendly and also gives the user a way to force close the window)

@aditya-mitra aditya-mitra enabled auto-merge August 13, 2024 11:31
@aditya-mitra aditya-mitra added this pull request to the merge queue Aug 13, 2024
Merged via the queue into dev with commit 3e648cd Aug 13, 2024
25 checks passed
@aditya-mitra aditya-mitra deleted the ir-3547 branch August 13, 2024 11:57
MbfloydIR added a commit that referenced this pull request Aug 13, 2024
* dev:
  IR-3602-Changing-CSM-cascade-count-or-tonemapping-spams-errors (#10926)
  hotfix gizmo zeroed position on rigidbody entities (#10943)
  Add download progress bar and optimize util files (#10914)
  [IR-3547] studio: show unsaved changes dialog when switching between scenes (#10921)
  added tailwind class to break the line in the middle of words to prevent overflowing the alocated space (#10944)
  Updating the description of hemisphere lights to better explain what they do and why. (#10945)
  Left aligning the text in the "Add Component" and "Add Entity" menus (#10946)
  studio: open context menu on file menu right click (#10908)
  Fixed a bug with project PUTs without commit SHAs (#10942)
  IR-2873 Fix disabled state for select dropdown arrow (#10950)
  IR-3700: Added search by sso/email in user table (#10929)
  IR-3053: Add project-history service (#10736)
  Component dependencies (#10916)
  [IR-3324] studio: drag-n-drop folders (#10737)
  prevent scene from disappearing when double-clicking on a HierarchyTreeNode (#10932)
  fix tooltip css applied to all popups (#10938)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants