Skip to content

feat: Tabs support items - #36889

Merged
zombieJ merged 6 commits into
featurefrom
tabs
Aug 5, 2022
Merged

zombieJ merged 6 commits into
featurefrom
tabs

Conversation

@zombieJ

@zombieJ zombieJ commented Aug 4, 2022

Copy link
Copy Markdown
Member

[中文版模板 / 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

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Tabs support items props and origin jsx usage will be depreacted.
🇨🇳 Chinese Tabs 支持 items 属性,并且废弃原 jsx 语法糖用法。

☑️ 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

@github-actions

github-actions Bot commented Aug 4, 2022 •

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Aug 4, 2022 •

Copy link
Copy Markdown
Contributor

Size Change: +475 B (0%)

Total Size: 957 kB

Filename Size Change
./dist/antd-with-locales.min.js 371 kB +241 B (0%)
./dist/antd.min.js 315 kB +234 B (0%)
ℹ️ View Unchanged
Filename Size
./dist/antd.compact.min.css 67.4 kB
./dist/antd.dark.min.css 68.7 kB
./dist/antd.min.css 67.4 kB
./dist/antd.variable.min.css 68 kB

compressed-size-action

@codecov

codecov Bot commented Aug 4, 2022 •

Copy link
Copy Markdown

Codecov Report

Merging #36889 (f4adb41) into feature (549a2f9) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##           feature    #36889   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          437       439    +2     
  Lines         8038      8056   +18     
  Branches      2421      2425    +4     
=========================================
+ Hits          8038      8056   +18     
Impacted Files Coverage Δ
components/dropdown/dropdown-button.tsx 100.00% <100.00%> (ø)
components/tabs/TabPane.tsx 100.00% <100.00%> (ø)
components/tabs/hooks/useLegacyItems.ts 100.00% <100.00%> (ø)
components/tabs/index.tsx 100.00% <100.00%> (ø)

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

Comment thread components/tabs/demo/basic.md Resolved
@zombieJ zombieJ changed the title [WIP] feat: Tabs support items feat: Tabs support items Aug 4, 2022
@zombieJ
zombieJ marked this pull request as ready for review August 4, 2022 08:56
@zombieJ
zombieJ merged commit 628968f into feature Aug 5, 2022
@zombieJ
zombieJ deleted the tabs branch August 5, 2022 02:49
@afc163

afc163 commented Aug 5, 2022

Copy link
Copy Markdown
Member
  1. 请按 docs: improve menu usage for items #35131 来一套,否则用户找不到自己版本能用的 demo 来看。也不太清楚变更。
  2. 要务必小心上次 ProLayout 直接用 Menu items 导致业务菜单出现不了的问题,看看有没有类似风险。

@zombieJ

zombieJ commented Aug 5, 2022

Copy link
Copy Markdown
Member Author
  1. 请按 docs: improve menu usage for items #35131 来一套,否则用户找不到自己版本能用的 demo 来看。也不太清楚变更。
  2. 要务必小心上次 ProLayout 直接用 Menu items 导致业务菜单出现不了的问题,看看有没有类似风险。
  1. 有的:https://preview-36889-ant-design.surge.sh/components/tabs-cn/#4.23.0-%E7%94%A8%E6%B3%95%E5%8D%87%E7%BA%A7
  2. 👌

@chenshuai2144

chenshuai2144 commented Aug 5, 2022 •

Copy link
Copy Markdown
Contributor

pro 中有不少要把 tabs 居中的需求,我们是不是直接提供一个api?

image

@zombieJ

zombieJ commented Aug 5, 2022

Copy link
Copy Markdown
Member Author

pro 中有不少要把 tabs 居中的需求,我们是不是直接提供一个api?

image

嗯,后面加过了:https://ant.design/components/tabs-cn/#components-tabs-demo-centered

@chenshuai2144

Copy link
Copy Markdown
Contributor

居中好说,主要是下面的 margin ,能不能有api去掉

This was referenced Sep 4, 2022
linaaaqi pushed a commit to linaaaqi/ant-design that referenced this pull request Sep 5, 2022
* refactor: Using items

* docs: replace with items

* docs: deprecated demo

* test: Update snapshot

* docs: simple basic demo

* test: coverage
@JulesLecuir

JulesLecuir commented Jul 21, 2023 •

Copy link
Copy Markdown

Hi guys, any idea why this system was implemented ? Do you have any reasons to prefer the items system over the system ? We are implementing our design system and wonder wich choice we should make for our Tabs component API. Thanks :)

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.

5 participants