Skip to content

feat(sheet): add multi-sheet navigation #1025 - #1233

Open
intermetric wants to merge 1 commit into
rcfrom
feat/1025-sheet-multi-sheet-navigation
Open

intermetric wants to merge 1 commit into
rcfrom
feat/1025-sheet-multi-sheet-navigation

Conversation

@intermetric

@intermetric intermetric commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1025

Summary by CodeRabbit

  • New Features
    • Added Sheet.Group for navigating between open sheets, with localized previous/next controls and a position indicator.
    • Switching sheets preserves each sheet’s content and collapsed state. Grouped docked sheets keep the page interactive.
    • Added an option for sheet triggers to activate a sheet without closing the active one.
  • Documentation
    • Updated sheet guidance to describe grouped navigation and docked behavior.

@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

No actionable comments were generated in the recent review.

Walkthrough

The Sheet component now supports grouped open sheets with active-sheet navigation, separate open and active state, and grouped focus and presentation behavior. The change adds Storybook examples, tests, localized navigation labels, and documentation.

Changes: Grouped Sheet Navigation

Layer / File(s) Summary
Group state and Sheet integration
src/tedi/components/overlays/sheet/sheet-group.tsx, src/tedi/components/overlays/sheet/sheet.tsx, src/tedi/components/overlays/sheet/sheet-context.tsx, src/tedi/components/overlays/sheet/components/sheet-trigger/sheet-trigger.tsx, src/tedi/components/overlays/sheet/index.ts, src/tedi/helpers/hooks/use-isomorphic-layout-effect.ts, src/tedi/components/layout/mobile-nav/mobile-nav.tsx
Added Sheet.Group state and exports. Sheets register their open state and activate when selected. Triggers support open-only behavior. The shared isomorphic layout effect hook replaces the local hook in mobile navigation.
Grouped content and focus
src/tedi/components/overlays/sheet/components/sheet-content/sheet-content.tsx
SheetContent derives activity, modal behavior, scroll locking, drag eligibility, rendering, and focus handling from group state.
Header navigation and presentation
src/tedi/components/overlays/sheet/components/sheet-header/sheet-header.tsx, src/tedi/components/overlays/sheet/sheet.module.scss, src/tedi/providers/label-provider/labels-map.ts
Grouped headers provide navigation controls and a localized position label. Styles support grouped header rows and the navigation area.
Examples, tests, and documentation
src/tedi/components/overlays/sheet/sheet.spec.tsx, src/tedi/components/overlays/sheet/sheet.stories.tsx, skills/tedi-react/references/components.md, component.manifest.json
Tests cover switching, closing, focus restoration, and trigger behavior. Storybook adds standard and docked examples. Documentation describes grouped-sheet behavior.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant SheetTrigger
  participant Sheet
  participant SheetGroup
  participant SheetHeader
  participant SheetContent
  SheetTrigger->>Sheet: request open or activation
  Sheet->>SheetGroup: register open state and trigger
  SheetHeader->>SheetGroup: move to another open sheet
  SheetGroup-->>Sheet: update active sheet
  Sheet-->>SheetContent: provide group activity
  SheetContent->>SheetContent: update presentation and focus
Loading

Possibly related PRs

Suggested reviewers: airikej, mart-sessman, ly-tempel-bitweb

Merge Risk: Minimal · previous review 0998d

