feat(apollo-react): add CanvasBottomPanel - #980
Conversation
|
Apollo Coded App preview deployments are ready.
|
Dependency License Review
License distribution
Excluded packages
|
There was a problem hiding this comment.
Pull request overview
Adds a new reusable, controlled CanvasBottomPanel component to apollo-react’s canvas component set, providing a product-neutral collapsible, tabbed bottom panel shell with accessible tab semantics, Storybook examples, and unit test coverage.
Changes:
- Introduces
CanvasBottomPanel(controlled active tab + collapsed state) with WAI-ARIA tab roles and keyboard navigation. - Adds Storybook stories demonstrating common canvas compositions and header actions.
- Adds focused unit tests and exports the component via the canvas components barrel.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/apollo-react/src/canvas/components/index.ts | Re-exports CanvasBottomPanel from the canvas components barrel. |
| packages/apollo-react/src/canvas/components/CanvasBottomPanel/index.ts | Adds the component and type exports for public consumption. |
| packages/apollo-react/src/canvas/components/CanvasBottomPanel/CanvasBottomPanel.types.ts | Defines the controlled API types for tabs, selection, collapse state, and optional header actions. |
| packages/apollo-react/src/canvas/components/CanvasBottomPanel/CanvasBottomPanel.tsx | Implements the panel UI, ARIA relationships, and keyboard navigation behavior. |
| packages/apollo-react/src/canvas/components/CanvasBottomPanel/CanvasBottomPanel.test.tsx | Adds unit tests for rendering, controlled behavior, mounting preservation, ARIA, and keyboard handling. |
| packages/apollo-react/src/canvas/components/CanvasBottomPanel/CanvasBottomPanel.stories.tsx | Adds Storybook examples for collapsed/expanded usage and canvas composition. |
Comments suppressed due to low confidence (1)
packages/apollo-react/src/canvas/components/CanvasBottomPanel/CanvasBottomPanel.tsx:139
- This
tabpanelsets bothhiddenand an inlinedisplaystyle.hiddenalready maps todisplay: none, so the inline style is redundant and can drift from thehiddenstate.
hidden={!isActive}
className="h-full w-full"
style={{ display: isActive ? 'block' : 'none' }}
>
|
|
||
| <div | ||
| className="min-h-0 flex-1 border-t border-border-subtle" | ||
| style={{ display: isCollapsed ? 'none' : 'block' }} |
📊 Coverage + size by packagePer-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.
"Coverage" is each package's own |
Overview
Adds a reusable, product-neutral
CanvasBottomPanelto Apollo React for canvas experiences that need a collapsible tabbed panel.What changed
CanvasBottomPanelAPI with consumer-provided tabs and content.CanvasModeToolbarandCanvasZoomControls.Why
Flow products currently need a reusable canvas-level bottom panel shell without coupling Apollo to product-specific debug sessions, evaluation stores, datasets, or execution history. This provides the shared presentation and accessibility layer while keeping product logic in consuming applications.
Validation
CanvasBottomPanel.test.tsx: 10 tests passinggit diff --check: passing