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

feat(cdk: click-outside): add click-outside #207

Merged
merged 1 commit into from
Feb 27, 2021

Conversation

LaamGinghong
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added/updated or not needed
  • Docs and demo have been added/updated or not needed

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Component style update
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Application (the showcase website) / infrastructure changes
  • Other... Please describe:

What is the current behavior?

What is the new behavior?

Other information

@LaamGinghong
Copy link
Contributor Author

cdk增加全局点击事件,之前当浮层的trigger是click的时候,只有重新点slot才会关闭浮层,现在增加点击全局也能关闭浮层,增加交互体验

@LaamGinghong
Copy link
Contributor Author

@danranVm 请review

@codecov
Copy link

codecov bot commented Feb 16, 2021

Codecov Report

Merging #207 (8c8becd) into main (67adb9d) will decrease coverage by 0.32%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #207      +/-   ##
==========================================
- Coverage   95.73%   95.40%   -0.33%     
==========================================
  Files          96      112      +16     
  Lines        2016     2068      +52     
  Branches      377      379       +2     
==========================================
+ Hits         1930     1973      +43     
- Misses         39       45       +6     
- Partials       47       50       +3     
Impacted Files Coverage Δ
packages/cdk/overlay/src/useOverlay.ts 89.58% <75.00%> (-1.14%) ⬇️
packages/cdk/click-outside/src/useClickOutside.ts 84.61% <84.61%> (ø)
packages/cdk/utils/dom.ts 87.09% <100.00%> (+0.88%) ⬆️
packages/components/affix/index.ts 100.00% <0.00%> (ø)
packages/components/input/index.ts 100.00% <0.00%> (ø)
packages/components/card/index.ts 100.00% <0.00%> (ø)
packages/components/timeline/index.ts 100.00% <0.00%> (ø)
packages/components/badge/index.ts 100.00% <0.00%> (ø)
packages/components/result/index.ts 100.00% <0.00%> (ø)
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67adb9d...8c8becd. Read the comment docs.

@LaamGinghong LaamGinghong force-pushed the feature/overlay branch 3 times, most recently from 7ec4dcd to ef91c8e Compare February 17, 2021 09:51
@LaamGinghong
Copy link
Contributor Author

@danranVm 有空看看

packages/cdk/click-outside/src/useClickOutside.ts Outdated Show resolved Hide resolved
packages/cdk/click-outside/src/useClickOutside.ts Outdated Show resolved Hide resolved
packages/cdk/click-outside/src/useClickOutside.ts Outdated Show resolved Hide resolved
packages/cdk/click-outside/src/useClickOutside.ts Outdated Show resolved Hide resolved
packages/cdk/click-outside/src/useClickOutside.ts Outdated Show resolved Hide resolved
packages/cdk/utils/__tests__/wait.spec.ts Outdated Show resolved Hide resolved
packages/cdk/overlay/src/useOverlay.ts Outdated Show resolved Hide resolved
@danranVm danranVm changed the title feat(cdk: overlay): add global click event feat(cdk: click-outside): add click-outside Feb 17, 2021
@danranVm danranVm mentioned this pull request Feb 20, 2021
95 tasks
@LaamGinghong LaamGinghong force-pushed the feature/overlay branch 2 times, most recently from 07a7ce2 to 753de2e Compare February 26, 2021 11:03
Copy link
Member

@danranVm danranVm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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