feat(evo-react): add fake tabs - #886
Conversation
🦋 Changeset detectedLatest commit: 1e7cae8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull request overview
This PR migrates ebay-fake-tabs into @evo-web/react as a new EvoFakeTabs compound component, aligns fake-tabs link/disabled behavior between Evo React and Evo Marko, and applies an intentional breaking rename in Evo React tabs (EvoTabPanelList → EvoTabPanels) consistent with the experimental package direction.
Changes:
- Add new
@evo-web/react/fake-tabscompound API (components, types, Storybook docs, SSR snapshots, and browser interaction tests). - Align fake-tabs disabled semantics:
hrefomitted ⇒ disabled, whilehref=""remains enabled (React + Marko). - Rename Evo React tabs panel wrapper
EvoTabPanelList→EvoTabPanelsand update tests/stories/migration guidance.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/evo-react/src/tabs/types.ts | Rename exported props type to EvoTabPanelsProps. |
| packages/evo-react/src/tabs/test/test.server.tsx | Update SSR fixture to use EvoTabPanels. |
| packages/evo-react/src/tabs/test/test.browser.tsx | Update browser tests to use EvoTabPanels. |
| packages/evo-react/src/tabs/tabs.stories.tsx | Update Storybook docs/examples to use EvoTabPanels. |
| packages/evo-react/src/tabs/tab-panels.tsx | Rename component implementation to EvoTabPanels. |
| packages/evo-react/src/tabs/index.ts | Update exports to EvoTabPanels + EvoTabPanelsProps. |
| packages/evo-react/src/fake-tabs/types.ts | Define public types for the new fake-tabs compound API. |
| packages/evo-react/src/fake-tabs/test/test.server.tsx | Add SSR snapshot coverage for fake-tabs states and disabled behavior. |
| packages/evo-react/src/fake-tabs/test/test.browser.tsx | Add browser interaction tests for aria-current/disabled/as adapter/ref forwarding. |
| packages/evo-react/src/fake-tabs/test/snapshots/test.server.tsx.snap | Add Vitest SSR snapshot baselines for EvoFakeTabs. |
| packages/evo-react/src/fake-tabs/README.md | Add minimal component README with Storybook link. |
| packages/evo-react/src/fake-tabs/index.ts | Add public exports for fake-tabs subpath entrypoint. |
| packages/evo-react/src/fake-tabs/fake-tabs.tsx | Implement EvoFakeTabs root/provider and Skin import. |
| packages/evo-react/src/fake-tabs/fake-tabs.stories.tsx | Add Storybook documentation + usage/migration guidance for fake-tabs. |
| packages/evo-react/src/fake-tabs/fake-tab.tsx | Implement EvoFakeTab link item, selection/disabled logic, and as adapter support. |
| packages/evo-react/src/fake-tabs/fake-tab-panel.tsx | Implement panel/content wrapper markup to match Skin structure. |
| packages/evo-react/src/fake-tabs/fake-tab-list.tsx | Implement <ul> list wrapper with Skin classes. |
| packages/evo-react/src/fake-tabs/context.tsx | Add React context used to share selected id + aria-current value. |
| packages/evo-marko/src/tags/evo-fake-tabs/test/test.server.ts | Extend Marko SSR tests to cover disabled tab behavior. |
| packages/evo-marko/src/tags/evo-fake-tabs/test/snapshots/test.server.ts.snap | Update Marko SSR snapshots for href + disabled behavior. |
| packages/evo-marko/src/tags/evo-fake-tabs/index.marko | Align Marko rendering: apply href, suppress aria-current when disabled, set aria-disabled. |
| packages/evo-marko/src/tags/evo-fake-tabs/fake-tabs.stories.ts | Add a Disabled story variant for documentation/testing. |
| packages/evo-marko/src/tags/evo-fake-tabs/examples/disabled.marko | Add Marko example demonstrating a disabled tab (no href). |
| .claude/skills/evo-app-migrate-react/SKILL.md | Add ebay-fake-tabs migration doc entry. |
| .claude/skills/evo-app-migrate-react/components/evo-tabs.md | Update migration doc examples to use EvoTabPanels. |
| .claude/skills/evo-app-migrate-react/components/evo-fake-tabs.md | Add migration guidance for ebay-fake-tabs → evo-fake-tabs. |
| .changeset/fake-tabs-add-panels-rename.md | Add changeset covering Evo React + Evo Marko updates. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| export type EvoFakeTabProps = Omit< | ||
| ComponentProps<"a">, | ||
| "aria-current" | "aria-disabled" | "href" | "id" | ||
| > & { | ||
| /** Unique identifier matching this tab to the parent EvoFakeTabs `selected` prop. */ | ||
| id: FakeTabId; | ||
| /** Link destination. Omit to disable the tab. */ | ||
| href?: string; | ||
| /** | ||
| * Custom component used in place of the native anchor, such as a framework Link. | ||
| * The component receives `href` and all other anchor-compatible props. | ||
| */ | ||
| as?: ComponentType<ComponentProps<"a">>; | ||
| }; |
Description
EvoFakeTabscompound API with Storybook documentation, migration guidance, browser tests, and SSR snapshots.asadapters withoutReact.Childreninspection.hrefas disabled in React and Marko while keepinghref=\"\"enabled.EvoTabPanelListtoEvoTabPanelswithout a compatibility alias.Notes
@evo-web/reactis experimental, so the panel rename is intentionally a hard change. The changeset covers@evo-web/reactand@evo-web/marko.Validation:
npm run build, Evo React and Marko Storybook production builds, focused fake-tabs browser and SSR tests, ESLint, Prettier, andgit diff --checkpassed.Screenshots
N/A. The components preserve the existing Skin markup and styling.
Checklist