DiamondLightSource / DiamondLightSource/sci-react-ui
Investigate transition suppression for nested `data-mode`
- Dominant language
- TypeScript
- Stars
- 8
- Forks
- 3
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 5
Description
Based on changes in #220, `data-mode` could be applied to any container, not just the document root. However, the `ThemeProvider` transition suppression currently only watches `document.documentElement`.
This works for our current Storybook use case, where nested themes are static, but it may not be sufficient if we later support components that switch between light and dark mode independently (for example, code editors or previews).
**Task**
- Review whether transition suppression should also support nested `data-mode` containers.
- Decide whether the current behaviour is sufficient or should be extended.
Contributor guide
Research direction
Start by reviewing the ThemeProvider transition-suppression behavior and the changes in issue #220, focusing on how document.documentElement is observed today. Compare that behavior with nested data-mode containers, then document whether the current behavior is sufficient or define the scope needed to support independently switching nested themes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100