carbon
carbon copied to clipboard
fix(dialog): add DialogSizes type to component interface (FE-5390)
closes #5516
Proposed behaviour
- Add missing
DialogSizestype from the interface for theDialogcomponent - Amend typing of
DialogSizesand properties ofContentPaddingInterfaceso consumers can see their types as literal unions, not type alias names - Convert story setup to CSF stories with MDX docs approach to allow for story type checking
Current behaviour
DialogSizestype is missing fromDialoginterface- Cannot type check stories
Checklist
- [x] Commits follow our style guide
- [x] Related issues linked in commit messages if required
- [x] Screenshots are included in the PR if useful
- [x] All themes are supported if required
- [x] Unit tests added or updated if required
- [x] Cypress automation tests added or updated if required
- [x] Storybook added or updated if required
- [x] Translations added or updated (including creating or amending translation keys table in storybook) if required
- [x] Typescript
d.tsfile added or updated if required
QA
- [ ] Tested in CodeSandbox/storybook
- [ ] Add new Cypress test coverage if required
- [ ] Carbon implementation matches Design System/designs
- [ ] UI Tests GitHub check reviewed if required
Additional context
Testing instructions
- Check size and padding options are being shown in the commented props in the following codesandbox: https://codesandbox.io/s/dialog-types-fix-ghyf0j
- Open storybook, check for all
Dialogstories that the rendered source code underShow codeis correct and inline with master. - Create a simple Carbon project and test
DialogSizesis importable:npx create-react-app my-app --template typescriptnpm i https://pkg.csb.dev/Sage/carbon/commit/fed4608f/carbon-react
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 7f4e1cd949dd22659b015f08666e4450fd5968cb:
| Sandbox | Source |
|---|---|
| carbon-quickstart | Configuration |
| carbon-quickstart-typescript | Configuration |
Test summary
Run details
| Project | carbon |
| Status | Passed |
| Commit | 7f4e1cd949 |
| Started | Oct 14, 2022 9:00 AM |
| Ended | Oct 14, 2022 9:06 AM |
| Duration | 05:58 💡 |
| OS | Linux Debian - 11.4 |
| Browser | Chrome 106 |
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
For QA: Please use these codesandboxes when testing if DialogSizes has been correctly exported:
Current behaviour: https://codesandbox.io/s/dialog-sizes-export-current-5uqqjn Proposed behaviour: https://codesandbox.io/s/dialog-sizes-export-proposed-67kvdx
:tada: This PR is included in version 111.4.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket: