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

style: add message rtl #22513

Merged
merged 3 commits into from
Apr 4, 2020
Merged

style: add message rtl #22513

merged 3 commits into from
Apr 4, 2020

Conversation

xrkffgg
Copy link
Member

@xrkffgg xrkffgg commented Mar 23, 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 #22473

💡 Background and solution

ConfigConsumer 嵌套 Message,试了半天没成功,所以用了这种方式。

📝 Changelog

Language Changelog
🇺🇸 English Add Message RTL mode
🇨🇳 Chinese 新增 Message RTL 模式

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

View rendered components/message/demo/other.md
View rendered components/message/index.en-US.md
View rendered components/message/index.zh-CN.md

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Mar 23, 2020

@xrkffgg xrkffgg requested review from afc163 and saeedrahimi March 23, 2020 06:23
@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 23, 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 6247b44:

Sandbox Source
antd reproduction template Configuration

@codecov
Copy link

codecov bot commented Mar 23, 2020

Codecov Report

Merging #22513 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #22513   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files         361      361           
  Lines        7212     7215    +3     
  Branches     1971     1934   -37     
=======================================
+ Hits         7088     7091    +3     
  Misses        124      124           
Impacted Files Coverage Δ
components/message/index.tsx 100.00% <100.00%> (ø)

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 cefb7b2...6247b44. Read the comment docs.

@saeedrahimi
Copy link
Contributor

@xrkffgg thanks for your great effort on RTL of antd.
Honestly i'm not ok with this solution and hard-coding direction of message.
In multi-language projects (one language is LTR and another is RTL) switching between languages and direction will be hard with this method.
I know there is no ConfigContext in message component, but there should be a solution from creators.
@afc163 , @zombieJ Could you help on this.?

@yoyo837
Copy link
Contributor

yoyo837 commented Mar 24, 2020

Agree with @saeedrahimi

@xrkffgg
Copy link
Member Author

xrkffgg commented Mar 24, 2020

I agree and I know this is not a good solution.

@afc163
Copy link
Member

afc163 commented Mar 30, 2020

message.config({
  rtl: true,
})

How about global config for message.xxx.

@xrkffgg
Copy link
Member Author

xrkffgg commented Mar 31, 2020

I have changed, how about this?
@afc163 @saeedrahimi @yoyo837

@afc163 afc163 merged commit 18d424e into master Apr 4, 2020
@afc163 afc163 deleted the add-rtl-message branch April 4, 2020 05:35
@xrkffgg xrkffgg mentioned this pull request Apr 4, 2020
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.

Icon of message in RTL
6 participants