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: modal method rtl #24682

Merged
merged 3 commits into from Jun 3, 2020
Merged

feat: modal method rtl #24682

merged 3 commits into from Jun 3, 2020

Conversation

xrkffgg
Copy link
Member

@xrkffgg xrkffgg commented Jun 2, 2020

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Perfermance optimization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

#24566

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Add Modal.method() RTL supports only use hooks.
🇨🇳 Chinese 增加 Modal.method() RTL 模式支持,仅限 hooks 用法。

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

@@ -50,9 +51,12 @@ const ConfirmDialog = (props: ConfirmDialogProps) => {
const transitionName = props.transitionName || 'zoom';
const maskTransitionName = props.maskTransitionName || 'fade';

const { direction } = React.useContext(ConfigContext);
Copy link
Member Author

@xrkffgg xrkffgg Jun 2, 2020

Choose a reason for hiding this comment

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

help help help

这个地方获 不到 direction

Copy link
Member

@zombieJ zombieJ Jun 2, 2020

Choose a reason for hiding this comment

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

参考 Modal or Notification 的 hooks 用法,需要有个上下文环境才行。

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Jun 2, 2020

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Jun 2, 2020

@codecov
Copy link

codecov bot commented Jun 2, 2020

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24682   +/-   ##
=======================================
  Coverage   99.21%   99.21%           
=======================================
  Files         365      365           
  Lines        7276     7277    +1     
  Branches     2033     1981   -52     
=======================================
+ Hits         7219     7220    +1     
  Misses         57       57           
Impacted Files Coverage Δ
components/modal/ConfirmDialog.tsx 95.45% <ø> (ø)
components/modal/Modal.tsx 100.00% <ø> (ø)
components/modal/useModal/HookModal.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 2caa658...4803e3a. Read the comment docs.

@xrkffgg xrkffgg requested review from afc163 and zombieJ Jun 2, 2020
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 2, 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 4803e3a:

Sandbox Source
antd reproduction template Configuration

@xrkffgg
Copy link
Member Author

xrkffgg commented Jun 2, 2020

赶得上这班车吗?

@afc163
Copy link
Member

afc163 commented Jun 2, 2020

赶不上,没必要赶。

@xrkffgg xrkffgg changed the title fix: modal confirm rtl fix: modal method() rtl Jun 2, 2020
components/modal/index.zh-CN.md Outdated Show resolved Hide resolved
@xrkffgg
Copy link
Member Author

xrkffgg commented Jun 2, 2020

/rebase

@xrkffgg
Copy link
Member Author

xrkffgg commented Jun 2, 2020

rebase 不好用了?

@xrkffgg xrkffgg changed the title fix: modal method() rtl feat: modal method rtl Jun 2, 2020
@yoyo837
Copy link
Contributor

yoyo837 commented Jun 2, 2020

可能有冲突,不成功会没反应。

@yoyo837
Copy link
Contributor

yoyo837 commented Jun 2, 2020

手动rebase

@xrkffgg
Copy link
Member Author

xrkffgg commented Jun 2, 2020

木有冲突啊,手动很顺。

@yoyo837
Copy link
Contributor

yoyo837 commented Jun 2, 2020

那小弟就不知道为啥了

@xrkffgg
Copy link
Member Author

xrkffgg commented Jun 3, 2020

PTAL

@afc163 afc163 merged commit b8fb4c4 into master Jun 3, 2020
19 checks passed
@afc163 afc163 deleted the fix-modal-rtl branch Jun 3, 2020
07akioni pushed a commit to 07akioni/ant-design that referenced this pull request Jun 4, 2020
* fix: modal rtl

* fix: use hooks

* Update components/modal/index.zh-CN.md
@ycjcl868 ycjcl868 mentioned this pull request Jun 5, 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.

None yet

5 participants