-
-
Notifications
You must be signed in to change notification settings - Fork 49.2k
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: support compact theme #22126
feat: support compact theme #22126
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add tests to make sure this change works as expected?
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:
|
Codecov Report
@@ 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.
|
site/theme/template/Layout/index.jsx
Outdated
@@ -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}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compact.css 好一点。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯,叫 compact 感觉更直接一点,到时候我可以批量替换一下。
components/style/themes/compact.less
Outdated
|
||
// Pagination | ||
@pagination-item-size: 28px; | ||
@pagination-item-size-sm: 24px; // todo: should more small? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep it -sm
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯,之前留着提醒一下的,后面有跟设计师沟通之后改动还没推,周末我会把这些弄掉推一版。
Merge 一下 feature,免得后面冲突更多。 |
嗯,晚上我来合下。看着 rtl 的改动,想象到的 conflict, 头顶一凉。 |
{[ | ||
{ type: 'default', text: '普通模式' }, | ||
{ type: 'dark', text: '暗黑模式' }, | ||
{ type: 'compact', text: '紧凑模式' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
默认主题 暗黑主题 紧凑主题
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
噢,这边应该用下国际化的。
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
加个 transition 过渡
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed d08d721
site/theme/zh-CN.js
Outdated
@@ -3,6 +3,8 @@ module.exports = { | |||
messages: { | |||
'app.theme.switch.dark': '切换浅色模式', | |||
'app.theme.switch.default': '切换暗黑模式', | |||
'app.theme.switch.normal': '切换紧凑模式', | |||
'app.theme.switch.compact': '切换普通模式', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好像用不上了。
Co-Authored-By: 偏右 <afc163@gmail.com>
@zombieJ CI passed. |
加个 bundlesize limit: Lines 271 to 274 in c806a83
|
Fixed 0174586 |
准备合了, |
🤔 This is a ...
🔗 Related issue link
close #22068
💡 Background and solution
To support compact theme mode.
📝 Changelog
☑️ Self Check before Merge