Skip to content

Commit b8e3a98

Browse files
committed
refactor: group the modals
1 parent 56b0516 commit b8e3a98

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/GlobalModals.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,6 @@ function GlobalModals() {
5454

5555
return (
5656
<>
57-
{shouldRenderDeferredModals && (
58-
<Suspense fallback={null}>
59-
<LazyUpdateAppModal />
60-
</Suspense>
61-
)}
62-
{/* Those below are only available to the authenticated user. */}
6357
<GrowlNotification ref={growlRef} />
6458
<DelegateNoAccessModalProvider>
6559
{shouldRenderContextMenu && (
@@ -74,14 +68,20 @@ function GlobalModals() {
7468
{shouldRenderDeferredModals && (
7569
<>
7670
{/* Each modal lives in its own Suspense boundary so an unrelated chunk's load latency
77-
or failure cannot delay or suppress the others (e.g. an incoming screen-share request). */}
71+
or failure cannot delay or suppress the others (e.g. an incoming screen-share request).
72+
Order matters: BaseModal hardcodes zIndex: 1 on every modal, so DOM source order
73+
determines stacking when modals coincide. UpdateAppModal is last so the forced-update
74+
prompt sits on top if it ever overlaps with the others. */}
7875
<Suspense fallback={null}>
7976
{/* Proactive app review modal shown when user has completed a trigger action */}
8077
<LazyProactiveAppReviewModalManager />
8178
</Suspense>
8279
<Suspense fallback={null}>
8380
<LazyScreenShareRequestModal />
8481
</Suspense>
82+
<Suspense fallback={null}>
83+
<LazyUpdateAppModal />
84+
</Suspense>
8585
</>
8686
)}
8787
</>

0 commit comments

Comments
 (0)