Repository navigation
Feat/widgets pipeline - #305
Merged
Merged
Conversation
State shapes with owned, internal and observed values, steps and actions as data, output parts with the live and props channels, invariants, the roving, selection, typeahead and grid fragments, the DOM adapter `connect` and `simulate` from `@vega-ui/core/test` for node tests. The store moves here from react-kit.
… numbering - hooks: remove useControlledState, useDragGesture, useFormReset, useScrollSnap, useSelection and the map and observer hooks only the old components used - utils: remove the matrix, grid and bimap structures and the DOM helpers the core adapter took over; add createKeyMatcher, waitForAnimations and expandTwoDigitYear; template dates and times no longer clamp to min and max - i18n: PhoneNumbering adapter on libphonenumber-js
One entry point per widget, each exporting what an adapter needs to drive it. The masks, the drag and the date rules are shared inside the package, and every widget is tested in node on `simulate`.
Components become thin adapters over their widgets (useWidget, useOutput, useSnapshot), and react-kit folds into the ui internals. Calendar, the day, month and year pickers and the date fields are rebuilt on Grid; Dialog, Drawer and Sheet run on the native dialog, floating content on CSS anchor positioning; PhoneField keeps an E.164 value. The changesets describe every change.
…t-kit Root paths cover @vega-ui/core/test, CI runs the widget tests in node, and the lockfile follows the new packages.
The core browser projects take the plain browser names, so the --project filter of the browser job selects them, and the unit job runs the core node project.
…ks and Heading pre-line
…n a form, repair the layout example
…ups and server-rendered SelectValue
- Invariants by source: a step that breaks one that held throws in strict mode; options that break one are repaired silently, the Listbox active option moves to its nearest neighbour, Grid ranges leave out disabled cells
- lifecycle.options names the changed options, so Select and modal dialogs re-show only when the parent changes open
- Adapter: keyboard click after a touch drag, prevented pointer moves, symbol keys typed with Shift, errors of invariants, options, selectors and painting reach onError
- Widgets: Tooltip Escape cancels a pending open, Grid click after a drag, SnapScroller clamped target, PageControl tab stop, linear Shift extension that restarts after an outside value change, Listbox and Select activedescendant only for existing options, Sheet follows snapPoints, GridCell asChild leaves the role to a component control
- Typed part names (state({ parts })) and typed command payloads (command<Payload>()(name)), so a mistyped part or payload is a type error
- Readable type parameter names, helper tests under the standard describes, pure-code lint covers globalThis, performance and DOM types
…d of racing its duration
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.
Add @vega-ui/core, the framework-free widget pipeline: event → normalize → step(state, input) → { state, actions } → output(state) → DOM. State, inputs, steps, actions and output are plain data and pure functions, so a widget runs and is tested in node with simulate from @vega-ui/core/test.
The core ships the roving, selection, typeahead and grid fragments and the DOM adapter connect, which builds inputs from events, writes the output and executes the actions.
Add @vega-ui/widgets with the logic of the composite components, one entry point per widget (@vega-ui/widgets/select), and run the components of @vega-ui/react on it: Listbox, Select, Grid, the pickers, Calendar, the date, time, number, phone, pin and password fields, Slider, Sheet, Drawer, Dialog, Popover, Tooltip, Collapsible, Accordion, Avatar, Checkbox, PageControl and the snap scrollers. The React adapter (useWidget, useOutput, useItem) lives in the ui internals; react-kit and the hooks and helpers the widgets replace are dropped. Phone numbering moves to @vega-ui/i18n.
Bring core and widgets in line with the architecture requirements:
Also: