feat: Responsive Styles Support
Summary
Adding new feature to support responsive styles.
Resolves: #1717
This will allow users to apply responsive styles to components/elements.
Where Should the Reviewer Start?
modules/react/common/lib/responsive
Checklist
- [ ] tests are changed or added
- [ ] code has been documented
- [ ] design approved final implementation
- [ ] a11y approved final implementation
- [ ] code adheres to the API & Pattern guidelines
Test summary
Run details
| Project | canvas-kit |
| Status | Passed |
| Commit | 3dd775c82f ℹ️ |
| Started | Oct 28, 2022 8:54 PM |
| Ended | Oct 28, 2022 9:00 PM |
| Duration | 06:05 💡 |
| OS | Linux Ubuntu - 20.04 |
| Browser | Electron 94 |
View run in Cypress Dashboard ➡️
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard
Can you add the following line to the .storybook > routes.js file in this PR?
'/getting-started/for-developers/resources/responsive-styling/':
'hooks-and-utilities-responsive-styling--responsive-container',
The object in that file is arranged alphabetically by key so the line should be added in between the ..creating-compound-components/ entry on L53 and the ..style-props/ entry below it.
Adding that line allows us to link to the Responsive.stories.mdx page from other MDX pages using /getting-started/for-developers/resources/responsive-styling/. Storybook will rewrite that link to the correct SB URL (e.g., ...?path=/docs/hooks-and-utilities-responsive-styling--responsive-container) so it works when browsing docs on SB. The /getting-started/for-developers/resources/responsive-styling/ path will be used on the site.
Code wise this looks great and the test look great! I'll let @jamesfan give the docs a final review!
Can you update the Responsive Styles section of the v8 Upgrade Guide in this PR now that ResponsiveContextProvider and useResponsiveContext have been removed?