Promote shared primitives into atlas-ui + default controls to compact density#113
Merged
Conversation
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.
79001d8 to
3f8406a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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/sharedinto the atlas-ui library and document them in Histoire:CollapsibleSection→ui/AtlasCollapsibleSectionBuilderActionToolbar→ui/AtlasActionToolbar(themed divider colour so it adapts to dark mode)Both gain
index.tsexports and.story.vue/.story.md, and switch to direct sibling imports to avoid a barrel self-import cycle. Consumers updated:CohortGenerationSectionand the five builder/editor pages.Also:
AtlasFeedbackBodystory.LoadingSpinnerinto an inlineAtlasProgressCircularinConceptSearchDialogand delete the component + spec.ErrorBoundarydeliberately stays inshared/— 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. Adddensity: tokens.density.default(compact) to theVBtntheme defaults so buttons match — making the densest option the default across all controls, while staying overridable per-instance.AtlasFabopts out with an explicitdensity="default"so it stays a full-size target.Verification
vue-tsctype-check: cleanAtlasCollapsibleSectionspec (moved totests/unit/components/ui/): 7/7 passConceptSearchDialogspec: 34/34 pass