Repository navigation
Description
This is an extension of Implementing a Component System
Context ✨
The FontSizePicker component was first to receive the upgrade to use the new Components System.
We opted for a strategy (proposed by @gziolo) that imports and uses the various system parts via npm dependencies, rather than migrating the code by copying/pasting them over.
This was largely to expedite us figuring out the process for integration.
Using the new Component System code via external packages is not the end goal.
Text Component 🔠
Continuing this work, we'll need to (effectively) "backfill" the dependencies required for FontSizePicker. It's worth repeating that this was the original plan, but it was adjusted to expedite integration testing.
After chatting with @saramarcondes , we felt like a good candidate for this would be <Text />.
Reasons being that Text is a low-level and common UI element we plan on using in many places. Also, Text already exists as an experimental component in the project. The one coming from the new system is vastly improved.
Tasks ✅
In order to integrate the Text component we need to move the following dependencies into the GB repo in this order:
- partial
utils-
is, everything depends on this ui-utils: Add new package with two type checking functions #28028 -
useIsomorphicLayoutEffect-> updatecomposeto export this, dependency ofcontextCompose: Export useIsomorphicLayoutEffect and use it #28023 -
getOptimalTextShade, dependency ofText -
getDisplayName, dependency ofcreate-stylesandcontext -
getComputedColor, dependency ofstyles
-
-
substatesubstate: Add package #28116- Migrate package (updated with fork of
zustand)
- Migrate package (updated with fork of
-
create-styles- Update to use the following directly:
merge-refshoistNonReactStaticsmemoize(frommemize)
- Update to use the following directly:
-
styles- Update to use the following directly:
colorize(fromtinycolor2)reakit-warning
- Update to use the following directly:
-
context- Update to use deepmerge and deep-equal directly and
useIsomorphicLayoutEffectfromcompose.
- Update to use deepmerge and deep-equal directly and
-
Truncate- completely new -
Text- uses adapter system
Tracking 📆
I've added the tasks (above) on a Google Spreadsheet Gaant chart as another way of tracking progress.
https://docs.google.com/spreadsheets/d/1gfzznyJtTr3hHoGkGRdeBRjhuZVMRalF9NuLrxkl4Nk/edit?usp=sharing
cc'ing @saramarcondes
Activity
ItsJonQ commentedon Jan 28, 2021
I think we can close this one for #28475