Skip to content

fix(material-experimental/mdc-form-field): fix baseline and handle custom controls better #18161

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

Merged
merged 1 commit into from
Jan 15, 2020

Conversation

devversion
Copy link
Member

@devversion devversion added the target: patch This PR is targeted for the next patch release label Jan 13, 2020
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 13, 2020
@devversion
Copy link
Member Author

devversion commented Jan 13, 2020

Also just related to this: The outline appearance is not working out very nice in our case due to the limitation with the notched-outline. In summary, we need a way to have the outline cover the whole text-field (prefix, suffixes etc), but have the floating label be relative to the infix container.

I'm unsure if MDC will ever support what we need. We need to keep in mind that we don't implement a standard text-field.. but want to support custom form-field controls. I'm playing with the idea of just working around this.. It should help us reduce the overall CSS workarounds too, so it might be worth.

@devversion devversion force-pushed the wip/form-field-baseline branch from 834d92c to e582182 Compare January 13, 2020 15:14
…stom controls better

* Fixes the baseline of form-field controls and their inputs. Previously
the baseline was incorrect due to flex alignment.
* Improves support for custom form-field controls by ensuring that
spacing applied to MDC inputs, also applies to custom controls.
   * The same will be needed for the outline appearance, but
   unfortunately we cannot apply any spacing to the infix until we find
   a solution for: material-components/material-components-web#5326
@devversion devversion force-pushed the wip/form-field-baseline branch from e582182 to 9d9ded0 Compare January 13, 2020 16:51
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Jan 13, 2020
@andrewseguin andrewseguin merged commit 0c26354 into angular:master Jan 15, 2020
yifange pushed a commit to yifange/components that referenced this pull request Jan 30, 2020
…stom controls better (angular#18161)

* Fixes the baseline of form-field controls and their inputs. Previously
the baseline was incorrect due to flex alignment.
* Improves support for custom form-field controls by ensuring that
spacing applied to MDC inputs, also applies to custom controls.
   * The same will be needed for the outline appearance, but
   unfortunately we cannot apply any spacing to the infix until we find
   a solution for: material-components/material-components-web#5326
@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 Feb 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants