-
Notifications
You must be signed in to change notification settings - Fork 299
fix(grid): [grid] fix panel flash in page #1903
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
WalkthroughThe recent updates to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- packages/vue/src/grid/package.json (1 hunks)
- packages/vue/src/grid/src/filter/src/panel.tsx (2 hunks)
Additional context used
Biome
packages/vue/src/grid/src/filter/src/panel.tsx
[error] 298-301: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
Additional comments not posted (5)
packages/vue/src/grid/package.json (3)
4-4
: Version increment is appropriate.The version change from
3.18.0
to3.18.1
is suitable for a minor update, indicating bug fixes or minor enhancements.
6-6
: License addition is appropriate.Adding the "MIT" license field clarifies the package's licensing terms.
15-33
: Dependency management improvements are appropriate.The reorganization of dependencies and the addition of
@opentiny-internal/vue-test-utils
andvitest
indevDependencies
enhance clarity and support testing.packages/vue/src/grid/src/filter/src/panel.tsx (2)
291-294
: Improved popper destruction logic.The explicit check and null assignment enhance readability and ensure proper cleanup of resources.
295-308
: Improved popper initialization logic.The visibility check ensures the popper is only created when needed, enhancing performance. The addition of
gpuAcceleration: false
may affect rendering performance; ensure this change doesn't introduce any issues.Verification successful
Consistent use of
gpuAcceleration: false
across the codebase.The setting
gpuAcceleration: false
is consistently used in various components, suggesting an intentional choice by the developers. This consistency indicates that its impact on rendering performance has likely been considered and deemed acceptable.
- Files with
gpuAcceleration: false
:
packages/vue/src/select/src/index.ts
packages/vue/src/select-dropdown/src/index.ts
packages/vue/src/popover/src/index.ts
packages/vue/src/grid/src/filter/src/panel.tsx
packages/vue/src/base-select/src/index.ts
packages/renderless/src/cascader/vue.ts
packages/renderless/src/picker/index.ts
packages/renderless/src/common/deps/vue-popper.ts
packages/renderless/src/dropdown-menu/index.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact of `gpuAcceleration: false` on rendering performance. # Test: Search for all instances where `gpuAcceleration` is set. Expect: Consistent usage across the codebase. rg --type tsx 'gpuAcceleration: false'Length of output: 68
Script:
#!/bin/bash # Description: Verify the impact of `gpuAcceleration: false` on rendering performance. # Test: Search for all instances where `gpuAcceleration` is set. Expect: Consistent usage across the codebase. rg --type ts 'gpuAcceleration: false'Length of output: 1022
Tools
Biome
[error] 298-301: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
const reference = targetElemParentTr && targetElemParentTr.querySelector(`svg.tiny-grid-filter__btn.${id}`) | ||
const popper = this.$el | ||
|
||
popper.style.zIndex = PopupManager.nextZIndex() | ||
popper.style.zIndex = PopupManager.nextZIndex() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using optional chaining.
Using optional chaining can prevent runtime errors if targetElemParentTr
is null.
- const reference = targetElemParentTr && targetElemParentTr.querySelector(`svg.tiny-grid-filter__btn.${id}`)
+ const reference = targetElemParentTr?.querySelector(`svg.tiny-grid-filter__btn.${id}`)
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
const reference = targetElemParentTr && targetElemParentTr.querySelector(`svg.tiny-grid-filter__btn.${id}`) | |
const popper = this.$el | |
popper.style.zIndex = PopupManager.nextZIndex() | |
popper.style.zIndex = PopupManager.nextZIndex() | |
const reference = targetElemParentTr?.querySelector(`svg.tiny-grid-filter__btn.${id}`) | |
const popper = this.$el | |
popper.style.zIndex = PopupManager.nextZIndex() |
Tools
Biome
[error] 298-301: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
* feat: gitHub-action remove runtime script * fix(anchor): 修复anchor点击后滚动响应滞后的问题,适配saas主题 (#1892) * feat: update package.json dependencies * fix(theme): Fixed the issue that multiple root files are generated when the theme is packaged. (#1893) * fix(theme): 删除无用的error-page文件导致打包多个root的问题 * fix(theme): 优化打包脚本 * fix: fix time-select build error * fix: split theme build error * fix(nav-menu): [nav-menu] error occurred when modifying route redirection (#1907) * fix(nav-menu): [nav-menu] error occurred when modifying route redirection * fix(nav-menu): [nav-menu] error occurred when modifying route redirection * fix(grid): [grid] fix panel flash in page (#1903) * fix(select): fix select for no-match-value 's bug (#1926) * docs(changelog): update 3.18.0 changelog (#1928) * fix(link): remove link's emits declare and add e2e test for click event (#1944) * fix(theme): fix theme dark style (#2019) * fix(theme): fix theme dark style * fix(theme): fix theme dark style * feat(docs): 文档增加切换主题提示 (#2024) * feat: update docs version * fix(tree): [tree] fix tree showLine props's bug , sometimes the line is too… (#2015) * fix(tree): fix tree showLine props's bug , sometimes the line is too long * fix(theme): update version * build(sites): optimize build chunks num (#2028) * feat: update vue-docs version * fix(docs): The theme switch prompt is placed in the lower right corner. (#2030) * fix(docs): 主题切换提示放到右下角 * fix(docs): 增加docs版本 * fix(modal): [modal] after the window size is changed, the window is displayed in the center (#2033) * fix(modal): [modal]dragging the modal box,will be displayed in the center * fix: modify review code * fix(modal): modify review code * fix: modify renderless of version * fix(grid): [grid] fix empty slot error when is-center-empty is set (#2051) * docs: fix demo anchor not correct (#2056) * feat: update docs version * Merge branch 'dev' of github.com:opentiny/tiny-vue into sync-3.18.0-to-dev --------- Co-authored-by: chenxi-20 <76168465+chenxi-20@users.noreply.github.com> Co-authored-by: wuyiping0628 <42107997+wuyiping0628@users.noreply.github.com> Co-authored-by: gimmyhehe <975402925@qq.com> Co-authored-by: 申君健 <40288193@qq.com> Co-authored-by: chenxi-20 <2465950588@qq.com> Co-authored-by: James <72028410+James-9696@users.noreply.github.com>
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
New Features
Bug Fixes
Chores