Skip to content

Fix disabled floating labels and add some examples of it in the docs#37299

Merged
mdo merged 2 commits intomainfrom
main-jd-handle-disabled-floating-labels
Oct 30, 2022
Merged

Fix disabled floating labels and add some examples of it in the docs#37299
mdo merged 2 commits intomainfrom
main-jd-handle-disabled-floating-labels

Conversation

@julien-deramond
Copy link
Copy Markdown
Member

@julien-deramond julien-deramond commented Oct 11, 2022

Description

  • Fixes the rendering when a disabled input is used in a floating label
  • Add some documentation to reflect this use case

Motivation & Context

I'm suggesting to add a new "Disabled" section in the documentation to be consistent with other form controls, and it will help us detect regression in the future.

Type of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Live previews

Related issues

Closes #37297
Closes #37330 (and might replace #37359)

@julien-deramond julien-deramond marked this pull request as ready for review October 11, 2022 20:03
@julien-deramond julien-deramond requested a review from a team as a code owner October 11, 2022 20:03
@mdo
Copy link
Copy Markdown
Member

mdo commented Oct 12, 2022

I think this might not work for <textarea>s—can you double check and add a disabled example for that as well?

@julien-deramond
Copy link
Copy Markdown
Member Author

The second example is already a disabled <textarea>. You mean maybe a disabled <textarea> with a custom height?

@mdo
Copy link
Copy Markdown
Member

mdo commented Oct 13, 2022

The second example is already a disabled <textarea>. You mean maybe a disabled <textarea> with a custom height?

Doh, my bad haha. Yes, please!

@julien-deramond
Copy link
Copy Markdown
Member Author

Done via 17989d6. I've let both the normal <textarea> and the custom one, IDK if it is a good idea or not. Maybe the custom one is enough 🤷

@mdo mdo force-pushed the main-jd-handle-disabled-floating-labels branch from 6fc33da to f3fb52f Compare October 30, 2022 00:26
@mdo mdo mentioned this pull request Oct 30, 2022
10 tasks
@mdo mdo merged commit 06bed9b into main Oct 30, 2022
@mdo mdo deleted the main-jd-handle-disabled-floating-labels branch October 30, 2022 00:31
@AgentSmith0
Copy link
Copy Markdown

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

cannot activate Floating labels Disabled floating labels look bad after merging #37125

3 participants