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

WIP: perf: lock the scroll position of the body when the Modal component is opened #3818

Conversation

ruibaby
Copy link
Member

@ruibaby ruibaby commented Apr 23, 2023

What type of PR is this?

/kind improvement
/area console
/milestone 2.5.x

What this PR does / why we need it:

当有任意弹框出现时,自动锁定 body 元素的滚动位置。

Which issue(s) this PR fixes:

Fixes #3817

Special notes for your reviewer:

测试方式:

  1. 打开任意弹框,使用鼠标滚动页面,观察页面是否发生滚动即可。

Does this PR introduce a user-facing change?

优化 Console 端 Modal 组件,支持打开时自动锁定 body 的滚动位置。

@f2c-ci-robot f2c-ci-robot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/improvement Categorizes issue or PR as related to a improvement. labels Apr 23, 2023
@f2c-ci-robot f2c-ci-robot bot added this to the 2.5.x milestone Apr 23, 2023
@f2c-ci-robot f2c-ci-robot bot added the area/console Issues or PRs related to the Halo Console label Apr 23, 2023
@f2c-ci-robot f2c-ci-robot bot requested review from guqing and wzrove April 23, 2023 03:14
@codecov
Copy link

codecov bot commented Apr 23, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a4e862c) 57.07% compared to head (c88bb1a) 57.07%.
Report is 22 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #3818   +/-   ##
=========================================
  Coverage     57.07%   57.07%           
  Complexity     3329     3329           
=========================================
  Files           587      587           
  Lines         18956    18956           
  Branches       1402     1402           
=========================================
  Hits          10820    10820           
  Misses         7558     7558           
  Partials        578      578           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ruibaby
Copy link
Member Author

ruibaby commented Apr 23, 2023

/hold

修改之后会和之前引入的 overlayscrollbars 有冲突,暂时 hold。

@f2c-ci-robot f2c-ci-robot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 23, 2023
@ruibaby ruibaby changed the title perf: lock the scroll position of the body when the Modal component is opened WIP: perf: lock the scroll position of the body when the Modal component is opened Apr 24, 2023
@ruibaby ruibaby modified the milestones: 2.5.x, Backlog May 7, 2023
Copy link

sonarcloud bot commented Jan 30, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

f2c-ci-robot bot commented Jan 30, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from ruibaby. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

f2c-ci-robot bot commented Feb 6, 2024

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@f2c-ci-robot f2c-ci-robot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 6, 2024
@JohnNiang
Copy link
Member

/ping @ruibaby

@ruibaby
Copy link
Member Author

ruibaby commented May 24, 2024

/ping @ruibaby

暂时先不改了,因为 body 元素用了 overlayscrollbars,会有兼容问题,后续可能会考虑移除。

/close

@f2c-ci-robot f2c-ci-robot bot closed this May 24, 2024
Copy link

f2c-ci-robot bot commented May 24, 2024

@ruibaby: Closed this PR.

In response to this:

/ping @ruibaby

暂时先不改了,因为 body 元素用了 overlayscrollbars,会有兼容问题,后续可能会考虑移除。

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/console Issues or PRs related to the Halo Console do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/improvement Categorizes issue or PR as related to a improvement. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

优化 Console 的 Modal 组件,期望支持打开 Modal 的时候,阻止 body 的滚动
2 participants