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

feat(select): component can be used outside ion-item #26572

Merged
merged 31 commits into from
Jan 11, 2023
Merged

Conversation

liamdebeasi
Copy link
Contributor

@liamdebeasi liamdebeasi commented Jan 5, 2023

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?

Issue URL: Internal ticket

What is the new behavior?

  • ion-select can now be used outside of ion-item with a new property to specify the label.
    This PR is a combination of the following:

#26470
#26502
#26504
#26505
#26506
#26570

Does this introduce a breaking change?

  • Yes
  • No

Other information

@stackblitz
Copy link

stackblitz bot commented Jan 5, 2023

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

@github-actions github-actions bot added package: angular @ionic/angular package package: core @ionic/core package package: vue @ionic/vue package labels Jan 5, 2023
@liamdebeasi liamdebeasi changed the title Fw 2593 feat(select): component can be used outside ion-item Jan 6, 2023
@liamdebeasi liamdebeasi marked this pull request as ready for review January 6, 2023 14:02
@liamdebeasi liamdebeasi requested review from a team and sean-perkins as code owners January 6, 2023 14:02
@liamdebeasi
Copy link
Contributor Author

Note: This also includes the same fix that I applied in #26574 for ion-input. See f2b7f45

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.

Should we have examples/tests for the different interface appearances of ion-select and the modern rendering?

The legacy tests show examples with interface="popover".

core/src/components/select/test/fill/index.html Outdated Show resolved Hide resolved
Copy link
Contributor

@amandaejohnston amandaejohnston left a comment

Choose a reason for hiding this comment

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

I noticed that the popover interface centers the popover horizontally, instead of right-aligning it like the legacy behavior:
popover

@liamdebeasi
Copy link
Contributor Author

Should we have examples/tests for the different interface appearances of ion-select and the modern rendering?
The legacy tests show examples with interface="popover".

I added tests. Will re-run screenshot jobs shortly.

@liamdebeasi
Copy link
Contributor Author

I noticed that the popover interface centers the popover horizontally, instead of right-aligning it like the legacy behavior:

Good call out. The popover behavior has not changed, but since the select now contains the label, the popover is visually going to be centered within the line. IMO this is good because users can click anywhere on the line to open the popover. Thoughts?

@amandaejohnston
Copy link
Contributor

I think it should still appear on the end side, since that's where the actual select appears to be. Otherwise it can easily look like the popover is just opening under empty space, which is strange. IMO behavior should match with how the legacy select acts when placed within an item, since that's what it looks like, even when the new syntax isn't used with an item as well.

@liamdebeasi
Copy link
Contributor Author

liamdebeasi commented Jan 9, 2023

Ok I fixed a handful of things:

  1. Fixed an issue where justification wasn't working. This broke as a result of some code I missed when resolving a merge conflict.
  2. Fixed an issue Amanda noted where the popover is not aligned correctly. Should now be aligned relative to the placeholder/icon.
  3. Fixed an issue where the popover does not take up the full width when using outline/solid styles
  4. Fixed an issue where the chevron was rotating on open on iOS. This was due to some code that slipped through when resolving a merge conflict.

Updating screenshots now and will re-request another review when that is done.

@liamdebeasi liamdebeasi merged commit 02640b5 into feature-7.0 Jan 11, 2023
@liamdebeasi liamdebeasi deleted the FW-2593 branch January 11, 2023 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: angular @ionic/angular package package: core @ionic/core package package: vue @ionic/vue package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants