Skip to content

feat: support data-* #404

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

Merged
merged 2 commits into from
May 29, 2023
Merged

feat: support data-* #404

merged 2 commits into from
May 29, 2023

Conversation

rkuykendall
Copy link
Contributor

@rkuykendall rkuykendall commented Mar 1, 2023

Used react-component/dialog#259 as reference.

@vercel
Copy link

vercel bot commented Mar 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
drawer ❌ Failed (Inspect) Mar 2, 2023 at 5:20PM (UTC)

@yoyo837
Copy link
Member

yoyo837 commented Mar 2, 2023

Please add some test case for it.

@codecov
Copy link

codecov bot commented Mar 2, 2023

Codecov Report

Merging #404 (ca804cb) into master (94a9e58) will not change coverage.
The diff coverage is n/a.

❗ Current head ca804cb differs from pull request most recent head da2d30f. Consider uploading reports for the commit da2d30f to get more accurate results

@@            Coverage Diff            @@
##            master      #404   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines          134       134           
  Branches        51        51           
=========================================
  Hits           134       134           
Impacted Files Coverage Δ
src/DrawerPopup.tsx 100.00% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@rkuykendall
Copy link
Contributor Author

Thank you @yoyo837, test added.

~/projects/drawer patch-1 💎 yarn test
yarn run v1.22.19
$ umi-test
 PASS  tests/motion.spec.tsx
  motion
    ✓ motion patch on the correct element (28 ms)
    ✓ mask close should only trigger once (10 ms)

 PASS  tests/index.spec.tsx
  rc-drawer-menu
    ✓ single drawer (22 ms)
    ✓ switch open drawer (7 ms)
    ✓ default props should work (5 ms)
    ✓ forceRender (1 ms)
    ✓ contentWrapperStyle (3 ms)
    ✓ autoFocus (4 ms)
    ✓ tab should always in the content (3 ms)
    ✓ zIndex (1 ms)
    ✓ width on the correct element (2 ms)
    ✓ warning for string width (13 ms)
    ✓ pass data props to internal div (2 ms)
    push
      ✓ left (14 ms)
      ✓ right (6 ms)
      ✓ top (6 ms)
      ✓ bottom (6 ms)
      ✓ disable push (4 ms)
      ✓ truthy (6 ms)
    mask
      ✓ mask false not lock body scroll (2 ms)
      ✓ maskClosable (5 ms)
      ✓ maskClosable false (2 ms)
    destroyOnClose
      ✓ basic (4 ms)
      ✓ inline (2 ms)
    placement
      ✓ left (3 ms)
      ✓ right (1 ms)
      ✓ top (2 ms)
      ✓ bottom (2 ms)
      ✓ change placement (2 ms)
    getContainer
      ✓ element (2 ms)
      ✓ false (2 ms)
      ✓ function (2 ms)
    keyboard
      ✓ ESC to exit (2 ms)
      ✓ disable ESC to exit (2 ms)

Test Suites: 2 passed, 2 total
Tests:       34 passed, 34 total
Snapshots:   0 total
Time:        1.882 s, estimated 2 s
Ran all test suites.
  console.error
    Warning: Invalid value type of `width` or `height` which should be number type instead.

      at console.<anonymous> (node_modules/jest-mock/build/index.js:866:25)
      at method (node_modules/rc-util/lib/warning.js:18:13)
      at call (node_modules/rc-util/lib/warning.js:32:5)
      at warningOnce (node_modules/rc-util/lib/warning.js:37:3)

✨  Done in 3.60s.

@yoyo837 yoyo837 merged commit 3ec3caf into react-component:master May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants