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(toggle): display as block when justify or alignment properties are defined #29802

Merged
merged 8 commits into from
Aug 28, 2024

Conversation

brandyscarney
Copy link
Member

@brandyscarney brandyscarney commented Aug 26, 2024

Issue number: internal


What is the current behavior?

When adding the justify or alignment property to an ion-toggle it does not change the design because the toggle is displayed inline.

What is the new behavior?

This is doing the same thing as #29783 and #29801

  • Change the toggle's display property to block when the justify or alignment property is set.
  • Set the default justify-content style to space-between so that a toggle with width: 100% set without justify or alignment set will still have the same default
  • Set the default align-items style to center so that a toggle with width: 100% and label-placement="stacked" set without justify or alignment set will still have the same default
  • Modifies the label e2e test to remove the explicit width as setting the property will make them full-width
  • Adds two examples to the label e2e test of labels that do not have justify set but use width: 100% to ensure they are working as expected without it
  • Adds one example to the label e2e test of a long label that uses justify to ensure it still wraps properly (this existed in the checkbox test but not toggle)

Does this introduce a breaking change?

  • Yes
  • No

Other information

Copy link

vercel bot commented Aug 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2024 7:45pm

@github-actions github-actions bot added the package: core @ionic/core package label Aug 26, 2024
@brandyscarney brandyscarney marked this pull request as ready for review August 26, 2024 19:51
@brandyscarney brandyscarney requested a review from a team as a code owner August 26, 2024 19:51
Copy link
Contributor

@thetaPC thetaPC left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants