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): chevron icon is now an ionicon #26484

Merged
merged 4 commits into from
Dec 14, 2022
Merged

Conversation

liamdebeasi
Copy link
Contributor

@liamdebeasi liamdebeasi commented Dec 14, 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?

When migrating to the new ion-select markup, I ran into issues trying to prevent the icon from getting clipped. The icon itself is a CSS trick designed to use borders to create a chevron icon, and it plays with the positioning in order to get it laid out correctly.

What is the new behavior?

  • The chevron icon now uses an ion-icon with no special layout adjustments being made

Note: There are visual differences, but these changes are correct. The following diffs will appear:

  1. The shape of the chevron icon is slightly different. This is due to the chevron ion-icon having slightly different proportions than the border chevron.
  2. The margins of the chevron are different. It turns out that the current alignment is uneven when used inside of ion-item. The following table breaks down the differences:

main

mode Margin from left edge of screen to left edge of label text Margin from right edge of screen to right edge of icon
ios 21px 17px
md 17px 20px

branch

mode Margin from left edge of screen to left edge of label text Margin from right edge of screen to right edge of icon
ios 21px 21px
md 17px 17px

This also completes a prerequisite for implementing #17248

Does this introduce a breaking change?

  • Yes
  • No
    Note: I opted to consider this a breaking change since targeting an ion-icon instead of a div can potentially change how you need to style the icon.

Other information

@github-actions github-actions bot added the package: core @ionic/core package label Dec 14, 2022
@liamdebeasi liamdebeasi marked this pull request as ready for review December 14, 2022 18:37
@liamdebeasi liamdebeasi requested a review from a team as a code owner December 14, 2022 18:37
@liamdebeasi liamdebeasi merged commit 0823c09 into feature-7.0 Dec 14, 2022
@liamdebeasi liamdebeasi deleted the select-icon branch December 14, 2022 19:27
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