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

fix(table): fix sorter and filter table compact mode style #22838

Closed
wants to merge 2 commits into from

Conversation

AshoneA
Copy link
Contributor

@AshoneA AshoneA commented Apr 1, 2020

fix #22777

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

之前用的 margin 负值来定位感觉有点奇怪,可能是有什么情况需要这样做吗? @zombieJ 帮忙 review 一下会不会出现 break change。

📝 Changelog

Language Changelog
🇺🇸 English fix sorter and filter table compact mode style
🇨🇳 Chinese 修复紧凑模式下带排序和搜索的表格样式问题

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

View rendered components/table/demo/size.md

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Apr 1, 2020

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 1, 2020

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 40f2b0b348ba122923afe1c50e1febe73928c771:

Sandbox Source
antd reproduction template Configuration
紧凑型 - Ant Design Demo Issue #22777
紧凑型 - Ant Design Demo Issue #22777

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 1, 2020

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 7ca766c:

Sandbox Source
antd reproduction template Configuration
紧凑型 - Ant Design Demo Issue #22777
紧凑型 - Ant Design Demo Issue #22777

@codecov
Copy link

codecov bot commented Apr 1, 2020

Codecov Report

Merging #22838 into master will decrease coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #22838      +/-   ##
==========================================
- Coverage   98.31%   98.28%   -0.04%     
==========================================
  Files         363      361       -2     
  Lines        7244     7211      -33     
  Branches     1988     1933      -55     
==========================================
- Hits         7122     7087      -35     
- Misses        122      124       +2
Impacted Files Coverage Δ
components/_util/getScroll.tsx 80% <0%> (-20%) ⬇️
...omponents/table/hooks/useFilter/FilterDropdown.tsx 95.94% <0%> (-0.11%) ⬇️
components/_util/scrollTo.ts 100% <0%> (ø) ⬆️
components/space/index.tsx 100% <0%> (ø) ⬆️
components/table/Table.tsx 99.2% <0%> (ø) ⬆️
components/back-top/index.tsx 100% <0%> (ø) ⬆️
components/table/hooks/useSorter.tsx 96.12% <0%> (ø) ⬆️
components/table/hooks/useSelection.tsx 98.32% <0%> (ø) ⬆️
components/date-picker/generatePicker/index.tsx
...ate-picker/generatePicker/generateSinglePicker.tsx
... and 2 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 63a332a...7ca766c. Read the comment docs.

@afc163
Copy link
Member

afc163 commented Apr 2, 2020

image

小号表格的列头也要保持灰色。

rektdeckard added a commit to rektdeckard/wordnet-web that referenced this pull request Apr 3, 2020
Note: this causes a styling bug where small and middle-size tables
incorrectly render with a large header row. An open PR is set to correct
this:

ant-design/ant-design#22838
@afc163
Copy link
Member

afc163 commented Apr 3, 2020

conflicted

@@ -28,9 +20,3 @@
// = Small =
// ================================================================
.table-size(~'small', @table-padding-vertical-sm, @table-padding-horizontal-sm);

.@{table-prefix-cls}.@{table-prefix-cls}-small {
Copy link
Contributor Author

@AshoneA AshoneA Apr 3, 2020

Choose a reason for hiding this comment

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

@afc163 这边小号 background 好像特意设置其他颜色的。

Copy link
Member

Choose a reason for hiding this comment

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

是 bug,4.x 之后应该一直是灰色。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👌,ref: #22872

@afc163 afc163 deleted the fix/table-compact-mode branch April 3, 2020 05:55
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.

Table columns 大小变化
3 participants