Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(pod): convert component code to typescript #5451

Closed
wants to merge 8 commits into from

Conversation

Parsium
Copy link
Contributor

@Parsium Parsium commented Sep 6, 2022

Proposed behaviour

  • Refactor component, style and index files of Pod to typescript
  • Update Pod such that if onEdit is a string, render edit button as a Link with a href instead of a to prop - which was deprecated some time ago (see commit for details)
  • Update test stories file to typescript CSF
  • Rewrite E2E cypress tests - which test the title, subtitle, footer and children props - to enzyme tests.
    • Due to an encountered storybook issue with visiting a story url, where the story args are not set using the url parameters as expected. The Storybook Args and/or Controls addons are suspected to be the cause.
  • Amend Grid's E2E cypress tests - which use Pod, to be more generic so they are independent.

Current behaviour

  • Pod is written in javascript and its test stores file is written in MDX

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Cypress automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • 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

  • Pod tests will be refactored to typescript in a separate PR - due to the complexity of the file.

Testing instructions

  • Verify no regressions were introduced from this refactor.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 6, 2022

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 64734b6:

Sandbox Source
carbon-quickstart Configuration
carbon-quickstart-typescript Configuration

@cypress
Copy link

cypress bot commented Sep 6, 2022



Test summary

2539 0 2 0Flakiness 0


Run details

Project carbon
Status Passed
Commit 64734b6
Started Sep 16, 2022 10:10 AM
Ended Sep 16, 2022 10:15 AM
Duration 05:32 💡
OS Linux Debian - 11.3
Browser Chrome 103

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

@Parsium Parsium force-pushed the typescript/pod branch 2 times, most recently from ec2e88b to 399ac6b Compare September 6, 2022 16:05
Due to issue with storybook where visiting a story via a url with args set
using url parameters does not work properly.
@Parsium Parsium force-pushed the typescript/pod branch 2 times, most recently from a9ef005 to 2365c0e Compare September 8, 2022 13:48
@edleeks87 edleeks87 self-requested a review September 8, 2022 14:07
DipperTheDan
DipperTheDan previously approved these changes Sep 12, 2022
src/components/pod/pod.component.tsx Show resolved Hide resolved
src/components/pod/pod.component.tsx Show resolved Hide resolved
src/components/pod/pod.component.tsx Outdated Show resolved Hide resolved
src/components/pod/pod.spec.js Outdated Show resolved Hide resolved
src/components/pod/pod.spec.js Outdated Show resolved Hide resolved
src/components/pod/pod.style.ts Show resolved Hide resolved
edleeks87
edleeks87 previously approved these changes Sep 13, 2022
DipperTheDan
DipperTheDan previously approved these changes Sep 13, 2022
@Parsium Parsium marked this pull request as ready for review September 13, 2022 15:53
@Parsium Parsium requested review from a team as code owners September 13, 2022 15:53
@Parsium Parsium dismissed stale reviews from DipperTheDan and edleeks87 via 5b24d03 September 15, 2022 14:28
@Parsium Parsium force-pushed the typescript/pod branch 4 times, most recently from 98a2732 to 64734b6 Compare September 16, 2022 08:21
@Parsium Parsium closed this Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants