Sequence: wrapper always gets `z-index: 10000 - trackIndex`, so a sibling layer outside a Sequence is hidden under it
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
The z-index is set in packages/rendiv/src/components/Sequence.tsx: the trackIndex = 0 default at line 32, trackZIndex at line 92, and the spread of zIndex: trackZIndex after ...style at lines 217 and 227. Reproduce with the Master snippet via rendiv still and check whether the red div shows at frame 10. Done when a sibling outside a Sequence is visible, a zIndex in the Sequence's own style is respected, and Sequences without a track index stack in DOom order. Settling the default behaviour may need a maintainer decision.
Written by the indexing model from the issue text.
Description
Summary
Every <Sequence> wrapper is given z-index: 10000 - trackIndex, and trackIndex defaults to 0, so the z-index is always set. A layer that sits next to Sequences without being in one (an overlay, a watermark, a caption strip) is painted under all of them, whatever its DOM order and whatever z-index below 10000 it has. Nothing warns about it. The layer is simply missing from the frame.
Reproduction
@rendiv/core 0.2.6.
const Shot: React.FC = () => <Fill style={{ background: '#0d0d1a' }} />;
const Master: React.FC = () => (
<Fill>
<Sequence from={0} durationInFrames={90}>
<Shot />
</Sequence>
<div style={{ position: 'absolute', left: 48, top: 40, width: 300, height: 100, zIndex: 50, background: 'red' }} />
</Fill>
);
rendiv still src/index.tsx Master out.png --frame 10: no red box anywhere in the frame. Wrap the div in its own <Sequence from={0} durationInFrames={90}> and it appears (same z-index as the shot, later in the DOM).
The same thing happens one level down: inside a shot, a Sequence with the default layout always sits above its plain siblings.
Cause
packages/rendiv/src/components/Sequence.tsx:
- line 32:
trackIndex = 0 - line 92:
const trackZIndex = effectiveTrackIndex !== undefined ? 10000 - effectiveTrackIndex : undefined;(theundefinedbranch cannot be reached because of the default) - lines 217 and 227:
zIndex: trackZIndexis spread after...style, so astyle={{ zIndex }}passed to the Sequence is overwritten as well
Suggested fix
- Set the z-index only when a track index was actually given, by the
trackIndexprop or by a Studio timeline override. With no track index there is no z-index and siblings stack in DOM order. - Let a
zIndexin the Sequence's ownstylewin. - If the current behaviour stays, document it on the Sequence page, and warn in dev when a Sequence has a positioned sibling that is not a Sequence.
- Dominant language
- TypeScript
- Stars
- 159
- Forks
- 32
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from thecodacus/rendiv
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
thecodacus/rendiv#17 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
thecodacus/rendiv#16 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
thecodacus/rendiv#24 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
thecodacus/rendiv#23 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
thecodacus/rendiv#22 ·
All issues in thecodacus/rendiv
Similar issues
-
Navbar avatar and name stay stale after saving profile changesPossibly taken @alexechoi claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
marmelab/atomic-crm#416 ·
Maintainers usually reply within 1 day
-
feature-request
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
bluesky-social/social-app#12343 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
lucide-icons/lucide#5165 ·
Maintainers usually reply within 1 day
-
[Feature] Preferences - Keep the theme selection popover open after selection for quick previewOpen
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
marktext/marktext#6033 · 1 comment ·
Maintainers usually reply within 1 day
-
area:desktop bug has repro platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
anthropics/claude-code#107903 ·