-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(many): do not grow slotted checkboxes, radios, selects and toggles (
#29501) Issue number: resolves #29423 --------- ## What is the current behavior? I fixed a bug where icon was collapsing its width when next to a checkbox, radio or toggle to match the styles of select in #29328. This caused a regression for checkboxes, radios, and toggles when slotted inside of an item. Our test coverage for this was not great, as the slotted inputs test in item had so many elements that it was not apparent that this bug was introduced. In addition, the select itself presented the same issue before my PR and this is a regression from the v7 behavior. See the following Codepens to see the regression: - [Ionic v7](https://codepen.io/brandyscarney/pen/jOoPzoL) - [Ionic v8](https://codepen.io/brandyscarney/pen/KKLpoLX) ## What is the new behavior? - Updates the checkbox, radio, select, and toggle to reset the flex property when slotted. - Adds test coverage for the previous fix I did in #29328 where icons were collapsing their width next to checkboxes, radios and toggles. This was reproducible with a div and easier to see in a test so I used a div with a background instead of an icon. - Adds better test coverage for this fix which separates each component (checkbox, radio, select, toggle) into their own screenshot test to make sure the width is shrinking or expanding properly based on where it is located in an item. ## Does this introduce a breaking change? - [ ] Yes - [x] No ## Other information | Before fix 9b59138 | After | | ---| ---| | ![before fix](https://github.com/ionic-team/ionic-framework/assets/6577830/e27c6e3c-3d3a-4889-a44b-5f4a9a6ba552) | ![after fix](https://github.com/ionic-team/ionic-framework/assets/6577830/a05829d6-f776-4f0d-b7eb-cb8177449c90) | <table width="100%"> <tr align="center"> <td width="50%"><b>Before regression fix</b></td> <td width="50%"><b>After</b></td> </tr> <tr> <td width="50%"><img alt="before-regression-fix" src="https://github.com/ionic-team/ionic-framework/assets/6577830/bb1aea84-6c83-4fbe-96ad-855c1c9cca95"></td> <td width="50%"><img alt="after-regression-fix" src="https://github.com/ionic-team/ionic-framework/assets/6577830/655dab88-55a9-4961-a7fb-2a3233aa0004"></td> </tr> </table>
- Loading branch information
1 parent
73901a4
commit 584c187
Showing
48 changed files
with
234 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+8.38 KB
...em.e2e.ts-snapshots/item-inputs-div-with-inputs-ios-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.64 KB
...m.e2e.ts-snapshots/item-inputs-div-with-inputs-ios-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.55 KB
...em.e2e.ts-snapshots/item-inputs-div-with-inputs-ios-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.89 KB
...tem.e2e.ts-snapshots/item-inputs-div-with-inputs-md-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.31 KB
...em.e2e.ts-snapshots/item-inputs-div-with-inputs-md-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.94 KB
...tem.e2e.ts-snapshots/item-inputs-div-with-inputs-md-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+7.78 KB
...m.e2e.ts-snapshots/item-slotted-inputs-checkbox-ios-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.96 KB
....e2e.ts-snapshots/item-slotted-inputs-checkbox-ios-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.03 KB
...m.e2e.ts-snapshots/item-slotted-inputs-checkbox-ios-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.76 KB
...em.e2e.ts-snapshots/item-slotted-inputs-checkbox-md-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.87 KB
...m.e2e.ts-snapshots/item-slotted-inputs-checkbox-md-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.09 KB
...em.e2e.ts-snapshots/item-slotted-inputs-checkbox-md-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+41 Bytes
(100%)
...nputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-374 Bytes
(99%)
...puts/item.e2e.ts-snapshots/item-slotted-inputs-ios-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-52 Bytes
(100%)
...nputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+14 Bytes
(100%)
...nputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-rtl-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-429 Bytes
(99%)
...puts/item.e2e.ts-snapshots/item-slotted-inputs-ios-rtl-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-40 Bytes
(100%)
...nputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-rtl-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-9 Bytes
(100%)
...inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-399 Bytes
(98%)
...nputs/item.e2e.ts-snapshots/item-slotted-inputs-md-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+83 Bytes
(100%)
...inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-15 Bytes
(100%)
...inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-rtl-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+27 Bytes
(100%)
...nputs/item.e2e.ts-snapshots/item-slotted-inputs-md-rtl-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+32 Bytes
(100%)
...inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-rtl-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.35 KB
...item.e2e.ts-snapshots/item-slotted-inputs-radio-ios-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.73 KB
...tem.e2e.ts-snapshots/item-slotted-inputs-radio-ios-ltr-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.81 KB
...item.e2e.ts-snapshots/item-slotted-inputs-radio-ios-ltr-Mobile-Safari-linux.png
Oops, something went wrong.
Binary file added
BIN
+7.58 KB
.../item.e2e.ts-snapshots/item-slotted-inputs-radio-md-ltr-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+7.86 KB
...item.e2e.ts-snapshots/item-slotted-inputs-radio-md-ltr-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.88 KB
.../item.e2e.ts-snapshots/item-slotted-inputs-radio-md-ltr-Mobile-Safari-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.81 KB
...tem.e2e.ts-snapshots/item-slotted-inputs-select-ios-ltr-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+7.74 KB
...em.e2e.ts-snapshots/item-slotted-inputs-select-ios-ltr-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+5.88 KB
...tem.e2e.ts-snapshots/item-slotted-inputs-select-ios-ltr-Mobile-Safari-linux.png
Oops, something went wrong.
Binary file added
BIN
+5.88 KB
...item.e2e.ts-snapshots/item-slotted-inputs-select-md-ltr-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.94 KB
...tem.e2e.ts-snapshots/item-slotted-inputs-select-md-ltr-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+5.04 KB
...item.e2e.ts-snapshots/item-slotted-inputs-select-md-ltr-Mobile-Safari-linux.png
Oops, something went wrong.
Binary file added
BIN
+9.29 KB
...tem.e2e.ts-snapshots/item-slotted-inputs-toggle-ios-ltr-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+10.2 KB
...em.e2e.ts-snapshots/item-slotted-inputs-toggle-ios-ltr-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.46 KB
...tem.e2e.ts-snapshots/item-slotted-inputs-toggle-ios-ltr-Mobile-Safari-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.5 KB
...item.e2e.ts-snapshots/item-slotted-inputs-toggle-md-ltr-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+9.92 KB
...tem.e2e.ts-snapshots/item-slotted-inputs-toggle-md-ltr-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+7.61 KB
...item.e2e.ts-snapshots/item-slotted-inputs-toggle-md-ltr-Mobile-Safari-linux.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters