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

fix: 💄 Remove Input.Password value attribute from dom #20544

Merged
merged 3 commits into from Dec 31, 2019

Conversation

@afc163
Copy link
Member

afc163 commented Dec 30, 2019

🤔 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 #20541
close #7761
close #19959
close #20536
close #12672
close #10952
close #14592

💡 Background and solution

Hack for value attruibute for <input type="password" />.

image

ref: facebook/react#11896

📝 Changelog

Language Changelog
🇺🇸 English Remove Input.Password value attribute from dom.
🇨🇳 Chinese 优化 Input.Password 在 dom 中明文显示 value 属性的问题。

☑️ Self Check before Merge

  • 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
close #20541
close #7761
close #19959
close #20536
close #12672
close #10952
@afc163 afc163 requested a review from zombieJ Dec 30, 2019
@auto-add-label auto-add-label bot added the bug label Dec 30, 2019
@pr-triage pr-triage bot added the PR: unreviewed label Dec 30, 2019
Copy link

tests-checker bot left a comment

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

@pr-triage pr-triage bot removed the PR: unreviewed label Dec 30, 2019
@netlify

This comment has been minimized.

Copy link

netlify bot commented Dec 30, 2019

Deploy preview for ant-design ready!

Built with commit 5cb6068

https://deploy-preview-20544--ant-design.netlify.com

@codesandbox

This comment has been minimized.

Copy link

codesandbox bot commented Dec 30, 2019

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 5cb6068:

Sandbox Source
antd reproduction template Configuration
@codecov

This comment has been minimized.

Copy link

codecov bot commented Dec 30, 2019

Codecov Report

Merging #20544 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #20544      +/-   ##
==========================================
+ Coverage   97.81%   97.81%   +<.01%     
==========================================
  Files         286      286              
  Lines        7735     7747      +12     
  Branches     2177     2182       +5     
==========================================
+ Hits         7566     7578      +12     
  Misses        169      169
Impacted Files Coverage Δ
components/input/Input.tsx 100% <100%> (ø) ⬆️
components/input/Password.tsx 100% <100%> (ø) ⬆️

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 bcb71b8...5cb6068. Read the comment docs.

@zombieJ

This comment has been minimized.

Copy link
Member

zombieJ commented Dec 31, 2019

如果用户用原生 form,会不会提交一直是空的?

@afc163

This comment has been minimized.

Copy link
Member Author

afc163 commented Dec 31, 2019

我试试

@afc163

This comment has been minimized.

Copy link
Member Author

afc163 commented Dec 31, 2019

image

image

image

没问题。

@afc163

This comment has been minimized.

Copy link
Member Author

afc163 commented Dec 31, 2019

想起来可以用 codesandbox ci 来测:https://codesandbox.io/s/antd-reproduction-template-d5uct

@zombieJ

This comment has been minimized.

Copy link
Member

zombieJ commented Dec 31, 2019

<Input.Password defaultValue="2333" /> 这个还会暴露。

@afc163 afc163 merged commit 2adf8ce into master Dec 31, 2019
36 checks passed
36 checks passed
lighthouse
Details
setup
Details
compile
Details
dist
Details
lint
Details
node
Details
lib
Details
es
Details
Header rules - ant-design No header rules processed
Details
Pages changed - ant-design 217 new files uploaded
Details
License Compliance All checks passed.
Details
Mixed content - ant-design No mixed content detected
Details
Redirect rules - ant-design 18 redirect rules processed
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
bundlesize Total bundle size is 592.05KB/600KB (-null)
Details
ci/circleci: check_metadata Your tests passed on CircleCI!
Details
ci/circleci: compile Your tests passed on CircleCI!
Details
ci/circleci: dist Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test_dist Your tests passed on CircleCI!
Details
ci/circleci: test_dist_15 Your tests passed on CircleCI!
Details
ci/circleci: test_dom Your tests passed on CircleCI!
Details
ci/circleci: test_dom_15 Your tests passed on CircleCI!
Details
ci/circleci: test_es Your tests passed on CircleCI!
Details
ci/circleci: test_es_15 Your tests passed on CircleCI!
Details
ci/circleci: test_lib Your tests passed on CircleCI!
Details
ci/circleci: test_lib_15 Your tests passed on CircleCI!
Details
ci/circleci: test_node Your tests passed on CircleCI!
Details
ci/circleci: test_node_15 Your tests passed on CircleCI!
Details
ci/codesandbox Building packages succeeded.
Details
codecov/patch 100% of diff hit (target 97.81%)
Details
codecov/project 97.81% (+<.01%) compared to bcb71b8
Details
netlify/ant-design/deploy-preview Deploy preview ready!
Details
security/snyk - package.json (paranoidjk) No manifest changes detected
@afc163 afc163 deleted the fix-input-password-value branch Dec 31, 2019
@pr-triage pr-triage bot added PR: merged and removed PR: unreviewed labels Dec 31, 2019
afc163 added a commit that referenced this pull request Jan 3, 2020
* 💄 Improve Step `type="navigation"` UI in small screen (#20545)

close #19877

* fix: use Object.prototype.toString to check object (#20546)

close #20528

* Fix image misplacing (#20552)

Switched the images of "The keyword of the user query is only displayed in three categories, Topics, Questions and Articles." and "The number of categories the keyword of the user query belongs to is uncertain."

* fix: 💄 Remove Input.Password value attribute from dom (#20544)

* 💄 Remove Input.Password value attribute in dom

close #20541
close #7761
close #19959
close #20536
close #12672
close #10952

* ✅ fix test coverage

* 🐛 fix defaultValue create `value` attribute in Input.Password

* 🆙 upgrade stylelint-order (#20585)

* fix: url 404 (#20589)

* fix url 404

* update url

* Update colors.en-US.md (#20606)

* Revert "Update colors.en-US.md (#20606)" (#20607)

This reverts commit c513296.

* docs: update Modal docs (#20612)

* doc: update Modal docs

* doc: update modal en-US doc

Co-authored-by: DiamondYuan <541832074@qq.com>
Co-authored-by: Yaindrop <yuan_dian@live.com>
Co-authored-by: jiang <155259966@qq.com>
Co-authored-by: myeunhyuk <39618466+myeunhyuk@users.noreply.github.com>
Co-authored-by: 二货机器人 <smith3816@gmail.com>
Co-authored-by: vagusX <vagusX@users.noreply.github.com>
@zombieJ zombieJ mentioned this pull request Jan 3, 2020
1 of 10 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.