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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support compact theme #22126

Merged
merged 31 commits into from Mar 29, 2020
Merged

feat: support compact theme #22126

merged 31 commits into from Mar 29, 2020

Conversation

AshoneA
Copy link
Contributor

@AshoneA AshoneA commented Mar 11, 2020

馃 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

close #22068

馃挕 Background and solution

To support compact theme mode.

馃摑 Changelog

Language Changelog
馃嚭馃嚫 English Support compact mode theme
馃嚚馃嚦 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

@AshoneA AshoneA requested review from afc163 and zombieJ Mar 11, 2020
Copy link

@tests-checker tests-checker bot left a comment

Could you please add tests to make sure this change works as expected?

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Mar 11, 2020

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 11, 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 a4f35e5:

Sandbox Source
antd reproduction template Configuration

@codecov
Copy link

codecov bot commented Mar 11, 2020

Codecov Report

Merging #22126 into feature will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           feature   #22126   +/-   ##
========================================
  Coverage    98.07%   98.07%           
========================================
  Files          360      360           
  Lines         7224     7224           
  Branches      1975     1975           
========================================
  Hits          7085     7085           
  Misses         139      139

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 2cfad04...a4f35e5. Read the comment docs.

@@ -63,6 +63,7 @@ const SITE_THEME_STORE_KEY = 'site-theme';
const timestamp = new Date().getTime();
const themeMap = {
dark: `/dark.css?${timestamp}`,
narrow: `/narrow.css?${timestamp}`,
Copy link
Member

@afc163 afc163 Mar 11, 2020

Choose a reason for hiding this comment

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

compact.css 濂戒竴鐐广

Copy link
Contributor Author

@AshoneA AshoneA Mar 11, 2020

Choose a reason for hiding this comment

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

鍡紝鍙 compact 鎰熻鏇寸洿鎺ヤ竴鐐癸紝鍒版椂鍊欐垜鍙互鎵归噺鏇挎崲涓涓嬨

@afc163 afc163 changed the title feat: support narrow mode theme [WIP] feat: support narrow mode theme Mar 11, 2020
@afc163 afc163 changed the title [WIP] feat: support narrow mode theme [WIP] feat: support compat theme Mar 12, 2020
@afc163 afc163 changed the base branch from master to feature Mar 13, 2020

// Pagination
@pagination-item-size: 28px;
@pagination-item-size-sm: 24px; // todo: should more small?
Copy link
Member

@afc163 afc163 Mar 13, 2020

Choose a reason for hiding this comment

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

Keep it -sm.

Copy link
Contributor Author

@AshoneA AshoneA Mar 13, 2020

Choose a reason for hiding this comment

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

鍡紝涔嬪墠鐣欑潃鎻愰啋涓涓嬬殑锛屽悗闈㈡湁璺熻璁″笀娌熼氫箣鍚庢敼鍔ㄨ繕娌℃帹锛屽懆鏈垜浼氭妸杩欎簺寮勬帀鎺ㄤ竴鐗堛

@AshoneA AshoneA changed the title [WIP] feat: support compat theme [WIP] feat: support compact theme Mar 13, 2020
@afc163
Copy link
Member

afc163 commented Mar 19, 2020

Merge 涓涓 feature锛屽厤寰楀悗闈㈠啿绐佹洿澶氥

@AshoneA
Copy link
Contributor Author

AshoneA commented Mar 19, 2020

Merge 涓涓 feature锛屽厤寰楀悗闈㈠啿绐佹洿澶氥

鍡紝鏅氫笂鎴戞潵鍚堜笅銆傜湅鐫 rtl 鐨勬敼鍔紝鎯宠薄鍒扮殑 conflict锛 澶撮《涓鍑夈

{[
{ type: 'default', text: '鏅氭ā寮' },
{ type: 'dark', text: '鏆楅粦妯″紡' },
{ type: 'compact', text: '绱у噾妯″紡' },
Copy link
Member

@afc163 afc163 Mar 27, 2020

Choose a reason for hiding this comment

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

榛樿涓婚 鏆楅粦涓婚 绱у噾涓婚

Copy link
Contributor Author

@AshoneA AshoneA Mar 27, 2020

Choose a reason for hiding this comment

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

鍣紝杩欒竟搴旇鐢ㄤ笅鍥介檯鍖栫殑銆

Copy link
Contributor Author

@AshoneA AshoneA Mar 27, 2020

Choose a reason for hiding this comment

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

fixed d08d721

& &-avatar {
color: #000;
background-color: #fff;
box-shadow: @shadow-2;
Copy link
Member

@afc163 afc163 Mar 27, 2020

Choose a reason for hiding this comment

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

鍔犱釜 transition 杩囨浮

Copy link
Contributor Author

@AshoneA AshoneA Mar 27, 2020

Choose a reason for hiding this comment

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

fixed d08d721

@@ -3,6 +3,8 @@ module.exports = {
messages: {
'app.theme.switch.dark': '鍒囨崲娴呰壊妯″紡',
'app.theme.switch.default': '鍒囨崲鏆楅粦妯″紡',
'app.theme.switch.normal': '鍒囨崲绱у噾妯″紡',
'app.theme.switch.compact': '鍒囨崲鏅氭ā寮',
Copy link
Member

@afc163 afc163 Mar 27, 2020

Choose a reason for hiding this comment

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

濂藉儚鐢ㄤ笉涓婁簡銆

@ant-design ant-design deleted a comment from todo bot Mar 27, 2020
@ant-design ant-design deleted a comment from todo bot Mar 27, 2020
site/theme/static/common.less Outdated Show resolved Hide resolved
@AshoneA
Copy link
Contributor Author

AshoneA commented Mar 28, 2020

@zombieJ CI passed.

afc163
afc163 approved these changes Mar 28, 2020
@afc163
Copy link
Member

afc163 commented Mar 28, 2020

鍔犱釜 bundlesize limit锛

ant-design/package.json

Lines 271 to 274 in c806a83

{
"path": "./dist/antd.dark.min.css",
"maxSize": "65 kB"
}

@AshoneA
Copy link
Contributor Author

AshoneA commented Mar 28, 2020

鍔犱釜 bundlesize limit锛

Fixed 0174586

@AshoneA
Copy link
Contributor Author

AshoneA commented Mar 28, 2020

@afc163 @zombieJ
鎶戒簡涓嬬敓鎴 dist css 鏂囦欢锛屼笉澶‘瀹氫細涓嶄細閫犳垚 break锛屽府蹇 review 涓涓嬨
a4f35e5

@zombieJ
Copy link
Member

zombieJ commented Mar 29, 2020

鍑嗗鍚堜簡锛WIP 鏍囧織鏄笉鏄彲浠ュ幓鎺変簡锛

@zombieJ zombieJ changed the title [WIP] feat: support compact theme feat: support compact theme Mar 29, 2020
@zombieJ zombieJ merged commit dda45e4 into feature Mar 29, 2020
30 of 31 checks passed
@zombieJ zombieJ deleted the feat/narrow-theme branch Mar 29, 2020
@zombieJ zombieJ mentioned this pull request Mar 29, 2020
10 tasks
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