uinix-ui icon indicating copy to clipboard operation
uinix-ui copied to clipboard

V1 Release

Open chrisrzhou opened this issue 4 years ago • 2 comments

Goals

  • Significantly simplify and streamline APIs and concepts (remove unimportant methods, improve names/interfaces)
  • Remove opinionated defaults (e.g. default theme spec).
  • Improve types (promote static usage of uinix-ui while offering dynamic/friendly hooks)
  • Improve docs
  • Improve tests and coverage

New Features

  • [x] New configuration (enableCssVariables, namespace).
  • [x] load API now returns a cleanup function (i.e. "unload").

Breaking Changes

Removed

  • [x] Remove styles.typography (also removes rendering font support).
    • Rendering styles.typography.fontFaces is naturally removed (consumers should handle rendering/loading fonts).
    • styles.typography.global is naturally removed (just use globalStyles`).
    • useTypographyVariant hook is naturally removed.
    • Text.variant no longer reads from styles.typography.variants and simply reads from styles.variants.
  • [x] Remove default theme spec (consumers must explicitly provide one).
  • [x] Remove unvaluable create* methods (e.g. createStyles, createTheme, createIcons, createConfig).
  • [x] merge util removed, install or import from uinix-fp instead.
  • [x] Remove all use* hooks (it's better for consumers to directly access their system statically).

Changed

  • [x] styles.breakpoints is now moved to config.responsiveBreakpoints.
  • [x] styles.global is renamed to globalStyles.
  • [x] Icon no longer conditionally renders as button or div (consumers now control this).
  • [x] createSystem is removed and load is renamed to createSystem.
  • [x] useVariant hook is renamed to useStyleVariant.
  • [x] styles.variants is removed. useStyleVariant hook directly accesses styles rules.
  • [x] Components
    • variant prop is renamed to styleVariant (interoperable with styles, styleProps props).
    • Style prop precedence now follows with the following importance: style < styleVariant < styles < shorthandProp

chrisrzhou avatar Dec 03 '21 22:12 chrisrzhou

[email protected] has been released, which can further narrow the responsibility of uinix-ui to simply integrate against the system of four components.

chrisrzhou avatar May 26 '22 07:05 chrisrzhou

V1's API has been reduced and finalized in https://github.com/uinix-js/uinix-ui/blob/c2d7f40076f2764d14830d57b3161ed71e710634/index.js.

This greatly minimized API facilitates upcoming internal tasks:

  • [ ] Update types
  • [ ] Update tests
  • [ ] Update docs
  • [ ] Draft migration guide to @1 in Github release notes.

chrisrzhou avatar Nov 28 '22 09:11 chrisrzhou