carbon icon indicating copy to clipboard operation
carbon copied to clipboard

fix(dialog): add DialogSizes type to component interface (FE-5390)

Open Parsium opened this issue 3 years ago • 2 comments
trafficstars

closes #5516

Proposed behaviour

  • Add missing DialogSizes type from the interface for the Dialog component
  • Amend typing of DialogSizes and properties of ContentPaddingInterface so 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

  • DialogSizes type is missing from Dialog interface
  • 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.ts file 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 Dialog stories that the rendered source code under Show code is correct and inline with master.
  • Create a simple Carbon project and test DialogSizes is importable:
    1. npx create-react-app my-app --template typescript
    2. npm i https://pkg.csb.dev/Sage/carbon/commit/fed4608f/carbon-react

Parsium avatar Sep 30 '22 13:09 Parsium

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

codesandbox-ci[bot] avatar Sep 30 '22 13:09 codesandbox-ci[bot]



Test summary

3361 0 3 0Flakiness 0


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

cypress[bot] avatar Sep 30 '22 13:09 cypress[bot]

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

Parsium avatar Oct 05 '22 15:10 Parsium

:tada: This PR is included in version 111.4.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

carbonci avatar Oct 14 '22 09:10 carbonci