Skip to content

fix(input): floating label works correctly with long text and notch #26273

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 202 commits into from
Nov 14, 2022

Conversation

liamdebeasi
Copy link
Contributor

@liamdebeasi liamdebeasi commented Nov 11, 2022

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
    • Some docs updates need to be made in the ionic-docs repo, in a separate PR. See the contributing guide for details.
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

During testing, I noticed that my implemented of the notch in the MD outline was incorrect, causing the gap to be much wider than necessary when using longer labels.

I also noticed that long label texts do not flow correctly in the container.

What is the new behavior?

  • Long labels are now correctly truncated so they do not break the input layout
  • Revamped how we create the notch in the MD outline style so the gap is correctly sized.
  • Added tests

Does this introduce a breaking change?

  • Yes
  • No

Other information

liamdebeasi and others added 30 commits October 31, 2022 15:38
@liamdebeasi liamdebeasi marked this pull request as ready for review November 11, 2022 18:59
@liamdebeasi liamdebeasi requested a review from a team as a code owner November 11, 2022 18:59
@github-actions github-actions bot added the package: core @ionic/core package label Nov 11, 2022
@liamdebeasi liamdebeasi requested review from averyjohnston and removed request for a team November 11, 2022 18:59
@liamdebeasi liamdebeasi changed the title 2591 notch fix(input): floating label works correctly with long text and notch Nov 11, 2022
@liamdebeasi
Copy link
Contributor Author

@amandaejohnston This is the same PR as #26252, but I accidentally merged it when I meant to merge #26248 (I had both open in tabs next to each other 🙃)

Base automatically changed from 2591-padding to FW-2591 November 11, 2022 19:24
Copy link
Contributor

@averyjohnston averyjohnston left a comment

Choose a reason for hiding this comment

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

For stacked, the label truncation seems to work differently between md and ios, unlike floating:

ios mode
md mode

Was that intentional?

@liamdebeasi
Copy link
Contributor Author

No, that was some extra code I copied from the floating label. I fixed that in 336d809 and am updating screenshots.

@averyjohnston
Copy link
Contributor

I'm still seeing the inconsistent behavior, both when checking locally and in the screenshots. Example of the latter:

screenshots

Copy link
Contributor

@averyjohnston averyjohnston left a comment

Choose a reason for hiding this comment

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

Looking good now 👍 Thank you!

@liamdebeasi liamdebeasi merged commit a2e6252 into FW-2591 Nov 14, 2022
@liamdebeasi liamdebeasi deleted the 2591-notch branch November 22, 2022 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants