From 3abd6cac709de54e1be2eee3b5a6c22c0bdadb7b Mon Sep 17 00:00:00 2001 From: serikjensen Date: Mon, 11 May 2020 10:16:21 -0500 Subject: [PATCH] chore(ui-component-examples,ui-theme-tokens): switch component examples loader to cjs refs: INSTUI-2559 TEST PLAN: - Component examples should load using `yarn dev:examples` and `yarn start:examples` in all supported browsers (Note: legacy edge will not load them because the bundle size is too big to load. This is fine.) BREAKING CHANGE: - renderPage and renderExample are no longer supplied by the webpack component-examples-loader Change-Id: I5c632274264d7c934abc86f41399b8a7cda23e26 Reviewed-on: https://gerrit.instructure.com/c/instructure-ui/+/236873 Tested-by: Service Cloud Jenkins Reviewed-by: Ken Meleta Product-Review: Ken Meleta QA-Review: Daniel Sasaki Visual-Regression-Test: Steve Jensen --- docs/guides/v7-upgrade-guide.md | 5 +- packages/__examples__/.storybook/config.js | 9 ++- .../.storybook}/renderExample.js | 5 +- .../.storybook}/renderPage.js | 4 +- packages/__examples__/package.json | 5 ++ packages/ui-component-examples/.eslintignore | 2 - packages/ui-component-examples/.gitignore | 3 - packages/ui-component-examples/README.md | 4 +- .../ui-component-examples/babel.config.js | 31 -------- .../generateComponentExamples.test.js | 75 +++++++++---------- .../generatePropCombinations.test.js | 34 ++++----- .../__tests__/parsePropValues.test.js | 0 .../{src => lib}/component-examples-loader.js | 31 ++++---- .../{src => lib}/generateComponentExamples.js | 32 ++++---- .../{src => lib}/generatePropCombinations.js | 4 +- .../{src => lib}/index.js | 15 ++-- .../{src => lib}/parsePropValues.js | 10 +-- packages/ui-component-examples/package.json | 25 ++----- .../src/utils/generateA11yTests.js | 6 +- packages/ui-theme-tokens/src/index.js | 4 +- 20 files changed, 141 insertions(+), 163 deletions(-) rename packages/{ui-component-examples/src => __examples__/.storybook}/renderExample.js (92%) rename packages/{ui-component-examples/src => __examples__/.storybook}/renderPage.js (92%) delete mode 100644 packages/ui-component-examples/.gitignore delete mode 100644 packages/ui-component-examples/babel.config.js rename packages/ui-component-examples/{src => lib}/__tests__/generateComponentExamples.test.js (84%) rename packages/ui-component-examples/{src => lib}/__tests__/generatePropCombinations.test.js (80%) rename packages/ui-component-examples/{src => lib}/__tests__/parsePropValues.test.js (100%) rename packages/ui-component-examples/{src => lib}/component-examples-loader.js (81%) rename packages/ui-component-examples/{src => lib}/generateComponentExamples.js (90%) rename packages/ui-component-examples/{src => lib}/generatePropCombinations.js (93%) rename packages/ui-component-examples/{src => lib}/index.js (79%) rename packages/ui-component-examples/{src => lib}/parsePropValues.js (92%) diff --git a/docs/guides/v7-upgrade-guide.md b/docs/guides/v7-upgrade-guide.md index ddde319fec..2f721d7e05 100644 --- a/docs/guides/v7-upgrade-guide.md +++ b/docs/guides/v7-upgrade-guide.md @@ -266,6 +266,9 @@ DateTimeInput has been removed from ui-forms. See a __read only__ example of imp ### Select -Select within the ui-forms package has been removed; use [Select](/#Select) from `ui-select` instead. Similar to DateInput, Select is a controlled only component that will need to be composed in the consuming app. Examples are available for managing state within this new component. +Select within the ui-forms package has been removed; use [Select](#Select) from `ui-select` instead. Similar to DateInput, Select is a controlled only component that will need to be composed in the consuming app. Examples are available for managing state within this new component. __Important note:__ If you do not need the level of customization that ui-select/Select provides, use SimpleSelect instead (available from the `ui-simple-select` package). SimpleSelect closely parallels the functionality of a standard HTML `