You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
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: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
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
[#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
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:
Navigation in expanded and docked-peek states: SheetHeader renders previous/next arrows and a position indicator (labels-map.tssheet.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.
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.
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.
Storybook example: MultipleSheets, MultipleSheetsDocked, and two visual-test variants are added.
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.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1025
Summary by CodeRabbit
Sheet.Groupfor navigating between open sheets, with localized previous/next controls and a position indicator.