Repository navigation
v0.2.0-alpha.20
Pre-releasePublished under the next dist-tag (@lablup/ui-common@next, @lablup/ui-common-cli@next). PR #88.
Astryx 0.7.0 → 0.7.3 (@astryxdesign/lab 0.7.3-canary.cac3d8d). Astryx's
own release notes:
https://github.com/facebook/astryx/releases/tag/v0.7.1,
https://github.com/facebook/astryx/releases/tag/v0.7.2,
https://github.com/facebook/astryx/releases/tag/v0.7.3
(Drawer promoted to core, disabled controls stay focusable, List edge,
global mode and the computer-level agent guide in the CLI).
Added
- New root names:
Drawer,DrawerHeader,DrawerProps,
DrawerHeaderPropsandListEdge. New mirrored subpath:Drawer. New in
@lablup/ui-common/lab:Comments,CommentThread,CommentComposer,
CommentPin,DiffViewer(withparseUnifiedDiff,createDiffFile),
EmojiPickerand their types. No subpath was removed;lablostDrawer
andDrawerHeader(below). ui-common init --user: the ui-common skill for every agent on the
computer, ui-common's counterpart of the Astryx skillastryx init --userwrites since Astryx 0.7.2. It installs
~/.agents/skills/ui-common/SKILL.md(shipped in@lablup/ui-common-cli
asskill/ui-common/SKILL.md) and links it into~/.claude/skills/and
the skill folders of the other agents Astryx reaches (Kiro, Windsurf,
Letta, Xcode,~/.config/agents; a managed copy for Continue) when they are
installed. The text is short and version-free like Astryx's: in a project
that depends on@lablup/ui-common, useui-common search,build,
template,componentanddocs, import from@lablup/ui-common, and
never runastryxor import@astryxdesign/*. Before this,
ui-common init --userpassed through to Astryx and left only Astryx's
skill, which steers agents to@astryxdesign/core. A file you edited, or
one ui-common did not write, is never changed;--remove-agentsremoves
what it wrote. When Astryx's skill is installed too, the command says how
to remove it (ui-common astryx init --user --remove-agents) and leaves it.ui-common adopt --from astryx: moves an app that imports Astryx
directly (@astryxdesign/core,/lab,/theme-neutral) onto ui-common in
one pass. It rewrites every module specifier in scripts (imports,
export … from,import(),require(),typeof import(),vi.mock()) and
stylesheets to the ui-common mirror, renamesDialog/AlertDialogto
Modal/AlertModal, addsui-commonto the cascade-layer order (and the
statement to an entry stylesheet orindex.htmlwithout one), edits
package.jsonin every workspace member (@lablup/ui-commonand the CLI at
the CLI's version, core kept only at ui-common's pin, theme-neutral and an
unused lab dropped, the lab override, pnpmallowBuilds), runs Astryx's own
codemods for the versions an app moves across to reach ui-common's pin, and
writesui-common-adopt-report.mdin the upgrade report's format: form
controls passing the field chromeForm.Itemnow owns, local Astryx patches
(which a ui-common fork covers, and which are keyed to a version ui-common
no longer pins),Modalrefs, body overlays, global shortcuts, Escape
handlers, ASTRYX agent blocks and tools anchored on them,astryxCLI
calls, and i18n wiring.--dry-run,--check(exit 1
while anything is left, for CI),--ignore;upgrade --from astryxis an
alias.ui-common doctor [--json] [--verbose]: read-only checks with a fix and a doc
section each, exit 1 on a failure: one@astryxdesign/core(lockfile and
disk, pnpm and npm) with lab on it, lab at the canary ui-common peers on,
the lab override, no direct Astryx
import, the layer order (present, first, withui-common, identical in every
copy), the Vite pre-bundle fix under@stylexjs/unplugin, Vitest inlining
ui-common, i18n wiring, the agent block, matching ui-common / ui-common-cli
versions, and Node for the CLI. It covers every member of a workspace, and
run from a member it reads the workspace root.doctor <subcommand>still
reaches Astryx's doctor.- The
ui-common-adoptagent skill, shipped in@lablup/ui-common-cli
and installed withui-common agents --skill [--dir <dir>]: the adopt,
doctor and verification sequence, with the decisions only a person makes.
The agent block names it once it is installed in the project. - docs/adopting-from-astryx.md: the guide for
direct-Astryx apps, with each doctor check explained and a prompt for a
coding agent. TagsInput(@lablup/ui-common/TagsInput), antd's
Select mode="tags"on ui-common'sTokenizer:string[]tags,
deduplicated,tokenSeparatorson the keystroke and on paste, text left
in the input committed on blur, and a translated create row
(uic.TagsInput.create).SegmentedControlforForm.Item: a wrapper like the other form
controls, named by the item's label. It renders a fork that merges the
item'saria-describedbyinstead of overwriting it; import
SegmentedControlItemfrom@lablup/ui-common/SegmentedControltoo.- ui-common's own templates (#70):
list-page,tabbed-page,
settings-pageanddashboard-boardpages, andlist-toolbar,
create-modal,detail-drawerandinfo-modalblocks, written against
@lablup/ui-commonand lucide-react. The refresh button inlist-pageand
list-toolbarisIconButtoninsideCountdownBorder. The package exports
them as source at@lablup/ui-common/astryx/templates/<name>, which the
Astryx CLI requires of an integration's templates. ui-common templateis the CLI's own command: it lists, prints and
writes ui-common's templates and names the packages a written template
needs (lucide-react,@astryxdesign/lab).- Component docs for
PageLayout,StatCard,ErrorState,DigitPopIn,
SmoothHeight, the Skeleton composites and the labTour, sosearchand
buildfind them (theDraweris described by Astryx's own core doc,
with ui-common's note).search "data table"now ranksDataGrid
aboveTable, and"delete confirm"findsDeleteConfirmModal.
Changed
-
Breaking:
DrawerandDrawerHeadermoved from@lablup/ui-common/lab
to@lablup/ui-common/Drawer(and the root), because Astryx 0.7.2
promoted them from lab to core.@lablup/ui-common/labno longer exports
either. ui-common'sDrawerfork is re-taken from core's and keeps its
changes (a scrimless drawer stays belowModaland the notification stack,
aModalinside a scrimmed drawer opens above it,aria-modalpasses
through);DrawerHeaderis Astryx's, re-exported unchanged. A project that
used lab only for the Drawer no longer needs@astryxdesign/lab, its core
override orlab.css.pnpm exec ui-common upgrade --from 0.2.0-alpha.19moves the imports and re-exports, and lists namespace
imports and module mocks of the lab mirror it cannot prove safe. -
Breaking:
Drawer'sisFullWidthOnMobileis now
experimental={{ isFullWidthOnMobile }}, following core's Drawer. A
top-levelisFullWidthOnMobileno longer type-checks and is ignored at
runtime (the drawer keeps the 56px page reveal on mobile). The same
upgrade step rewrites the prop onDrawerelements and lists the uses it
cannot rewrite (a props object or spread, or an element that already has
experimental). -
Disabled form controls stay focusable (Astryx 0.7.3). A disabled
CheckboxInput,CheckboxListitem,Switch,Slider,FileInput,
Selector,MultiSelector,ComplexSelector(andPagedSelector), the
date and time inputs,Link,ClickableCardand aToken's buttons now
exposearia-disabled="true"and keep their Tab stop instead of the native
disabledattribute; activation stays blocked and the value is still left
out of form submission. Tests that query them withtoBeDisabled()or
:disabledcheckaria-disabled="true"instead (DataGrid's selection
checkboxes and the settings and export modals included). -
pnpm exec ui-common upgrade --from 0.2.0-alpha.19also runs Astryx's
0.7.2 codemod (migrate-list-edge-compensation-to-edge:List
edgeCompensation="inline"→edge="outset"), moves the lab canary to
0.7.3-canary.cac3d8dand its core override to0.7.3, and bumps the
@lablup/ui-common/@lablup/ui-common-clipins.adopt --from astryx
moves a direct-Astryx app's labDrawerto@lablup/ui-common/Drawertoo. -
The
CheckboxInputfork is gone: Astryx 0.7.2 passes a caller'sidto
the native checkbox, so theForm.Itemwrapper renders Astryx's own
CheckboxInput. TheSwitchfork keeps itsidfix; its
aria-describedbyfix is upstream's since 0.7.2. TheComplexSelector,
Switch,FileInput,SegmentedControlandTourforks are re-taken
from 0.7.3. -
The
detail-drawertemplate importsDrawerfrom@lablup/ui-common
and needs no@astryxdesign/lab. -
Clearable inputs' clear-button tooltip reads "Clear" (Astryx's
@astryx.inputClearButton.tooltip); the button's accessible name still
names the field. -
The CLI rewrites the release-pinned runner Astryx 0.7.2 prints when no
project CLI answers (npx @astryxdesign/cli@0.7.3 …) to the ui-common
invocation, so the agent block keepsCLI: run every command as \npx ui-common ``. -
The Lablup theme was rebuilt with
astryx theme build0.7.3. -
Breaking: the form controls take no field chrome;
Form.Itemowns it, as
in antd (#69).TextInput,TextArea,NumberInput,Selector,MultiSelector,Typeahead,Tokenizer,DateInput,TimeInput,DateTimeInput,DateRangeInput,Switch,CheckboxInput,CheckboxList,RadioList,SegmentedControl,SliderandFileInputare now ui-common's wrappers at Astryx's names
and import paths. They droplabel,isLabelHidden,description,
labelTooltip,labelIcon,isRequired,isOptional,isDisabled,
statusVariantand the status message. Inside aForm.Itemthey read the
item's status and paint their border (the item shows the one message),
take the item'sidso its label names them, are disabled by
<Form disabled>, and announcerequiredfrom its rules.statusis
antd's'error' | 'warning' | ''.valueandonChangeare optional, so
?? ''is no longer needed, andMultiSelectorno longer throws on a
missing value. Withoutvaluea control is uncontrolled, as in antd, from
defaultValue(defaultCheckedforSwitchandCheckboxInput). On its
own a control is named byaria-label, which also names its parts ("Clear
Search"); in an item they are named after the item's label. AModal, the
Drawer, aPopoveror a nestedForminside an item no longer takes its
status or label:@lablup/ui-common/Popoveris now ui-common's, with
Astryx's API.SwitchandCheckboxInputtakecheckedbesidevalue
(valuePropName="checked"works) and their inline text aschildren.
Move each control'slabel/descriptionto the enclosingForm.Item
(label/extra) and dropisLabelHidden. -
The form controls do what a host app's adapter used to add, as
antd's controls do.TextInput,TextArea,NumberInput,Selector,
MultiSelectorandTokenizerdefault towidth="100%";Selectorto
placement="below", so its panel no longer covers the item's label;
MultiSelectortotriggerDisplay="labels".NumberInputdefaults to
hasClear(an emptied field reportsnull; passhasClear={false}to
keep the last number), takes a numeric string asvalue, and rounds a
decimal typed into anisIntegerOnlyfield on blur instead of dropping
it. ItsonChangeis(value: number | null) => void. An inline
onChange={(v) => …}is typed again onSelector(fromhasClear, as on
Astryx's) and onSlider(a single value unless the value is a range,
which Astryx's leaves untyped), instead of an implicitany. -
The CLI no longer offers Astryx's templates, which import
@astryxdesign/*and Heroicons directly:templaterefuses them,
searchleaves them out, andbuildrecommends ui-common's templates
instead.ui-common astryx template …still runs Astryx's command. -
The ui-common agent block lists the templates.
-
@lablup/ui-commondeclares an optional@astryxdesign/clipeer
(>=0.6.7): an Astryx CLI before 0.6.6 does not know a template's
keywordsand would drop the templates, and one before 0.6.7 does not let
a component doc replace Astryx's. A project without the CLI is not
affected. -
ui-common componentdescribes the Form.Item wrappers (#75).
TextInput,Selector,Switchand the other wrapped controls showed
Astryx's page, withlabel,isDisabledandstatus: {type, message}.
Their docs now replace Astryx's: no field chrome,disabled,status,
defaultValue, naming byaria-label, the wrappers' defaults, and
Form.Itemexamples.TagsInputhas a page of its own.
Fixed
-
NOTICE credits Cloudscape's board-components.
@cloudscape-design/board-components(Apache-2.0), whose
layout model and engine the Board'slayout.tsandengine.tsadapt, and
carries its NOTICE; both files name it and its copyright in their headers.
check:packasserts the packed NOTICE keeps it. -
upgrade --from 0.1writesSelectorfor the Form.Item wrapper. The
0.1Select→Selectorstep still produced Astryx's own props, which the
wrapper no longer takes: it setisLabelHiddenandlabelfrom
aria-label, renameddisabledtoisDisabled, and turnedinvalidinto
status={{ type: "error" }}. It now keepsaria-labelanddisabled,
writesstatus="error", and moves a 0.1labeltoaria-labelwith a
TODO to put it on the enclosingForm.Item. -
SwitchandCheckboxInputhonour the item'sid. Astryx 0.7.0
replaces it withuseId(), soForm.Item's<label htmlFor>pointed at
nothing. The wrappers render fixed copies (src/forks) that put theidon
the native checkbox, as TextInput does. -
Form.Item's message and extra describeSwitchandFileInput.
Astryx 0.7.0 spreads the item'saria-describedbyonto Switch's row and
FileInput's hidden native input. The Switch fork merges it into the
switch's own; a new FileInput fork hands thearia-*props and the focus
handlers to its trigger button, so a blur validates it, its required state
is announced, andfocusFieldlands on the trigger. -
CheckboxListfills a field that has no initial value, andTokenizer
keeps an in-flight search through a parent re-render while empty: list
wrappers pass one shared empty array instead of a new one per render. -
An empty
statusfalls back to the item's, as antd's
getMergedStatusdoes, instead of clearing the item's error border. -
UnitGriddraws full-size cells again under Astryx 0.7.0. Cell, gap
and radius sizes came fromparseFloat()on the raw--spacing-4,
--spacing-0-5and--radius-elementvalues, which are rem since 0.7.0,
so a1remcell drew 1px wide. The tokens are now resolved to px through
probe elements; a token that cannot be resolved keeps the 16px / 2px / 4px
default. -
DataGrid's column boundaries stay in the header while it has no rows.
Astryx's resize plugin runs every handle down the whole table, so hovering
the header of an empty grid drew the boundaries through the empty state. An
empty grid's body now carriesuic-data-grid__body--empty, which caps each
handle at its header cell.