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): no border-bottom when the cells are merged #38735

Conversation

LuciNyan
Copy link
Contributor

@LuciNyan LuciNyan commented Nov 19, 2022

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

Closes: #38724

💡 Background and solution

Add border-block-end to .ant-table-container to implement the bottom border of the table.

image
image

📝 Changelog

Language Changelog
🇺🇸 English Fix the issue that no border is displayed when cells are merged
🇨🇳 Chinese 修复合并单元格时不显示边框的问题

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • 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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 19, 2022

@LuciNyan LuciNyan marked this pull request as ready for review November 19, 2022 09:58
@codecov
Copy link

codecov bot commented Nov 19, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (5832b58) compared to base (919f7f9).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #38735   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          544       544           
  Lines         9368      9353   -15     
  Branches      2650      2649    -1     
=========================================
- Hits          9368      9353   -15     
Impacted Files Coverage Δ
components/table/style/bordered.tsx 100.00% <100.00%> (ø)
components/menu/index.tsx 100.00% <0.00%> (ø)
components/affix/index.tsx 100.00% <0.00%> (ø)
components/input/index.tsx 100.00% <0.00%> (ø)
components/radio/index.tsx 100.00% <0.00%> (ø)
components/switch/index.tsx 100.00% <0.00%> (ø)
components/button/button.tsx 100.00% <0.00%> (ø)
components/upload/Upload.tsx 100.00% <0.00%> (ø)
components/checkbox/index.tsx 100.00% <0.00%> (ø)
components/mentions/index.tsx 100.00% <0.00%> (ø)
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@li-jia-nan
Copy link
Member

可以补充一个测试用例吗?

@afc163 afc163 requested a review from MadCcc November 19, 2022 11:24
@LuciNyan
Copy link
Contributor Author

LuciNyan commented Nov 19, 2022

Hi @li-jia-nan! Thanks for the reminder! But I don't know how to add unit tests for the CSS changes. Could you give me some more advice? <3

@li-jia-nan
Copy link
Member

Hi @li-jia-nan! Thanks for the reminder! But I don't know how to add unit tests for the CSS changes. Could you give me some more advice? <3

const element = container.querySelector<HTMLDivElement>('xxxx');

const getStyle = getComputedStyle(element);

expect(getStyle.borderBlockEnd).toBe('xxxx');

@afc163
Copy link
Member

afc163 commented Nov 19, 2022

这样的测试用例没啥意义,不能保证样式是对的。

@li-jia-nan
Copy link
Member

这样的测试用例没啥意义,不能保证样式是对的。

OK,那这个让闲夕大佬来跟进一下,我就不管啦❤️❤️❤️

@afc163 afc163 added the 5.x label Nov 19, 2022
Copy link
Member

@afc163 afc163 left a comment

Choose a reason for hiding this comment

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

这样会让 table 丢失底部 border,看 https://preview-38735-ant-design.surge.sh/components/table-cn#components-table-demo-basic

最好和 4.x 样式对对,看看哪个样式缺了

Copy link
Member

@afc163 afc163 left a comment

Choose a reason for hiding this comment

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

这样会让 table 丢失底部 border,看 https://preview-38735-ant-design.surge.sh/components/table-cn#components-table-demo-basic

最好和 4.x 样式对对,看看哪个样式缺了

@MadCcc MadCcc mentioned this pull request Dec 22, 2022
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

table 合并列样式错误(最后一行缺少border)
3 participants