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: Optimize table sorting hot spots #2413

Merged
merged 2 commits into from
Aug 20, 2024
Merged

Conversation

YyumeiZhang
Copy link
Collaborator

中文模板 / Chinese Template

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Test Case
  • TypeScript definition update
  • Document improve
  • CI/CD improve
  • Branch sync
  • Other, please describe:

PR description

Fixes #
设计师反馈,优化排序能力交互细节(仅有排序功能时,支持点击整个表头column触发排序。
优化前
image

优化后

  1. 当仅有排序功能时候:
    image
  2. 当除去排序功能外还有其他功能,或者完全自定义渲染(useFullRender)时候,保持和原来一致。
    Tooltip 仅在 hover 排序按钮时候出现
    image

Changelog

🇨🇳 Chinese

  • Feat: 优化 Table 的排序交互,仅有排序功能时,支持点击整个表头column触发排序。Column 支持 showSortTooltip API支持设置是否显示 tooltip,默认为 true。

🇺🇸 English

  • Feat: Optimize the sorting interaction of Table. When there is only sorting function, click on the entire table header column to trigger sorting. Column supports the showSortTooltip API to set whether to display the tooltip, and the default is true.

Checklist

  • Test or no need
  • Document or no need
  • Changelog or no need

Other

  • Skip Changelog

Additional information

@shijiatongxue
Copy link
Collaborator

shijiatongxue commented Aug 15, 2024

showSortTooltip 默认为 true 不太合适,ui 变化有点大

Copy link

cypress bot commented Aug 15, 2024



Test summary

267 0 11 0


Run details

Project semi-design
Status Passed
Commit f9c827d ℹ️
Started Aug 20, 2024 11:22 AM
Ended Aug 20, 2024 11:32 AM
Duration 10:08 💡
OS Linux Debian -
Browser Chrome 103

View run in Cypress Cloud ➡️


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 Cloud

packages/semi-ui/table/Table.tsx Outdated Show resolved Hide resolved
packages/semi-ui/table/Table.tsx Show resolved Hide resolved
packages/semi-ui/table/TableHeaderRow.tsx Outdated Show resolved Hide resolved
@shijiatongxue
Copy link
Collaborator

测试用例,挂了,需要看下

packages/semi-ui/table/Table.tsx Show resolved Hide resolved
packages/semi-ui/table/TableHeaderRow.tsx Outdated Show resolved Hide resolved
@YyumeiZhang YyumeiZhang changed the base branch from main to release August 20, 2024 11:10
Copy link

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 0e3eba6:

Sandbox Source
pr-story Configuration

@YyumeiZhang YyumeiZhang merged commit 26802be into release Aug 20, 2024
9 checks passed
@YyumeiZhang YyumeiZhang deleted the fix/table-sortHotArea branch August 20, 2024 11:34
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