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: Col support flex prop #16635

Merged
merged 20 commits into from Nov 20, 2019
Merged

feat: Col support flex prop #16635

merged 20 commits into from Nov 20, 2019

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented May 16, 2019

🤔 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?)

👻 What's the background?

close #7309
close #19728

💡 Solution

Add flex prop:
屏幕快照 2019-05-16 下午8 42 29

📝 Changelog

Language Changelog
🇺🇸 English Col support flex prop
🇨🇳 Chinese Col 支持 flex 属性

☑️ Self Check before Merge

  • 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/grid/demo/flex-stretch.md
View rendered components/grid/demo/playground.md
View rendered components/grid/demo/responsive-more.md
View rendered components/grid/demo/responsive.md
View rendered components/grid/index.en-US.md
View rendered components/grid/index.zh-CN.md

@zombieJ zombieJ requested a review from afc163 May 16, 2019 12:43
@netlify
Copy link

netlify bot commented May 16, 2019

Deploy preview for ant-design ready!

Built with commit 2f791f8

https://deploy-preview-16635--ant-design.netlify.com

@codecov
Copy link

codecov bot commented May 16, 2019

Codecov Report

Merging #16635 into 4.0-prepare will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@               Coverage Diff               @@
##           4.0-prepare   #16635      +/-   ##
===============================================
+ Coverage        97.46%   97.46%   +<.01%     
===============================================
  Files              288      288              
  Lines             7216     7219       +3     
  Branches          1995     1997       +2     
===============================================
+ Hits              7033     7036       +3     
  Misses             183      183
Impacted Files Coverage Δ
components/form/FormItem.tsx 98.68% <ø> (ø) ⬆️
components/grid/row.tsx 100% <ø> (ø) ⬆️
components/grid/col.tsx 100% <100%> (ø) ⬆️
components/transfer/ListItem.tsx 100% <0%> (ø) ⬆️

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 9da09ff...093d20f. Read the comment docs.

@zombieJ zombieJ changed the title feat: Col support flex prop [WIP - 4.0] feat: Col support flex prop May 17, 2019
@zombieJ zombieJ changed the title [WIP - 4.0] feat: Col support flex prop [WIP - Next] feat: Col support flex prop May 17, 2019
@abenhamdine
Copy link
Contributor

hi @zombieJ any news on this ?

@afc163 afc163 added the 4.x In Ant Design 4.0 label Jul 25, 2019
@afc163 afc163 changed the base branch from feature to 4.0-prepare August 17, 2019 14:18
@afc163
Copy link
Member

afc163 commented Sep 5, 2019

@akaguny
Copy link
Contributor

akaguny commented Oct 25, 2019

any news?

@netlify
Copy link

netlify bot commented Oct 26, 2019

Deploy preview for ant-design ready!

Built with commit 093d20f

https://deploy-preview-16635--ant-design.netlify.com

}
.col(1); // kickstart it
}

Copy link
Member

Choose a reason for hiding this comment

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

Fanally, I believe this can help to reduce at least 50Kb css size.

@shaodahong
Copy link
Member

shaodahong commented Nov 7, 2019

  • Remove Row type prop, now default by flex mode
  • Remove .less file float style
  • Fix flex with gutter invalid vertical
  • Doc (we can reorganize Grid doc )
    • Remove FAQ
    • Remove layout and demo description metion with flex(now default flex)
  • Fix arrangement when sum of Col more than 24 in a Row
    image
    image

@shaodahong
Copy link
Member

@afc163 @zombieJ this request #7309 (comment) is ok?

@buildsize
Copy link

buildsize bot commented Nov 9, 2019

File name Previous Size New Size Change
package-lock.json [new file] 923.97 KB

@zombieJ
Copy link
Member Author

zombieJ commented Nov 12, 2019

@shaodahong shaodahong changed the title [WIP - Next] feat: Col support flex prop feat: Col support flex prop Nov 13, 2019
@shaodahong
Copy link
Member

@zombieJ plz double check, and prepare merge

@afc163
Copy link
Member

afc163 commented Nov 19, 2019

/rebase

@zombieJ
Copy link
Member Author

zombieJ commented Nov 19, 2019

标题 Flex 布局 可以去掉,作为 概述 的额外描述。demo 里的 flex 文字也可以去掉了。

@afc163
Copy link
Member

afc163 commented Nov 19, 2019

We can hint ``type="flex" is not neccessary now blahblah if set.

@zombieJ
Copy link
Member Author

zombieJ commented Nov 19, 2019

We can hint ``type="flex" is not neccessary now blahblah if set.

Can move into Migrate to v4 like Table: https://next.ant.design/components/table/#Migrate-to-v4

@shaodahong
Copy link
Member

We can hint ``type="flex" is not neccessary now blahblah if set.

Can move into Migrate to v4 like Table: https://next.ant.design/components/table/#Migrate-to-v4

also, and we 4.0 release doc can metion this too

@shaodahong shaodahong changed the title feat: Col support flex prop [WIP] feat: Col support flex prop Nov 19, 2019
@shaodahong
Copy link
Member

Wait for #16635 (comment) this list all checked.

@shaodahong shaodahong changed the title [WIP] feat: Col support flex prop feat: Col support flex prop Nov 19, 2019
@shaodahong
Copy link
Member

  • Remove Row type prop, now default by flex mode

  • Remove .less file float style

  • Fix flex with gutter invalid vertical

  • Doc (we can reorganize Grid doc )

    • Remove FAQ
    • Remove layout and demo description metion with flex(now default flex)

All of my changed list.

Done.

@zombieJ
Copy link
Member Author

zombieJ commented Nov 19, 2019

LGTM

// Prevent columns from collapsing when empty
min-height: 1px;
}

.make-grid-columns();
.make-grid();
Copy link
Member

Choose a reason for hiding this comment

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

感觉这个也能干掉?

Copy link
Member

Choose a reason for hiding this comment

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

干不掉,之前干掉然后又捡回来了,这个就是栅格的基础,没有这个就没有栅格了……

display: block;
flex: 0 0 percentage((@index / @grid-columns));
max-width: percentage((@index / @grid-columns));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x In Ant Design 4.0 Inactive
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants