Skip to content

Conversation

kharazian
Copy link
Contributor

This change helps with an issue when you have a form field with an outline appearance placed inside a material tab. When the form field has an outline, the label does not show up properly. By adding some space at the top when the form field has an outline, we can make sure the label is not cut off.

Fixes #27764

@devversion devversion removed their request for review September 20, 2023 11:02
@mmalerba
Copy link
Contributor

We can presubmit this and see how it goes, but I remember trying to make a change like this in the past and it messed up the layout in a lot of apps. If it winds up being too difficult to land, my advice would be to just put some padding in your tab content area

@mmalerba mmalerba added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Sep 20, 2023
@kharazian kharazian force-pushed the fix-formfield-label-cut-off-in-tabs branch from 70fa672 to e5f0b25 Compare September 20, 2023 16:22
@josephperrott josephperrott requested a review from a team as a code owner December 18, 2024 17:40
@josephperrott josephperrott requested review from andrewseguin and wagnermaciel and removed request for a team December 18, 2024 17:40
… appearance inside material tabs

This change helps with an issue when you have a form field with an outline appearance placed inside a material tab. When the form field has an outline, the label does not show up properly. By adding some space at the top when the form field has an outline, we can make sure the label is not cut off.

Fixes angular#27764
@mmalerba mmalerba force-pushed the fix-formfield-label-cut-off-in-tabs branch from e5f0b25 to 1d10f72 Compare February 12, 2025 23:12
@mmalerba mmalerba self-assigned this Apr 1, 2025
@mmalerba mmalerba removed the action: merge The PR is ready for merge by the caretaker label Apr 3, 2025
@mmalerba
Copy link
Contributor

mmalerba commented Apr 3, 2025

@kharazian looks like there's a missing sass @use (see the CI failures)

@andrewseguin
Copy link
Contributor

Closing since its part of our guidelines not to add spacing around a top element: https://github.com/angular/components/blob/main/CODING_STANDARDS.md#never-set-a-margin-on-a-host-element

It would make sense, since the label extends above it and can be clipped, but it's fairly uncommon for a form field to be that close to a container edge and not have the option to just add manual padding

Also, this change would be super-breaking for everyone

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: material/form-field target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(FormField): Float label cut when inside material tab

3 participants