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(page-header): support rtl #1154

Merged
merged 88 commits into from
Sep 12, 2021

Conversation

doom-9-zz
Copy link
Contributor

No description provided.

doom-9 and others added 30 commits June 17, 2021 17:42
@vercel
Copy link

vercel bot commented Sep 10, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tusimple/naive-ui/29yn8zEZ3n1aoyhfD7uucUzcWnxD
✅ Preview: https://naive-ui-git-fork-doom-9-featpage-header-support-rtl-tusimple.vercel.app

@codecov
Copy link

codecov bot commented Sep 10, 2021

Codecov Report

Merging #1154 (72f43be) into main (37eaa30) will increase coverage by 0.00%.
The diff coverage is 75.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1154   +/-   ##
=======================================
  Coverage   49.77%   49.78%           
=======================================
  Files         514      514           
  Lines       12716    12718    +2     
  Branches     3600     3601    +1     
=======================================
+ Hits         6330     6332    +2     
  Misses       5298     5298           
  Partials     1088     1088           
Impacted Files Coverage Δ
src/page-header/src/PageHeader.tsx 96.29% <75.00%> (-3.71%) ⬇️
src/carousel/src/Carousel.tsx 34.00% <0.00%> (+0.66%) ⬆️

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 37eaa30...72f43be. Read the comment docs.

Comment on lines 97 to 102
[
{
[`${mergedClsPrefix}-page-header-header--rtl`]:
this.rtlEnabled
}
]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
[
{
[`${mergedClsPrefix}-page-header-header--rtl`]:
this.rtlEnabled
}
]
this.rtlEnabled && `${mergedClsPrefix}-page-header-header--rtl`

Comment on lines 112 to 116
[
{
[`${mergedClsPrefix}-page-header--rtl`]: this.rtlEnabled
}
]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
[
{
[`${mergedClsPrefix}-page-header--rtl`]: this.rtlEnabled
}
]
this.rtlEnabled && `${mergedClsPrefix}-page-header--rtl`

Comment on lines 4 to 19
cB('page-header-header', [
cM('rtl', `
direction: rtl;
`)
]),
cB('page-header', [
cM('rtl', `
direction: rtl;
`)
]),
cB('page-header-content', [
cM('rtl', `
direction: rtl;
`)
]),
cB('page-header-footer', [
cM('rtl', `
direction: rtl;
`)
])
Copy link
Collaborator

Choose a reason for hiding this comment

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

感觉 RTL 的类可以直接加在 page-header 的 DOM 上,没必要的话不加特别多的类

Comment on lines 162 to 167
[
{
[`${mergedClsPrefix}-page-header-content--rtl`]:
this.rtlEnabled
}
]
Copy link
Collaborator

Choose a reason for hiding this comment

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

感觉 RTL 的类可以直接加在 page-header 的 DOM 上,没必要的话不加特别多的类

@@ -0,0 +1,94 @@
# Rtl Debug
Copy link
Collaborator

Choose a reason for hiding this comment

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

弄个中文的就行了,debug 的例子可以不弄两个语言

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.

3 participants