carbon icon indicating copy to clipboard operation
carbon copied to clipboard

Refactor FocusTrap to TypeScript FE-4853

Open edleeks87 opened this issue 1 year ago • 2 comments

fix #5295 fix #5342

Proposed behaviour

Ensures the keydown listener is registered in the event capture phase Refactors files into TypeScript Refactors unit tests into RTL

Current behaviour

The keydown listener is registered in the event propagation phase Component files are JavaScript Unit tests use Enzyme

Checklist

  • [x] Commits follow our style guide
  • [x] Related issues linked in commit messages if required
  • [x] Unit tests added or updated if required
  • [x] Cypress automation tests added or updated 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

Test bug described in issue in storybook and in linked sandbox

The following CodeSandbox is an example of the broken behaviour. You can see the new behaviour by looking at the version in the comment by codesandbox[bot].

https://codesandbox.io/s/beautiful-gagarin-cqorrv?file=/src/index.js

edleeks87 avatar Jul 22 '22 10:07 edleeks87

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 da12151e6043af53128fd102f5caef67115e5aaa:

Sandbox Source
carbon-quickstart Configuration
carbon-quickstart-typescript Configuration
carbon-quickstart PR
vigorous-chaplygin-vyd17w PR

codesandbox-ci[bot] avatar Jul 22 '22 10:07 codesandbox-ci[bot]



Test summary

2737 0 2 0Flakiness 0


Run details

Project carbon
Status Passed
Commit bbdcd5d2b7
Started Aug 15, 2022 1:06 PM
Ended Aug 15, 2022 1:12 PM
Duration 06:00 💡
OS Linux Debian - 10.10
Browser Chrome 100

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 Jul 22 '22 10:07 cypress[bot]

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

The release is available on:

Your semantic-release bot :package::rocket:

carbonci avatar Aug 17 '22 09:08 carbonci