Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions .github/workflows/check.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:

jobs:
test:
name: "Vitest (stories)"
name: "Vitest (unit + stories)"
runs-on: ${{ vars.RUNNER_DEFAULT || 'ubuntu-latest' }}
permissions:
contents: read
Expand Down Expand Up @@ -38,5 +38,22 @@ jobs:
run: bun install --frozen-lockfile
- name: "Setup: Playwright Chromium"
run: bunx playwright install --with-deps chromium
- name: "Test: Stories via Vitest (browser mode)"
run: bun run test
- name: "Test: Vitest (jsdom unit + Storybook browser mode) with coverage"
# `-- --coverage` forwards through Turbo's passthrough args to every
# workspace's `test` script (`vitest run`), so both suites emit their
# own coverage/lcov.info without a dedicated turbo task.
run: bunx turbo run test -- --coverage
- name: "Coverage: Upload ui-unit (jsdom) to Codecov"
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
files: packages/ui/coverage/lcov.info
flags: ui-unit
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
- name: "Coverage: Upload ui-browser (Storybook) to Codecov"
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
files: apps/storybook/coverage/lcov.info
flags: ui-browser
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ storybook-static/
.turbo/
*.log
.DS_Store

# Coverage output
coverage/
32 changes: 16 additions & 16 deletions COMPONENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ radii, type. See the package README.
| `Dialog` | **done** | — | modal base |
| `Sheet` / `Drawer` | **done** | side | **mobile nav drawer** |
| `Tabs` | **done** | — | (content tabbing) |
| `Select` / `NativeSelect` | registry | — | forms |
| `Select` / `NativeSelect` | **done** | — | forms |
| `Combobox` / `Command` | deferred | — | **⌘K command palette** — deferred to CommandPalette composite (see note) |
| `Switch` | **done** | — | theme toggle option |
| `Separator` | **done** | orientation | nav dividers |
| `ScrollArea` | **done** | — | sidebar / palette scroll |
| `Accordion` | registry | — | FAQ, collapsible nav groups |
| `Accordion` | **done** | — | FAQ, collapsible nav groups |
| `Breadcrumb` | registry | — | page breadcrumbs |
| `NavigationMenu` | **done** | — | primary nav links |
| `Avatar` | registry | — | (marketing) |
Expand All @@ -39,23 +39,23 @@ radii, type. See the package README.
| Component | Status | Composition / props | Source |
| --- | --- | --- | --- |
| `Callout` | **done** | tone: note·tip·important·warning·caution; `title` | guide admonitions |
| `CodeBlock` | todo | variant: editor·terminal; `filename`, `lang`, `lineNumbers`, `statusBar` (vim NORMAL), `highlight`; slot: `CopyButton` | SQLite editor, terminal, snippet blocks |
| `CopyButton` | todo | `value`, `size` | code block + copy-command |
| `CopyCommand` | todo | `command`, prompt glyph | install one-liner |
| `AppNav` | todo | brand · `NavLinks` · `SearchTrigger` · `ThemeToggle` · `LocaleSwitcher` · `ChangelogButton` · `InstallButton` | top nav (all pages) |
| `SectionTabs` | todo | `items`, `active` | Start·Runtime·Toolchain·API·Resources |
| `Sidebar` | todo | `SectionSwitcher`, `NavGroup`, `NavItem` (active, external, comingSoon), progress | left nav |
| `TableOfContents` | todo | `items`, active-on-scroll; mono variant for API methods | right rail "On this page" |
| `AiActions` | todo | Copy as Markdown · View as text · Open in ChatGPT/Claude | right rail panel |
| `CodeBlock` | **done** | variant: editor·terminal; `filename`, `lang`, `lineNumbers`, `statusBar` (vim NORMAL), `highlight`; slot: `CopyButton` | SQLite editor, terminal, snippet blocks |
| `CopyButton` | **done** | `value`, `size` | code block + copy-command |
| `CopyCommand` | **done** | `command`, prompt glyph | install one-liner |
| `AppNav` | **done** | brand · `NavLinks` · `SearchTrigger` · `ThemeToggle` · `LocaleSwitcher` · `ChangelogButton` · `InstallButton` | top nav (all pages) |
| `SectionTabs` | **done** | `items`, `active` | Start·Runtime·Toolchain·API·Resources |
| `Sidebar` | **done** | `SectionSwitcher`, `NavGroup`, `NavItem` (active, external, comingSoon), progress | left nav |
| `TableOfContents` | **done** | `items`, active-on-scroll; mono variant for API methods | right rail "On this page" |
| `AiActions` | **done** | Copy as Markdown · View as text · Open in ChatGPT/Claude | right rail panel |
| `Breadcrumbs` | **done** | `segments` | above page title |
| `PageFooterNav` | **done** | `prev?`, `next?` (right-grouped cards) | bottom prev/next |
| `CardGrid` + `FeatureCard` | todo | cols; card: icon·title·description·badge·href | "Start here", category grid |
| `StatStrip` | todo | `stats: {value,label}[]` | API landing metrics |
| `StatusBadge` | todo | thin wrapper over `Badge` status tones | reference status |
| `ApiMethod` + `ParamRow` | todo | `signature`, `status`, params, example slot | node:fs entries |
| `SupportMatrix` / `DataTable` | todo | columns, status cells (✓/✗) | method support table |
| `CardGrid` + `FeatureCard` | **done** | cols; card: icon·title·description·badge·href | "Start here", category grid |
| `StatStrip` | **done** | `stats: {value,label}[]` | API landing metrics |
| `StatusBadge` | **done** | thin wrapper over `Badge` status tones | reference status |
| `ApiMethod` + `ParamRow` | **done** | `signature`, `status`, params, example slot | node:fs entries |
| `SupportMatrix` / `DataTable` | **done** | columns, status cells (✓/✗) | method support table |
| `CommandPalette` | registry+ | built on `Command`; groups: pages·actions; recent | ⌘K overlay |
| `MobileNav` | todo | top bar + `Sheet` drawer + bottom "Search or ask AI" bar | mobile screens |
| `MobileNav` | **done** | top bar + `Sheet` drawer + bottom "Search or ask AI" bar | mobile screens |
| `ThemeProvider` / `useTheme` | **done** | class/`data-theme` on `<html>`, persisted | dark/light toggle |

## Tier 3 — Marketing widgets (from elide.dev)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# components

[![codecov](https://codecov.io/gh/elide-dev/components/graph/badge.svg)](https://codecov.io/gh/elide-dev/components)

Elide's shared UI. One repository, consumed by many: the docs site (Astro) and
the marketing site both depend on it, so brand, tokens, and behavior stay in one
place and move together.
Expand Down
3 changes: 2 additions & 1 deletion apps/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"build": "storybook build",
"build-storybook": "storybook build",
"chromatic": "chromatic --exit-zero-on-changes",
"test": "vitest run"
"test": "vitest run",
"test:coverage": "vitest run --coverage"
},
"dependencies": {
"@elide/tokens": "workspace:*",
Expand Down
16 changes: 16 additions & 0 deletions apps/storybook/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ import { storybookTest } from "@storybook/addon-vitest/vitest-plugin";
// assertions live in each story's `play` function. Storybook's plugin reuses
// the .storybook config (framework, Tailwind viteFinal, decorators), and since
// Storybook 10.3 the addon applies the preview annotations automatically.
//
// Coverage is v8, same as the jsdom suite in packages/ui/vitest.config.ts.
// Stories live in packages/ui/src, outside this app's root, so `allowExternal`
// must be on or v8 drops those files before include/exclude ever runs. Once
// external files are allowed, matching is substring-based (picomatch
// `contains: true`), so the same `src/components/**` glob used in
// packages/ui/vitest.config.ts matches here too. Codecov merges this suite's
// `ui-browser` flag with `ui-unit`.
export default defineConfig({
plugins: [storybookTest({ configDir: ".storybook" })],
test: {
Expand All @@ -16,5 +24,13 @@ export default defineConfig({
headless: true,
instances: [{ browser: "chromium" }],
},
coverage: {
provider: "v8",
reporter: ["text", "json", "lcov"],
reportsDirectory: "./coverage",
allowExternal: true,
include: ["src/components/**"],
exclude: ["src/**/*.test.{ts,tsx}", "src/**/*.stories.tsx"],
},
},
});
Loading