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

fix(select): adjust label alignment when in a card #27202

Merged
merged 10 commits into from Apr 20, 2023
Merged

fix(select): adjust label alignment when in a card #27202

merged 10 commits into from Apr 20, 2023

Conversation

mapsandapps
Copy link
Contributor

@mapsandapps mapsandapps commented Apr 13, 2023

Issue URL: resolves #27086


What is the current behavior?

When an ion-select is inside a card, the label is slightly lower than it should be, making it out of alignment with the label of an ion-input.

What is the new behavior?

  • When inside a card, the labels of ion-input and ion-select are in line with each other.

Does this introduce a breaking change?

  • Yes
  • No

Other information

This bug was occurring because the label of ion-select is in the shadow DOM. As recommended, this fix was also added to ion-input and ion-textarea in case those labels are also later moved to the shadow DOM.

Before:
Screenshot 2023-04-13 at 4 35 44 PM

After:
Screenshot 2023-04-13 at 4 36 02 PM

@stackblitz
Copy link

stackblitz bot commented Apr 13, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions github-actions bot added the package: core @ionic/core package label Apr 13, 2023
@mapsandapps mapsandapps marked this pull request as ready for review April 14, 2023 14:11
@mapsandapps mapsandapps requested a review from a team as a code owner April 14, 2023 14:11
Copy link
Contributor

@sean-perkins sean-perkins left a comment

Choose a reason for hiding this comment

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

Can we add screenshot tests for the select being rendered in a card, so that it doesn't regress in the future?

@mapsandapps mapsandapps marked this pull request as draft April 19, 2023 14:28
@mapsandapps mapsandapps marked this pull request as ready for review April 19, 2023 19:37
await page.setContent(`
<ion-card>
<ion-card-content>
<ion-item style="border: 1px solid grey; margin: 16px">
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the border for a visual reference for the label alignment? If so, what is the margin: 16px for?

~ Nit: Can we add lines="none" to the ion-item if we are going to draw a border around the container? Currently there are two bottom border lines.

Copy link
Member

@liamdebeasi liamdebeasi left a comment

Choose a reason for hiding this comment

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

+1 to Sean's comments, but otherwise looks good.

@mapsandapps mapsandapps added this pull request to the merge queue Apr 20, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 20, 2023
@liamdebeasi liamdebeasi added this pull request to the merge queue Apr 20, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 20, 2023
@liamdebeasi liamdebeasi added this pull request to the merge queue Apr 20, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 20, 2023
@liamdebeasi liamdebeasi added this pull request to the merge queue Apr 20, 2023
Merged via the queue into main with commit 5a2b87c Apr 20, 2023
45 checks passed
@liamdebeasi liamdebeasi deleted the FW-3913 branch April 20, 2023 18:16
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.

bug: Label not aligned properly between ion input and ion select when in card component
4 participants