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

refactor(components): [form-label-wrap] use getStyle method #13913

Merged
merged 1 commit into from
Aug 9, 2023
Merged

refactor(components): [form-label-wrap] use getStyle method #13913

merged 1 commit into from
Aug 9, 2023

Conversation

tiansQAQ
Copy link
Contributor

@tiansQAQ tiansQAQ commented Aug 9, 2023

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow contributing guide English | (中文 | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer to relative issues for your PR.

Description

🤖 Generated by Copilot at b59e861

Improved form label component by using getStyle utility and adding fallback width. This fixes some cross-browser issues and makes the component more robust.

Related Issue

Fixes #___.

Explanation of Changes

🤖 Generated by Copilot at b59e861

  • Import and use getStyle function from @element-plus/utils to get the style of an element in a cross-browser compatible way (link, link)
  • Add fallback value of 0 for label width in case of NaN (link)

@pull-request-triage
Copy link

👋 @tiansQAQ, seems like this is your first time contribution to element-plus.

  • Please make sure that you have read our guidelines and code of conduct before making a contribution.
  • You can comment with /label Components:[component_name] to add a label for which component you are working on.
  • You may join our Discord for staying tuned.

@pull-request-triage pull-request-triage bot added 1st contribution Their very first contribution Needs Review labels Aug 9, 2023
@github-actions
Copy link

github-actions bot commented Aug 9, 2023

@github-actions
Copy link

github-actions bot commented Aug 9, 2023

Hello @tiansQAQ, thank you for contributing to element-plus, please see our guideline to see how to make contribution

@github-actions
Copy link

github-actions bot commented Aug 9, 2023

🧪 Playground Preview: https://element-plus.run/?pr=13913
Please comment the example via this playground if needed.

Copy link
Collaborator

@btea btea left a comment

Choose a reason for hiding this comment

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

LGTM

@btea btea requested a review from ryuhangyeong August 9, 2023 08:33
@tiansQAQ tiansQAQ requested a review from btea August 9, 2023 08:40
@btea btea merged commit c6a6d9b into element-plus:dev Aug 9, 2023
13 checks passed
@btea
Copy link
Collaborator

btea commented Aug 9, 2023

@tiansQAQ Thank you for your contribution! ❤️

@element-bot element-bot mentioned this pull request Aug 25, 2023
3 tasks
btea added a commit that referenced this pull request Aug 26, 2023
iamkun pushed a commit that referenced this pull request Aug 26, 2023
#14106)

Revert "refactor(components): [form-label-wrap] use getStyle method (#13913)"

This reverts commit c6a6d9b.
laizuan pushed a commit to laizuan/element-plus that referenced this pull request Sep 5, 2023
laizuan pushed a commit to laizuan/element-plus that referenced this pull request Sep 5, 2023
element-plus#14106)

Revert "refactor(components): [form-label-wrap] use getStyle method (element-plus#13913)"

This reverts commit c6a6d9b.
consultation-applio pushed a commit to consultation-applio/element-plus that referenced this pull request Nov 10, 2023
consultation-applio pushed a commit to consultation-applio/element-plus that referenced this pull request Nov 10, 2023
element-plus#14106)

Revert "refactor(components): [form-label-wrap] use getStyle method (element-plus#13913)"

This reverts commit c6a6d9b.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants