This is a group of unstable/work-in-progress components. Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functionality. The Labs modules allow us to do that as needed.
Due to the nature of this bundle of components, we will be continuously iterating, likely making breaking changes. The goal of this bundle is to work unconstrained by our design system's semantic versioning. This means that breaking changes can be deployed to Labs modules at any time and it will not trigger a major version bump across our other modules. Regardless of the fact that we use a fixed version number for all components, all changes/additions in this bundle will never result in a major version bump across our component library.
By consuming any of these modules, you acknowledge the potential complexity of updating and ultimately performing a migration when components are promoted to a stable version.
These components are purely opt in, so they are not included in the universal modules
@workday/canvas-kit-css
and @workday/canvas-kit-react
.
/modules
...
/_labs
/new-component
/css
/* Standard CSS component structure */
/react
/* Standard React component structure */
- Run
yarn create-module
- When asked
Is this an unstable component? [Y/n]
, entery
orY
. - Your new module will be generated in accordance with the file structure above. It will get a
package name of
@workday/canvas-kit-labs-<TARGET>-<COMPONENT>
. - If you had the storybook server running, you may need to restart it.
- Copy it into the above module structure
- Change the package name in
package.json
to@workday/canvas-kit-labs-<TARGET>-<COMPONENT>
- Add a warning to the README:
This component is work in progress and currently in pre-release.
- Update any necessary paths (links to storybook utils, tsconfig, etc.)
- Change the storybook path to add a
Labs
prefix (e.g.Labs/Menu/Default
)
- Move the module folder from
modules/_labs
tomodules/
- Rename the package in
package.json
to@workday/canvas-kit-labs-<TARGET>-<COMPONENT>
(removelabs-
) - Remove the warning from the README
- Update any necessary paths (links to storybook utils, tsconfig, etc.)
- Open an issue to have the
labs
component deprecated in npm.
Note: When components are promoted from Canvas Kit Labs, their old namespace is left orphaned in npm, so these version will still be available and will never be overwritten.