Skip to content

feat(modal): accept an optional overlayZIndex prop for nested-modal stacking#603

Draft
kevinheneveld wants to merge 1 commit into
Listenarrs:canaryfrom
kevinheneveld:fix/modal-overlay-z-index
Draft

feat(modal): accept an optional overlayZIndex prop for nested-modal stacking#603
kevinheneveld wants to merge 1 commit into
Listenarrs:canaryfrom
kevinheneveld:fix/modal-overlay-z-index

Conversation

@kevinheneveld
Copy link
Copy Markdown

Summary

The shared Modal component's overlay defaults to z-index: 3000 (via the global .modal-overlay rule). When one Modal is opened from inside another whose overlay has bumped its z-index — a pattern used by some downstream consumers to ensure their modal sits above its parent — opening a default-z-index Modal from inside that one renders the nested Modal behind the parent overlay. The screen darkens (both overlays compound), but the new Modal's content is invisible and uninteractive.

This PR adds an optional overlayZIndex: Number prop to Modal. When supplied, it's applied as an inline style on the overlay div, letting a nested-modal caller pass a value higher than the parent overlay's z-index so the new Modal stacks on top. The prop is undefined by default, so the global .modal-overlay { z-index: 3000 } rule still wins for every existing caller — strictly additive, no behaviour change for anyone who doesn't opt in.

Why upstream this

The PR has no in-repo consumer here, but the underlying problem isn't fork-specific: any future Listenarr feature that opens a Modal from inside another whose overlay z-index has been raised hits the same stacking issue. A small additive prop makes the pattern explicit and self-documenting at the call site, instead of forcing callers to discover the z-index conflict at runtime.

I'm happy to drop or reshape if you'd rather solve nested-modal stacking a different way (e.g., a single global z-index manager, or by removing the per-consumer overlay-class overrides that motivate the bump in the first place).

Test plan

  • npm run build clean
  • Verified in a downstream fork: nested Modal opened from a parent whose overlay sat at 3100 now stacks correctly when passed :overlay-z-index=\"3200\", and unaffected when the prop is omitted.

🤖 Generated with Claude Code

@kevinheneveld kevinheneveld requested a review from a team May 18, 2026 03:51
kevinheneveld pushed a commit to kevinheneveld/Listenarr that referenced this pull request May 18, 2026
…rafting

State on top of the post-rebase baseline:
  - 5 more commits on kevin/live (preview button, hydrated audiobook,
    publish-date normalize, image-500 fix, modal z-index prop)
  - PR Listenarrs#600 + Listenarrs#603 opened (defensive fixes, non-draft)
  - PR Listenarrs#604 + Listenarrs#605 opened as drafts (wave 1 of the staggered
    feature-PR queue per Kevin's pacing instruction)
  - Issue #5 filed for LibriVox metadata source (deferred)
  - 8 features on kevin/live still without an upstream PR — queued
    with a per-day schedule

Live image: listenarr:local-20260517-1651 (head a712b49).
Two-step rollback: 1634 → 1617.
@kevinheneveld kevinheneveld marked this pull request as draft May 18, 2026 15:45
kevinheneveld pushed a commit to kevinheneveld/Listenarr that referenced this pull request May 18, 2026
- Live image bumped to listenarr:local-20260518-0750 (head 40a436b).
- PR Listenarrs#580 rewritten on review feedback from T4g1: NzbgetSafeRedirectHandler
  replaces URL-embedded creds, covers both /xmlrpc and /jsonrpc.
- All 9 open upstream PRs are now draft (converted Listenarrs#580, Listenarrs#600, Listenarrs#603).
- kevin/live and kevin/live-rebased both carry the new commit.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
kevinheneveld pushed a commit to kevinheneveld/Listenarr that referenced this pull request May 18, 2026
- Live image bumped to listenarr:local-20260518-0750 (head 40a436b).
- PR Listenarrs#580 rewritten on review feedback from T4g1: NzbgetSafeRedirectHandler
  replaces URL-embedded creds, covers both /xmlrpc and /jsonrpc.
- All 9 open upstream PRs are now draft (converted Listenarrs#580, Listenarrs#600, Listenarrs#603).
- kevin/live and kevin/live-rebased both carry the new commit.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…tacking

The shared Modal component's overlay defaults to z-index 3000. When
one Modal is opened from inside another whose overlay has bumped its
z-index — a pattern used by some consumers to ensure their modal
stays above its parent — opening a default-z-index Modal from inside
that one renders the nested Modal *behind* the parent overlay. The
screen darkens (both overlays compound) but the new Modal's content
is invisible and uninteractive.

Add an optional `overlayZIndex: Number` prop that, when supplied, is
applied as an inline style on the overlay div. The default is left
undefined so the global `.modal-overlay { z-index: 3000 }` rule still
wins for every existing caller — strictly additive, no behaviour
change for anyone who doesn't opt in.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@kevinheneveld kevinheneveld force-pushed the fix/modal-overlay-z-index branch from 6bf9d96 to 6ba1947 Compare May 19, 2026 16:13
kevinheneveld pushed a commit to kevinheneveld/Listenarr that referenced this pull request May 19, 2026
…rafting

State on top of the post-rebase baseline:
  - 5 more commits on kevin/live (preview button, hydrated audiobook,
    publish-date normalize, image-500 fix, modal z-index prop)
  - PR Listenarrs#600 + Listenarrs#603 opened (defensive fixes, non-draft)
  - PR Listenarrs#604 + Listenarrs#605 opened as drafts (wave 1 of the staggered
    feature-PR queue per Kevin's pacing instruction)
  - Issue #5 filed for LibriVox metadata source (deferred)
  - 8 features on kevin/live still without an upstream PR — queued
    with a per-day schedule

Live image: listenarr:local-20260517-1651 (head a712b49).
Two-step rollback: 1634 → 1617.
kevinheneveld pushed a commit to kevinheneveld/Listenarr that referenced this pull request May 19, 2026
- Live image bumped to listenarr:local-20260518-0750 (head 40a436b).
- PR Listenarrs#580 rewritten on review feedback from T4g1: NzbgetSafeRedirectHandler
  replaces URL-embedded creds, covers both /xmlrpc and /jsonrpc.
- All 9 open upstream PRs are now draft (converted Listenarrs#580, Listenarrs#600, Listenarrs#603).
- kevin/live and kevin/live-rebased both carry the new commit.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants