Skip to content

Promote shared primitives into atlas-ui + default controls to compact density#113

Merged
p-hoffmann merged 2 commits into
developfrom
worktree-controls
Jun 20, 2026
Merged

Promote shared primitives into atlas-ui + default controls to compact density#113
p-hoffmann merged 2 commits into
developfrom
worktree-controls

Conversation

@p-hoffmann

Copy link
Copy Markdown
Member

Summary

Two related changes to the atlas-ui component library.

1. Promote shared primitives into atlas-ui (+ backfill stories)

Move the dependency-free generic components out of components/shared into the atlas-ui library and document them in Histoire:

  • CollapsibleSectionui/AtlasCollapsibleSection
  • BuilderActionToolbarui/AtlasActionToolbar (themed divider colour so it adapts to dark mode)

Both gain index.ts exports and .story.vue/.story.md, and switch to direct sibling imports to avoid a barrel self-import cycle. Consumers updated: CohortGenerationSection and the five builder/editor pages.

Also:

  • Add the missing AtlasFeedbackBody story.
  • Fold the single-use LoadingSpinner into an inline AtlasProgressCircular in ConceptSearchDialog and delete the component + spec.

ErrorBoundary deliberately stays in shared/ — it depends on the locale store, router and app i18n keys, so it is app infrastructure rather than a reusable primitive (and cannot render in the Pinia-less Histoire setup).

2. Default all controls to compact density

The form controls already resolve to compact. Add density: tokens.density.default (compact) to the VBtn theme defaults so buttons match — making the densest option the default across all controls, while staying overridable per-instance. AtlasFab opts out with an explicit density="default" so it stays a full-size target.

Verification

  • vue-tsc type-check: clean
  • ESLint on changed files: clean
  • AtlasCollapsibleSection spec (moved to tests/unit/components/ui/): 7/7 pass
  • ConceptSearchDialog spec: 34/34 pass

Move the dependency-free generic components out of components/shared into
the atlas-ui library and document them in Histoire:

- CollapsibleSection -> ui/AtlasCollapsibleSection
- BuilderActionToolbar -> ui/AtlasActionToolbar (themed divider colour)

Both gain index.ts exports and .story.vue/.story.md, and switch to direct
sibling imports to avoid a barrel self-import cycle. Consumers updated
(CohortGenerationSection + the 5 builder/editor pages).

Also:
- Add the missing AtlasFeedbackBody story.
- Fold the single-use LoadingSpinner into an inline AtlasProgressCircular
  in ConceptSearchDialog and delete the component + spec.

ErrorBoundary stays in shared/ (depends on the locale store, router and
app i18n keys, so it is app infra rather than a reusable primitive and
cannot render in the Pinia-less Histoire setup).

type-check, eslint and the affected unit specs all pass.
Restore unit coverage above the 77% function threshold: the promotion deleted
the fully-covered LoadingSpinner, and the promoted AtlasActionToolbar (formerly
BuilderActionToolbar) had never been tested. Add a spec covering its slot and
divider branches, plus a defaultExpanded-watcher test for AtlasCollapsibleSection.

Also revert the "default buttons to compact density" change: it shrank
AtlasIconButton below the 28px minimum touch target, failing the mobile
touch-target e2e check. The form controls were already compact; only buttons
were affected, and compact buttons regress mobile tap targets.
@codecov

codecov Bot commented Jun 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.69%. Comparing base (c98b210) to head (3f8406a).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #113   +/-   ##
========================================
  Coverage    92.69%   92.69%           
========================================
  Files          443      442    -1     
  Lines        94685    94668   -17     
  Branches     10648    10648           
========================================
- Hits         87764    87749   -15     
+ Misses        6921     6919    -2     
Flag Coverage Δ
unit 92.69% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@p-hoffmann p-hoffmann merged commit f283d71 into develop Jun 20, 2026
19 checks passed
@p-hoffmann p-hoffmann deleted the worktree-controls branch June 20, 2026 09:37
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.

1 participant