This adds opt-in grouped navigation between open sheets without changing standalone Sheet behavior. No concrete merge-blocking defect was identified. Run the new Sheet tests and Storybook visual stories as part of normal CI before merging.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat(sheet): add multi-sheet navigation #1025" matches the main change. The changeset adds a SheetGroup component, grouped navigation controls in SheetHeader, Sheet.Group, group-aware focus…
Linked Issues check Passed [#1025] The reviewed summary shows opt-in multi-sheet navigation through the new Sheet.Group (sheet-group.tsx, sheet.tsx). Requirements and evidence:

1. Navigation in expanded and docked-peek s…
Out of Scope Changes check Passed The changed files map to #1025 objectives:
- sheet-group.tsx, sheet.tsx, sheet-content.tsx, sheet-header.tsx, sheet-context.tsx, index.ts: group state, navigation, and focus behavior.
- `s…
Full details: Title check

Explanation

The title "feat(sheet): add multi-sheet navigation #1025" matches the main change. The changeset adds a SheetGroup component, grouped navigation controls in SheetHeader, Sheet.Group, group-aware focus and scroll handling, labels, stories, and tests for multi-sheet navigation. The title names the sheet component and the feature. It also references the linked issue #1025, which the objectives describe as requesting opt-in multi-sheet navigation for the React Sheet.

Full details: Linked Issues check

Explanation

[#1025] The reviewed summary shows opt-in multi-sheet navigation through the new Sheet.Group (sheet-group.tsx, sheet.tsx). Requirements and evidence:

  1. Navigation in expanded and docked-peek states: SheetHeader renders previous/next arrows and a position indicator (labels-map.ts sheet.previous, sheet.next, sheet.position) when at least two sheets are open. The MultipleSheets and MultipleSheetsDocked stories cover both states. The SCSS adds a navigation area and header-row layout.
  2. Active sheet on open, switch, and close: SheetGroup makes a newly opened sheet active. Closing the active sheet selects the sheet at the same index, or the last remaining sheet. move cycles in opening order and wraps. activate changes the active sheet only when it is open.
  3. Content preservation, keyboard, and focus: the spec tests check that switching keeps mounted content and input state without calling onToggle. SheetContent coordinates initial focus for grouped sheets and restores focus to the trigger or group opener when the last sheet closes. Header navigation buttons receive focus according to the navigation direction.
  4. Storybook example: MultipleSheets, MultipleSheetsDocked, and two visual-test variants are added.
  5. Tests: three grouped-sheet tests are added in sheet.spec.tsx for switching, opening and closing, and open-only triggers.

The React API is implemented. The Angular counterpart is outside this PR, as the issue states. Test results were not executed in this review; the assessment relies on the summary and the described test assertions.

Full details: Out of Scope Changes check

Explanation

The changed files map to #1025 objectives:

  • sheet-group.tsx, sheet.tsx, sheet-content.tsx, sheet-header.tsx, sheet-context.tsx, index.ts: group state, navigation, and focus behavior.
  • sheet-trigger.tsx (toggle prop) and getReferenceProps toggle argument: allow an open-only trigger that selects an inactive grouped sheet. This supports the active-sheet behavior.
  • sheet.module.scss: layout for navigation and header rows.
  • sheet.stories.tsx, sheet.spec.tsx: Storybook example and tests required by the issue.
  • labels-map.ts: labels for the new navigation controls.
  • skills/tedi-react/references/components.md, component.manifest.json: documentation of the new Sheet.Group API.
  • use-isomorphic-layout-effect.ts and mobile-nav.tsx: the shared hook replaces a local hook in mobile-nav.tsx. This is a small refactor. The summary does not show that the sheet code uses the shared hook, so its link to #1025 is not explicit. It does not change mobile-nav behavior and is not a concrete unrelated change.

No change is shown that clearly falls outside #1025.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

CI annotation context is incomplete: annotation collection unavailable or limited

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 3e358a8 and 0998de0.

Files selected for processing: 15

  • component.manifest.json
  • skills/tedi-react/references/components.md
  • src/tedi/components/layout/mobile-nav/mobile-nav.tsx
  • src/tedi/components/overlays/sheet/components/sheet-content/sheet-content.tsx
  • src/tedi/components/overlays/sheet/components/sheet-group/sheet-group.tsx
  • src/tedi/components/overlays/sheet/components/sheet-header/sheet-header.tsx
  • src/tedi/components/overlays/sheet/components/sheet-trigger/sheet-trigger.tsx
  • src/tedi/components/overlays/sheet/index.ts
  • src/tedi/components/overlays/sheet/sheet-context.tsx
  • src/tedi/components/overlays/sheet/sheet.module.scss
  • src/tedi/components/overlays/sheet/sheet.spec.tsx
  • src/tedi/components/overlays/sheet/sheet.stories.tsx
  • src/tedi/components/overlays/sheet/sheet.tsx
  • src/tedi/helpers/hooks/use-isomorphic-layout-effect.ts
  • src/tedi/providers/label-provider/labels-map.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

♿ Accessibility — ✅ no blocking violations

No accessibility violations in the components changed by this PR.

⚠️ Pre-existing — 3 violations in components not changed here (warn only)

Component Rules Stories
TEDI-Ready/Components/Form/Toggle unknown ×3 3
Stories

@codecov

codecov Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@intermetric
intermetric force-pushed the feat/1025-sheet-multi-sheet-navigation branch from 0998de0 to 86aa9fd Compare December 1, 2026 13:29
@intermetric
intermetric force-pushed the feat/1025-sheet-multi-sheet-navigation branch from 86aa9fd to 469935b Compare December 1, 2026 14:26

This branch was successfully deployed

1 active deployment
github-pages — ae039014 Deployed Dec 1, 2026 by intermetric via Deploy #2303
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.

[Sheet]: Add multi-sheet navigation

1 participant