Skip to content

feat(toggle): support label, placement, justify - #26314

Merged
liamdebeasi merged 48 commits into
FW-2597from
2597-label
Nov 21, 2022
Merged

liamdebeasi merged 48 commits into
FW-2597from
2597-label

Conversation

@liamdebeasi

@liamdebeasi liamdebeasi commented Nov 17, 2022 •

Copy link
Copy Markdown
Contributor

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?

The new standalone toggle does not support labels, label placement, and control justification

What is the new behavior?

Note: This does not include active/focus/hover states nor does it include fixes required for shadow part customization. This will be done in a separate PR.

Does this introduce a breaking change?

  • Yes
  • No

Other information

@github-actions github-actions Bot added the package: core @ionic/core package label Nov 17, 2022
@liamdebeasi
liamdebeasi marked this pull request as ready for review November 17, 2022 18:49
@liamdebeasi
liamdebeasi requested a review from a team as a code owner November 17, 2022 18:49

@averyrousseau averyrousseau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I noticed that with the RTL fix, the on-off labels in ios mode specifically are borked a little: they're now showing the "I" when the toggle is unchecked (instead of the "O") and don't appear at all when checked. (Or at least, that's what the screenshots are showing.)

Some of the toggles in the legacy sizes test are also rendering strangely in RTL (some handles are shaped and/or positioned incorrectly) though I'm unsure at a glance whether it's the test itself that needs adjusting.

@liamdebeasi

Copy link
Copy Markdown
Contributor Author

Some of the toggles in the legacy sizes test are also rendering strangely in RTL (some handles are shaped and/or positioned incorrectly) though I'm unsure at a glance whether it's the test itself that needs adjusting.

Which ones are shaped incorrectly? FWIW the "Custom Heights" toggles are intentionally customized to look kind of funky.

@averyrousseau

Copy link
Copy Markdown
Contributor

Highlighted the ones that look outright buggy in red:
toggles

@liamdebeasi

Copy link
Copy Markdown
Contributor Author

Thanks, I fixed that in f74a7b6. Also fixed in the toggle-rtl branch since it appeared on main.

@averyrousseau

Copy link
Copy Markdown
Contributor

Looks like the screenshots may need updating manually? I would expect the relevant sizing and onOffLabels tests to have failed with the fixes up.

@liamdebeasi

Copy link
Copy Markdown
Contributor Author

Looking into why the textarea screenshot got updated, but otherwise this PR is good for a review.

@liamdebeasi
liamdebeasi requested review from averyrousseau and removed request for averyrousseau November 21, 2022 20:28
@liamdebeasi
liamdebeasi merged commit 6b5b1ac into FW-2597 Nov 21, 2022
@liamdebeasi
liamdebeasi deleted the 2597-label 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.

4 participants