From 7b21bd40a6c83652f4aa3e0ea8c934cc7da7d3aa Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 1 Dec 2023 12:44:38 -0500 Subject: [PATCH 01/53] feat(picker-column): add styles, disabled and active states --- core/src/components.d.ts | 8 +++ .../picker-column-option.ios.scss | 1 + .../picker-column-option.md.scss | 5 ++ .../picker-column-option.scss | 45 +++++++++++++++ .../picker-column-option.tsx | 35 ++++++++---- .../picker-column-option/test/a11y/index.html | 5 +- .../test/basic/index.html | 14 ++++- .../test/basic/picker-column-option.e2e.ts | 55 +++++++++++++++++++ 8 files changed, 155 insertions(+), 13 deletions(-) create mode 100644 core/src/components/picker-column-option/picker-column-option.ios.scss create mode 100644 core/src/components/picker-column-option/picker-column-option.md.scss create mode 100644 core/src/components/picker-column-option/picker-column-option.scss create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts diff --git a/core/src/components.d.ts b/core/src/components.d.ts index 54929a21881..22c336a309c 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -1987,6 +1987,10 @@ export namespace Components { "value"?: string | number; } interface IonPickerColumnOption { + /** + * The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics). + */ + "color"?: Color; /** * If `true`, the user cannot interact with the picker column option. */ @@ -6634,6 +6638,10 @@ declare namespace LocalJSX { "value"?: string | number; } interface IonPickerColumnOption { + /** + * The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics). + */ + "color"?: Color; /** * If `true`, the user cannot interact with the picker column option. */ diff --git a/core/src/components/picker-column-option/picker-column-option.ios.scss b/core/src/components/picker-column-option/picker-column-option.ios.scss new file mode 100644 index 00000000000..d7c86e9662b --- /dev/null +++ b/core/src/components/picker-column-option/picker-column-option.ios.scss @@ -0,0 +1 @@ +@import "./picker-column-option.scss"; diff --git a/core/src/components/picker-column-option/picker-column-option.md.scss b/core/src/components/picker-column-option/picker-column-option.md.scss new file mode 100644 index 00000000000..8dc535d8991 --- /dev/null +++ b/core/src/components/picker-column-option/picker-column-option.md.scss @@ -0,0 +1,5 @@ +@import "./picker-column-option.scss"; + +:host(.option-active) button { + color: current-color(base); +} diff --git a/core/src/components/picker-column-option/picker-column-option.scss b/core/src/components/picker-column-option/picker-column-option.scss new file mode 100644 index 00000000000..a414a3580ed --- /dev/null +++ b/core/src/components/picker-column-option/picker-column-option.scss @@ -0,0 +1,45 @@ +@import "../../themes/ionic.globals"; + +// Picker Column +// -------------------------------------------------- + +button { + @include padding(0); + @include margin(0); + + width: 100%; + + height: 34px; + + border: 0px; + + outline: none; + + background: transparent; + + color: inherit; + + font-family: $font-family-base; + + font-size: inherit; + + line-height: 34px; + + text-align: inherit; + + text-overflow: ellipsis; + + white-space: nowrap; + + cursor: pointer; + + overflow: hidden; +} + +:host(.option-disabled) { + opacity: 0.4; +} + +:host(.option-disabled) button { + cursor: default; +} diff --git a/core/src/components/picker-column-option/picker-column-option.tsx b/core/src/components/picker-column-option/picker-column-option.tsx index b45adb6e2cb..56decf27633 100644 --- a/core/src/components/picker-column-option/picker-column-option.tsx +++ b/core/src/components/picker-column-option/picker-column-option.tsx @@ -1,9 +1,17 @@ import type { ComponentInterface } from '@stencil/core'; import { Component, Element, Host, Prop, State, Watch, h } from '@stencil/core'; import { inheritAttributes } from '@utils/helpers'; +import { createColorClasses } from '@utils/theme'; + +import { getIonMode } from '../../global/ionic-global'; +import type { Color } from '../../interface'; @Component({ tag: 'ion-picker-column-option', + styleUrls: { + ios: 'picker-column-option.ios.scss', + md: 'picker-column-option.md.scss', + }, shadow: true, }) export class PickerColumnOption implements ComponentInterface { @@ -29,6 +37,13 @@ export class PickerColumnOption implements ComponentInterface { */ @Prop() value?: any | null; + /** + * The color to use from your application's color palette. + * Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. + * For more information on colors, see [theming](/docs/theming/basics). + */ + @Prop({ reflect: true }) color?: Color = 'primary'; + /** * The aria-label of the option has changed after the * first render and needs to be updated within the component. @@ -50,19 +65,17 @@ export class PickerColumnOption implements ComponentInterface { } render() { - const { value, disabled, ariaLabel } = this; + const { color, value, disabled, ariaLabel } = this; + const mode = getIonMode(this); return ( - - diff --git a/core/src/components/picker-column-option/test/a11y/index.html b/core/src/components/picker-column-option/test/a11y/index.html index 9c19fd0b737..4d8d350ac12 100644 --- a/core/src/components/picker-column-option/test/a11y/index.html +++ b/core/src/components/picker-column-option/test/a11y/index.html @@ -2,7 +2,7 @@ - Picker Column Option - Basic + Picker Column Option - a11y @@ -14,6 +14,9 @@
my option other option + option + option + option
diff --git a/core/src/components/picker-column-option/test/basic/index.html b/core/src/components/picker-column-option/test/basic/index.html index e8d4fdd39d6..91c70186124 100644 --- a/core/src/components/picker-column-option/test/basic/index.html +++ b/core/src/components/picker-column-option/test/basic/index.html @@ -46,7 +46,19 @@

Default

- my option + My Option +
+
+

Disabled

+ My Option +
+
+

Active

+ My Option +
+
+

Active / Disabled

+ My Option
diff --git a/core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts b/core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts new file mode 100644 index 00000000000..f7291831e83 --- /dev/null +++ b/core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts @@ -0,0 +1,55 @@ +import { expect } from '@playwright/test'; +import { configs, test } from '@utils/test/playwright'; + +configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { + test.describe(title('picker-column-option: rendering'), () => { + test('picker option should not have visual regressions', async ({ page }) => { + await page.setContent( + ` + My Option + `, + config + ); + + const option = page.locator('ion-picker-column-option'); + + await expect(option).toHaveScreenshot(screenshot('picker-column-option')); + }); + test('disabled picker option should not have visual regressions', async ({ page }) => { + await page.setContent( + ` + My Option + `, + config + ); + + const option = page.locator('ion-picker-column-option'); + + await expect(option).toHaveScreenshot(screenshot('disabled-picker-column-option')); + }); + test('active picker option should not have visual regressions', async ({ page }) => { + await page.setContent( + ` + My Option + `, + config + ); + + const option = page.locator('ion-picker-column-option'); + + await expect(option).toHaveScreenshot(screenshot('active-picker-column-option')); + }); + test('disabled active picker option should not have visual regressions', async ({ page }) => { + await page.setContent( + ` + My Option + `, + config + ); + + const option = page.locator('ion-picker-column-option'); + + await expect(option).toHaveScreenshot(screenshot('disabled-active-picker-column-option')); + }); + }); +}); From 9d0834b2010a36f83ad7a166a8885b0d41dba1b0 Mon Sep 17 00:00:00 2001 From: ionitron Date: Fri, 1 Dec 2023 17:55:49 +0000 Subject: [PATCH 02/53] chore(): add updated snapshots --- ...column-option-ios-ltr-Mobile-Chrome-linux.png | Bin 0 -> 1955 bytes ...olumn-option-ios-ltr-Mobile-Firefox-linux.png | Bin 0 -> 1919 bytes ...column-option-ios-ltr-Mobile-Safari-linux.png | Bin 0 -> 1732 bytes ...-column-option-md-ltr-Mobile-Chrome-linux.png | Bin 0 -> 1531 bytes ...column-option-md-ltr-Mobile-Firefox-linux.png | Bin 0 -> 1831 bytes ...-column-option-md-ltr-Mobile-Safari-linux.png | Bin 0 -> 1355 bytes ...column-option-ios-ltr-Mobile-Chrome-linux.png | Bin 0 -> 1697 bytes ...olumn-option-ios-ltr-Mobile-Firefox-linux.png | Bin 0 -> 1772 bytes ...column-option-ios-ltr-Mobile-Safari-linux.png | Bin 0 -> 1564 bytes ...-column-option-md-ltr-Mobile-Chrome-linux.png | Bin 0 -> 1358 bytes ...column-option-md-ltr-Mobile-Firefox-linux.png | Bin 0 -> 1640 bytes ...-column-option-md-ltr-Mobile-Safari-linux.png | Bin 0 -> 1206 bytes ...column-option-ios-ltr-Mobile-Chrome-linux.png | Bin 0 -> 1697 bytes ...olumn-option-ios-ltr-Mobile-Firefox-linux.png | Bin 0 -> 1772 bytes ...column-option-ios-ltr-Mobile-Safari-linux.png | Bin 0 -> 1564 bytes ...-column-option-md-ltr-Mobile-Chrome-linux.png | Bin 0 -> 1702 bytes ...column-option-md-ltr-Mobile-Firefox-linux.png | Bin 0 -> 1703 bytes ...-column-option-md-ltr-Mobile-Safari-linux.png | Bin 0 -> 1417 bytes ...column-option-ios-ltr-Mobile-Chrome-linux.png | Bin 0 -> 1955 bytes ...olumn-option-ios-ltr-Mobile-Firefox-linux.png | Bin 0 -> 1919 bytes ...column-option-ios-ltr-Mobile-Safari-linux.png | Bin 0 -> 1732 bytes ...-column-option-md-ltr-Mobile-Chrome-linux.png | Bin 0 -> 1905 bytes ...column-option-md-ltr-Mobile-Firefox-linux.png | Bin 0 -> 1862 bytes ...-column-option-md-ltr-Mobile-Safari-linux.png | Bin 0 -> 1553 bytes 24 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/active-picker-column-option-ios-ltr-Mobile-Chrome-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/active-picker-column-option-ios-ltr-Mobile-Firefox-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/active-picker-column-option-ios-ltr-Mobile-Safari-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/active-picker-column-option-md-ltr-Mobile-Chrome-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/active-picker-column-option-md-ltr-Mobile-Firefox-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/active-picker-column-option-md-ltr-Mobile-Safari-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/disabled-active-picker-column-option-ios-ltr-Mobile-Chrome-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/disabled-active-picker-column-option-ios-ltr-Mobile-Firefox-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/disabled-active-picker-column-option-ios-ltr-Mobile-Safari-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/disabled-active-picker-column-option-md-ltr-Mobile-Chrome-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/disabled-active-picker-column-option-md-ltr-Mobile-Firefox-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/disabled-active-picker-column-option-md-ltr-Mobile-Safari-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/disabled-picker-column-option-ios-ltr-Mobile-Chrome-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/disabled-picker-column-option-ios-ltr-Mobile-Firefox-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/disabled-picker-column-option-ios-ltr-Mobile-Safari-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/disabled-picker-column-option-md-ltr-Mobile-Chrome-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/disabled-picker-column-option-md-ltr-Mobile-Firefox-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/disabled-picker-column-option-md-ltr-Mobile-Safari-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/picker-column-option-ios-ltr-Mobile-Chrome-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/picker-column-option-ios-ltr-Mobile-Firefox-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/picker-column-option-ios-ltr-Mobile-Safari-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/picker-column-option-md-ltr-Mobile-Chrome-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/picker-column-option-md-ltr-Mobile-Firefox-linux.png create mode 100644 core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/picker-column-option-md-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/active-picker-column-option-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/active-picker-column-option-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000000000000000000000000000000000..872f0619da27ddc324fcb9f5d726b5e94bd438c8 GIT binary patch literal 1955 zcmV;U2VD4xP)Px+T}ebiRCt{2+*?RgT^k4R|2R61Qfj4*73q-2(kvrG(?oh_G)ZHUL^2O$QECUu zBq+iTbkhMZDjH2NvWU=9lN`!4OLHW|GBxv%LQbh;r3N0R(pm4t%WS^M8PhjEzOQ_K zSMF!6{XA>tVlVg7wRns%20{oS!~m23^#BMVg#7=aNrDhUh*72h(AwGxl}d$xfB=}A zn;YynJUoo*>S{PRIKailWm<}BwOZ8H*5c*Mmlzlrz{-^?;p^)QD=VvM$*&U^7YA!= zYh1c?X^~ zLL!l%t*s48r4l_oJ$Uox4SIWf;p5|jkdP46*49orZ-0M3GBPsI-`}qn&&|z6R#w(@ z4WAG~W(-r^4~~wGsHv&Jix)4jYSk*ePD-T`uV250gM$MXYiepjd3iZ@@7@hFGczvU z*4BoSk`nCPxf4R6&|uN5tSmG)H>0+;7T(_8TzuZVc_=6-fQN?%Qd3h=US19WxOeX! zY;A3^V#Nw56bdvoHNo548{y&MFfsXOo~y2|#{K*E0RXpd-NM3!3%Ris7Z*by5I`!G za<#sF`-Y;TA~ZBKKqL}DDwXOjqv>icS+WEQg#w+Oo$&YfM{scP)W2my2>DI%7-Q_v zp+l&vtHZ2WvtVy;Kkm2gn3x!hjEtbSw->&?zB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DHLkV1gZ6u1f#_ literal 0 HcmV?d00001 diff --git a/core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/active-picker-column-option-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/active-picker-column-option-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000000000000000000000000000000000..41ff9101e0620460c2065a4082208f7b2e72bc14 GIT binary patch literal 1919 zcmV-_2Y~pAP)3hh6o%iLmBf%1LCoV1p%OuBXk(s&5JQW$N>Q_*_+gHj5F#}bB2rBW8rnoERWuP} z5mZ$uHI#%OhN8ajU0?Re?Y-x!e!ah(wUQ>~?6dbd&plo5S;M}5zy39-DFG#*1eAah zup!{5BB9TP5>Nt4KnZvwpdz8qh7wQ$Ndq4~G&^0!ly${9Ys;KYolCFJ7QW zj~=L6wW{sl&!0cz+O=zF(xeGmw{Gndq&Yb`xPJXQ^78V~zI}Ui?b;QM8a49C+-8zV zlO~~7tyNt8ARv*%{Q2{-efxGCK71IFk&(9dosf`#88c>J;lhR3 zym@oE*nIo;4NI0R!Hyj}P_t%DG;7uj6e`xx*RNj>UXP!jUzyk7wGACQ6rrJ^*12QG zj1iI8w{KsW=hG9EfD%vwPA5=8B={zum6c`7q+`d9xO?}mPefws)Tuaj>=<_M-Yue3 zp+W_G|Nb3o*RI8yHEXbC%N8tHu%OJJO<-UkR<2x$nKNgW`CL6g2`B+2paeV#SR!%i z)G0|hG5yoIbLSExuU@^1UcGurDu{39j3gdBc!2cubi~HSqH^WR)_A6n($dlp6BC1K z)v9@{c<u9=#e3V(lp3?4if zEn2jY^PfL|j>u0T1R8)jBXU-ryI~(=u z*Oz0iDKytLFJHcl%*;%=mht1qBOo9^pCcup1eAbd2v{O<`}S=~{WNIMz#}y?VZsD_ z`SJyC-@Zk+ZrwyAo<4nwR;^lz6CN~ZkOeF*E)EnG&Sz)q)~&;a4I5-GI}v&G=n>kr zYbU}ma^y%{xpGBnC5$?FZ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YiUE4bYx~PpqVSdNJn?NKHFfmuOW1wgoHz-sbxR09kn>{ z?4#jPe!HEeq=_v5P;mUMu3q<)cg!m{`9-412hO;TG?VE4DR6{kG<9tGGYN^}g!U#9 zY4ydo=QaXHATk1pL_(*@KUmJ7e~vZ&+N|BTP57D)ClaIMo!21GK!$Zb8r$K9N>~z< z+}YT<)FRjdD=$OhvEv{xgJL9e*%OJ`Jy`0>>Q+y0Y4_Or=gJ2~4PQt*$9`H|aWFchiIwZcm21lhE!a z6N%LOlG~FR0V5DSfv_T>yIMDyU{;Y315W7*}@eAJ3UP_jU9mX}FrpTv~aG@qHJ$PD-PNq95YQ*>VE9*$GY4zxEz8}>v2s#NS}j7yT@nz}je+5+f;3 zA|=+gHH?4}Faky(asp9{ggglCqW*-N(~8~#3}_JfMgMK4iNwDVvg1a;2pEC?hCtLJ zvGhmaW&SjW$~WqE%EngHlo}=yDMixOF#<-w2qcd{)FP3*%i7sSzz7%tBk+G9@DJpv VkmJ960}%iK002ovPDHLkV1lc7TipNv literal 0 HcmV?d00001 diff --git a/core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/active-picker-column-option-md-ltr-Mobile-Safari-linux.png b/core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/active-picker-column-option-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000000000000000000000000000000000..7395bd0bdd06542aa9b9023a6d5936a49a4d1a0f GIT binary patch literal 1355 zcmV-R1+@B!P)>^@A)OrL=8jmrA zeZ@*ivTVX^q`rxQYPxM$;#if8RzvEiG~ED5{zTa-zVsD(9UncdA2BOPC4l&I&MYG zMlQ8bR--g?PZI3!SdW0pI*cKX!I)qw>(u7%-W-6|sId6GQoU2}v<*KERiU)ZQJxarHWD(@8V&!yoJ|boFx(LJSH@NowoF636v+ z4p%502T#!1jX9R~E+sNG3_mZ9R07!G*k2??JEm)Cqoa!eAIErrj*c!`+LUHm91G$x z1n^8E^B*Pi7~M7=9L;DSfQLq-*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.e2e.ts-snapshots/disabled-picker-column-option-md-ltr-Mobile-Safari-linux.png b/core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/disabled-picker-column-option-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000000000000000000000000000000000..1108102bd579231d10e497038e054660e1144da3 GIT binary patch literal 1417 zcmV;41$O$0P)QXGAxGCF4fpH2osEHNQST9UWj7e+a zWz$dAtEPSdd(rfTaK}wwqD#PrT?Bj~h)``Ypakpgxfru@7B%8IJ(Zs4cOx@9Gb|+h z^DvBzrfCQO0B#2Mci#X20GxqH0s!0~W`s~A63OLq;cz$@3>q%4tgL+b^2O)#&CJYP zeNk0aB}q!B)75H~=Xs3r*w~oKWNP>3-oJm}-Q7JsJ>Bj^06>R2tCD0{ZoRB1O1mp+ zn)dG9J4uoT2L~TNe(dph;_>*~w{NeqX_ZQ)Uc7kGXf$Y35CoUY)$R=d06LeM{^2<8 z`}gmqQmHutc6N3S4i37zyW3h(mgRgtKR-V&iX!cCyWMZzyh)`}e!su1rA9|b+Zqo5 z=ya!%)ZgDR8{49-q6qUysE1DCJ`aT@Aup7_Fyo0|Ni|%BB5#8?c29| zdU_B-cDvoMf~IMoK7I1}d{a|X_wL<$`0(M_*cgo=IzSMFnVFfPp`lPH-BoAR=Z^U{{Ft<=`hBssuqhy+H^Xd`X!#{^{4^>be7XdQdJcpLf2JyEEWqw=;-L^lDni4 z(_A{ydg`L+fg|Yvbg0v6g?@%9!S zaX1`5e*8!#lY$^LA4*ab#cH(*g0Q{4y}rIaIXOwg$ZEABgx1#9L{V%$j=-|)#Kc4_ z7PD9^q9~S1rPbBd(a}+;k^uO_7$eEyaJXD9v)O#>)~$0V^!E1l^z>X*A|ZqrhMAk2 zlO#z|ltd!I^ZbJc55~vGn-2u1lN(Te68=uydVIDEb70DwQ3 zu}Zo`tyatD^O7WaJf3Uk5dZ*OqK*H$D3{BzSj=X#O-)Vxx*Gxj{GYY`#SH)eex1Jn XzP=lKzb5b<00000NkvXXu0mjfDEG@K literal 0 HcmV?d00001 diff --git a/core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/picker-column-option-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/picker-column-option-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000000000000000000000000000000000..872f0619da27ddc324fcb9f5d726b5e94bd438c8 GIT binary patch literal 1955 zcmV;U2VD4xP)Px+T}ebiRCt{2+*?RgT^k4R|2R61Qfj4*73q-2(kvrG(?oh_G)ZHUL^2O$QECUu zBq+iTbkhMZDjH2NvWU=9lN`!4OLHW|GBxv%LQbh;r3N0R(pm4t%WS^M8PhjEzOQ_K zSMF!6{XA>tVlVg7wRns%20{oS!~m23^#BMVg#7=aNrDhUh*72h(AwGxl}d$xfB=}A zn;YynJUoo*>S{PRIKailWm<}BwOZ8H*5c*Mmlzlrz{-^?;p^)QD=VvM$*&U^7YA!= zYh1c?X^~ zLL!l%t*s48r4l_oJ$Uox4SIWf;p5|jkdP46*49orZ-0M3GBPsI-`}qn&&|z6R#w(@ z4WAG~W(-r^4~~wGsHv&Jix)4jYSk*ePD-T`uV250gM$MXYiepjd3iZ@@7@hFGczvU z*4BoSk`nCPxf4R6&|uN5tSmG)H>0+;7T(_8TzuZVc_=6-fQN?%Qd3h=US19WxOeX! zY;A3^V#Nw56bdvoHNo548{y&MFfsXOo~y2|#{K*E0RXpd-NM3!3%Ris7Z*by5I`!G za<#sF`-Y;TA~ZBKKqL}DDwXOjqv>icS+WEQg#w+Oo$&YfM{scP)W2my2>DI%7-Q_v zp+l&vtHZ2WvtVy;Kkm2gn3x!hjEtbSw->&?zBqsWJUTi$;Oy*-;^Jb2hK6!|larI7 zR4P$dS7)@S?m=5pQev<@Gcyy3iHYdz>%*Kmb0C#UAr_0#(9i&ZKmdV2fXd2B{Povg zC@Ly~si`ThU%!s*>}*t2R3I=g5LQ-J$ji%vP$)!rcsOiqY;fbo4FEuQcQ-;qL-GFo zd-(bJL8Vfmxw#ovu3SMvLIMClDwV>{&JOkU^$?52=OG{ZmKmbckP379wty{;oZ{N;c zkByBnkx0bS)6>~R#9}c^Nl7uPgyd|_c>EG8y~yN-{KXHHH|Os!UPv9z=_W?^B$R4Nr$)6&wCwY0Qw zeGVT!%q%P{*y!l!grAQPLjDwbf0GCa34ur?LQYN&7t7AhhNGh+)~{bbZi0!6i$h^y zA-;eA4gjdAsKBRBpAa1#J>kTpR;yuWXJ@os*QQphxtO1yA2x5^%w7BY`(xwAjktUF z?u4~|#27J<3Qn|^ zZ{KpUA1AWevu6VUHz^WA$e(W9X1aug1hluegA0KbX{m6hQ0`EYi2=3;|`gX8)Q4h~LvPlfJ5KQuHn zu5D;&XxjH^5JJfBY}_PaYio(U!L`O%%#>U2I0^O3+PKl zXmWBg>g($b?#ocC)wp=^B6jT90SgNYF8<`n6TQ6-TCEmkWn~86FouVRjn=lZvVwzy z1Io(E^x|!8ZFu+Y9hNU&{?qXjLdZ;EYABeLl!U;*KrqHoQ&Tfxg5cm_2!%rI+qVx< zQBg+!?e#xNrBXyhL?AXc79AZOkjZ4Qv9WeVYOSg=5^e?&wCRJ%Iu9T5~11bcgXJb3T`d_I5DpMelU{&YOX ze*LKMBS(&)u&@xVt*ukOmobKpjt+eJ@&z6q9tO{j((RMT%F2RPtA$#v9yf{nnDgt` zuakPK>F(~v+_`g&o>@f*Av2l5<)+E{{P{DKN+m8|zKrzr^naCu$K%1t$!XI4O-xKC zoFH^LCo@3+_-QUe2${)#>8SA3)KqNQvIViRvDmX`&vcDx9499yEMC0$zm}g6LWp6% pwA?f{HU=J#$DN-<2qEOp@;4Nt9H#^8<$3@B002ovPDHLkV1gZ6u1f#_ literal 0 HcmV?d00001 diff --git a/core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/picker-column-option-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/picker-column-option-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000000000000000000000000000000000..41ff9101e0620460c2065a4082208f7b2e72bc14 GIT binary patch literal 1919 zcmV-_2Y~pAP)3hh6o%iLmBf%1LCoV1p%OuBXk(s&5JQW$N>Q_*_+gHj5F#}bB2rBW8rnoERWuP} z5mZ$uHI#%OhN8ajU0?Re?Y-x!e!ah(wUQ>~?6dbd&plo5S;M}5zy39-DFG#*1eAah zup!{5BB9TP5>Nt4KnZvwpdz8qh7wQ$Ndq4~G&^0!ly${9Ys;KYolCFJ7QW zj~=L6wW{sl&!0cz+O=zF(xeGmw{Gndq&Yb`xPJXQ^78V~zI}Ui?b;QM8a49C+-8zV zlO~~7tyNt8ARv*%{Q2{-efxGCK71IFk&(9dosf`#88c>J;lhR3 zym@oE*nIo;4NI0R!Hyj}P_t%DG;7uj6e`xx*RNj>UXP!jUzyk7wGACQ6rrJ^*12QG zj1iI8w{KsW=hG9EfD%vwPA5=8B={zum6c`7q+`d9xO?}mPefws)Tuaj>=<_M-Yue3 zp+W_G|Nb3o*RI8yHEXbC%N8tHu%OJJO<-UkR<2x$nKNgW`CL6g2`B+2paeV#SR!%i z)G0|hG5yoIbLSExuU@^1UcGurDu{39j3gdBc!2cubi~HSqH^WR)_A6n($dlp6BC1K z)v9@{c<u9=#e3V(lp3?4if zEn2jY^PfL|j>u0T1R8)jBXU-ryI~(=u z*Oz0iDKytLFJHcl%*;%=mht1qBOo9^pCcup1eAbd2v{O<`}S=~{WNIMz#}y?VZsD_ z`SJyC-@Zk+ZrwyAo<4nwR;^lz6CN~ZkOeF*E)EnG&Sz)q)~&;a4I5-GI}v&G=n>kr zYbU}ma^y%{xpGBnC5$?FZctDVC^YZhy+cw`5(W$yfSWgOV#SITA|P$rv_bRc&9Qv> za&+m^1;d67L+#qNarEd>xf}`ruQxwGAKklm7h!z(@S)5fEug5s-;NV~p0SXx- z0bVB^HftFslCeuSxr;RJVd>JP z&VFk2?v;QNa14PGB60EJMR{wcgP%Qnw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+)4b3tgI}wS}kE=VZZd8t*xz6Tlkp;3l>b8ZRMAxV-X{rCL`yvOI9E;~N~00000NkvXXu0mjf@O!BK literal 0 HcmV?d00001 diff --git a/core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/picker-column-option-md-ltr-Mobile-Firefox-linux.png b/core/src/components/picker-column-option/test/basic/picker-column-option.e2e.ts-snapshots/picker-column-option-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000000000000000000000000000000000..1c3f1143046dbed06e611983d06e597c78b7101e GIT binary patch literal 1862 zcmV-M2f6r(P)RO|i}j&sv1r33b14JcDa$WvkcFYqX0#Vc zD;2Fm`@WbODV1rqyzl?Oz08bb?=<6=w>by=;N0hV?!CXcoc}$`GakSGHK-{8C7=Y9 zfD*7nz(Yksp9>|R1eAahsEL4zggzTeKnW-TB~T*)6$yPflz<&&!NN=7%$PC5<@Iy{C7=Y9fV&frNWu^aI@p4Of@(}y+wRn<6P`SI;*v<5 zK7AVF#*IV2e*G|g`gA!D1&6|M`0!zbhKByp_tCa(TkzVqY}q37e*E}>xpU`Y)~s0= zJb3UQt)+vNfD%vwN}xIcQzY{9^HE$}jH_3#A}}z}YUKIz=P_*9Ftlvh5~D_qaw?Lj zs;WZg&Yj`s=ZACW&Y^DIx~602noplT#pB11QLkP-hrcIVk#KmT4pah4KnW-ThX|M= zQC?n-2M-=#^ytypxpSx0$;ruxiHVW*8Z~NU zb(o(uY0?B7L+4D9m^W`8MvfebwQJXcQOMGzOC{2H{`|T8|Mu-$iE1b=D_5?RDCOtR zpH?FA_3KwjZB1oYa(n z5>Nu}O28C}ckkX|-@bil*RCCQ@7|56Q>O}(^z?MhpFdw5E1fo-CPm`=_wQ)ari~Pc zS@34vf=+kNoHNu}O28C}XV0GD#*G^oJ9exH0MkRXAw!0UGtSP=md+u*nH$|r zOz9jyeq7%0S<7Ij65qai_Uu`W=i z$jER=BqmIlfR`^{%6(bdYDz!}C;@jRV2T9m z5p?jmxw)7$X%Z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EdcQ8( z0%K!iOXSVhuV4H9euiO$$kC%mgTbKJ>*bp|olZE!rcIkBCMK3n#0a64X(1)?H(!d1 zik?1wIx;fy?%g}D*UNDn0L;zJ38Pt-9U2;X_3D+!r0{18H`%6Ct1OC%DOW!-LfdwY99L4ioL$g|yt4BKQ1_1tu(KU`%tCh>;9UUD) zU;dcZWZe ztSp1UAdHWTi>s@vv)OEkiHUpn?tS_4<+*d`Dl04b>IotAzY&>|v|4RiTH5;c>$hy# zvgm}=)Kr?Le^ep?fJh{I`0%0KZohf+WC@$nZgUTkV=QmfSthvVeQlgm42gwTpb z#d;^WudmN!G7S$8Z{ECld55HFnq}EV|D+Bf^oNVAl9n(!I@;acU0+{su~?R!j}Ss= z2{HV05}(g!v)NKoQkt8af8B- Date: Fri, 1 Dec 2023 12:59:03 -0500 Subject: [PATCH 03/53] chore: run build --- core/api.txt | 1 + packages/angular/src/directives/proxies.ts | 4 ++-- packages/angular/standalone/src/directives/proxies.ts | 4 ++-- packages/vue/src/proxies.ts | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core/api.txt b/core/api.txt index 8a02f2a89b3..d2b8e7863d3 100644 --- a/core/api.txt +++ b/core/api.txt @@ -919,6 +919,7 @@ ion-picker-column,prop,value,number | string | undefined,undefined,false,false ion-picker-column,event,ionChange,PickerColumnItem,true ion-picker-column-option,shadow +ion-picker-column-option,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record | undefined,'primary',false,true ion-picker-column-option,prop,disabled,boolean,false,false,false ion-picker-column-option,prop,value,any,undefined,false,false diff --git a/packages/angular/src/directives/proxies.ts b/packages/angular/src/directives/proxies.ts index c6e7c3bb3b8..fd5b4c9426b 100644 --- a/packages/angular/src/directives/proxies.ts +++ b/packages/angular/src/directives/proxies.ts @@ -1476,14 +1476,14 @@ export declare interface IonPickerColumn extends Components.IonPickerColumn { @ProxyCmp({ - inputs: ['disabled', 'value'] + inputs: ['color', 'disabled', 'value'] }) @Component({ selector: 'ion-picker-column-option', changeDetection: ChangeDetectionStrategy.OnPush, template: '', // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property - inputs: ['disabled', 'value'], + inputs: ['color', 'disabled', 'value'], }) export class IonPickerColumnOption { protected el: HTMLElement; diff --git a/packages/angular/standalone/src/directives/proxies.ts b/packages/angular/standalone/src/directives/proxies.ts index e9a5b52a5b7..575c9b3f960 100644 --- a/packages/angular/standalone/src/directives/proxies.ts +++ b/packages/angular/standalone/src/directives/proxies.ts @@ -1473,14 +1473,14 @@ export declare interface IonPickerColumn extends Components.IonPickerColumn { @ProxyCmp({ defineCustomElementFn: defineIonPickerColumnOption, - inputs: ['disabled', 'value'] + inputs: ['color', 'disabled', 'value'] }) @Component({ selector: 'ion-picker-column-option', changeDetection: ChangeDetectionStrategy.OnPush, template: '', // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property - inputs: ['disabled', 'value'], + inputs: ['color', 'disabled', 'value'], standalone: true }) export class IonPickerColumnOption { diff --git a/packages/vue/src/proxies.ts b/packages/vue/src/proxies.ts index 26518e9bfd0..2cba1b14084 100644 --- a/packages/vue/src/proxies.ts +++ b/packages/vue/src/proxies.ts @@ -589,7 +589,8 @@ export const IonPickerColumn = /*@__PURE__*/ defineContainer('ion-picker-column-option', defineIonPickerColumnOption, [ 'disabled', - 'value' + 'value', + 'color' ]); From eace6425a2464606374be779c0eae4443cfcf1be Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 1 Dec 2023 14:28:07 -0500 Subject: [PATCH 04/53] refactor: add slot to integrate basic options --- .../picker-column/picker-column.scss | 11 ++++++ .../picker-column/picker-column.tsx | 34 ++----------------- 2 files changed, 13 insertions(+), 32 deletions(-) diff --git a/core/src/components/picker-column/picker-column.scss b/core/src/components/picker-column/picker-column.scss index 3e0a1937ae1..b30cc70825f 100644 --- a/core/src/components/picker-column/picker-column.scss +++ b/core/src/components/picker-column/picker-column.scss @@ -33,6 +33,17 @@ display: none; } +::slotted(ion-picker-column-option) { + display: block; + + scroll-snap-align: center; +} + +.picker-item-empty, +:host(:not([disabled])) ::slotted(ion-picker-column-option.option-disabled) { + scroll-snap-align: none; +} + :host .picker-item { @include padding(0); @include margin(0); diff --git a/core/src/components/picker-column/picker-column.tsx b/core/src/components/picker-column/picker-column.tsx index f615eed5300..e5fd1baa71e 100644 --- a/core/src/components/picker-column/picker-column.tsx +++ b/core/src/components/picker-column/picker-column.tsx @@ -450,37 +450,7 @@ export class PickerColumn implements ComponentInterface { - {items.map((item, index) => { - const isItemDisabled = pickerDisabled || item.disabled || false; - - { - /* - Users should be able to tab - between multiple columns. As a result, - we set tabindex here so that tabbing switches - between columns instead of buttons. Users - can still use arrow keys on the keyboard to - navigate the column up and down. - */ - } - return ( - - ); - })} + @@ -495,6 +465,6 @@ export class PickerColumn implements ComponentInterface { } } -const PICKER_ITEM_ACTIVE_CLASS = 'picker-item-active'; +const PICKER_ITEM_ACTIVE_CLASS = 'option-active'; const PICKER_ITEM_PART = 'wheel-item'; const PICKER_ITEM_ACTIVE_PART = 'active'; From b68c93d55d5c99791ffee7c225394fe536ed9ee1 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 1 Dec 2023 14:49:23 -0500 Subject: [PATCH 05/53] refactor: scrolling column sets value --- core/src/components.d.ts | 4 +- .../picker-column/picker-column.tsx | 87 ++++++++++--------- 2 files changed, 49 insertions(+), 42 deletions(-) diff --git a/core/src/components.d.ts b/core/src/components.d.ts index 22c336a309c..b353d1028c0 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -4051,7 +4051,7 @@ declare global { new (): HTMLIonPickerElement; }; interface HTMLIonPickerColumnElementEventMap { - "ionChange": PickerColumnItem; + "ionChange": string | number | undefined; } interface HTMLIonPickerColumnElement extends Components.IonPickerColumn, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLIonPickerColumnElement, ev: IonPickerColumnCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; @@ -6631,7 +6631,7 @@ declare namespace LocalJSX { /** * Emitted when the value has changed. */ - "onIonChange"?: (event: IonPickerColumnCustomEvent) => void; + "onIonChange"?: (event: IonPickerColumnCustomEvent) => void; /** * The selected option in the picker. */ diff --git a/core/src/components/picker-column/picker-column.tsx b/core/src/components/picker-column/picker-column.tsx index e5fd1baa71e..0cfafe0224e 100644 --- a/core/src/components/picker-column/picker-column.tsx +++ b/core/src/components/picker-column/picker-column.tsx @@ -70,7 +70,7 @@ export class PickerColumn implements ComponentInterface { /** * Emitted when the value has changed. */ - @Event() ionChange!: EventEmitter; + @Event() ionChange!: EventEmitter; @Watch('value') valueChange() { @@ -101,7 +101,9 @@ export class PickerColumn implements ComponentInterface { * Because this initial call to scrollActiveItemIntoView has to fire before * the scroll listener is set up, we need to manage the active class manually. */ - const oldActive = getElementRoot(el).querySelector(`.${PICKER_ITEM_ACTIVE_CLASS}`); + const oldActive = getElementRoot(el).querySelector( + `.${PICKER_ITEM_ACTIVE_CLASS}` + ) as HTMLIonPickerColumnOptionElement | null; if (oldActive) { this.setPickerItemActiveState(oldActive, false); } @@ -130,12 +132,14 @@ export class PickerColumn implements ComponentInterface { } componentDidRender() { - const { activeItem, items, isColumnVisible, value } = this; + const { el, activeItem, isColumnVisible, value } = this; if (isColumnVisible) { if (activeItem) { this.scrollActiveItemIntoView(); - } else if (items[0]?.value !== value) { + } else { + const firstOption = el.querySelector('ion-picker-column-option'); + /** * If the picker column does not have an active item and the current value * does not match the first item in the picker column, that means @@ -143,7 +147,9 @@ export class PickerColumn implements ComponentInterface { * first item to match the scroll position of the column. * */ - this.setValue(items[0].value); + if (firstOption !== null && firstOption.value !== value) { + this.setValue(firstOption.value); + } } } } @@ -167,12 +173,8 @@ export class PickerColumn implements ComponentInterface { */ @Method() async setValue(value?: string | number) { - const { items } = this; this.value = value; - const findItem = items.find((item) => item.value === value && item.disabled !== true); - if (findItem) { - this.ionChange.emit(findItem); - } + this.ionChange.emit(value); } private centerPickerItemInView = (target: HTMLElement, smooth = true, canExitInputMode = true) => { @@ -199,7 +201,7 @@ export class PickerColumn implements ComponentInterface { } }; - private setPickerItemActiveState = (item: Element, isActive: boolean) => { + private setPickerItemActiveState = (item: HTMLIonPickerColumnOptionElement, isActive: boolean) => { if (isActive) { item.classList.add(PICKER_ITEM_ACTIVE_CLASS); item.part.add(PICKER_ITEM_ACTIVE_PART); @@ -270,7 +272,7 @@ export class PickerColumn implements ComponentInterface { const { el } = this; let timeout: ReturnType | undefined; - let activeEl: HTMLElement | null = this.activeItem; + let activeEl: HTMLIonPickerColumnOptionElement | undefined = this.activeItem; const scrollCallback = () => { raf(() => { @@ -292,13 +294,24 @@ export class PickerColumn implements ComponentInterface { const centerX = bbox.x + bbox.width / 2; const centerY = bbox.y + bbox.height / 2; - const activeElement = el.shadowRoot!.elementFromPoint(centerX, centerY) as HTMLButtonElement | null; + const newActiveElement = el.shadowRoot!.elementFromPoint( + centerX, + centerY + ) as HTMLIonPickerColumnOptionElement | null; - if (activeEl !== null) { + if (activeEl !== undefined) { this.setPickerItemActiveState(activeEl, false); } - if (activeElement === null || activeElement.disabled) { + /** + * This null check is important because activeEl + * can be undefined but newActiveElement can be + * null since we are using a querySelector. + * newActiveElement !== activeEl would return true + * below if newActiveElement was null but activeEl + * was undefined. + */ + if (newActiveElement === null || newActiveElement.disabled) { return; } @@ -306,7 +319,7 @@ export class PickerColumn implements ComponentInterface { * If we are selecting a new value, * we need to run haptics again. */ - if (activeElement !== activeEl) { + if (newActiveElement !== activeEl) { enableHaptics && hapticSelectionChanged(); if (this.canExitInputMode) { @@ -325,8 +338,8 @@ export class PickerColumn implements ComponentInterface { } } - activeEl = activeElement; - this.setPickerItemActiveState(activeElement, true); + activeEl = newActiveElement; + this.setPickerItemActiveState(newActiveElement, true); timeout = setTimeout(() => { this.isScrolling = false; @@ -352,23 +365,7 @@ export class PickerColumn implements ComponentInterface { */ this.canExitInputMode = true; - const dataIndex = activeElement.getAttribute('data-index'); - - /** - * If no value it is - * possible we hit one of the - * empty padding columns. - */ - if (dataIndex === null) { - return; - } - - const index = parseInt(dataIndex, 10); - const selectedItem = this.items[index]; - - if (selectedItem.value !== this.value) { - this.setValue(selectedItem.value); - } + this.setValue(newActiveElement.value); }, 250); }); }; @@ -412,15 +409,25 @@ export class PickerColumn implements ComponentInterface { }; get activeItem() { - // If the whole picker column is disabled, the current value should appear active - // If the current value item is specifically disabled, it should not appear active - const selector = `.picker-item[data-value="${this.value}"]${this.disabled ? '' : ':not([disabled])'}`; + const { value } = this; + const options = Array.from( + this.el.querySelectorAll('ion-picker-column-option') as NodeListOf + ); + return options.find((option: HTMLIonPickerColumnOptionElement) => { + /** + * If the whole picker column is disabled, the current value should appear active + * If the current value item is specifically disabled, it should not appear active + */ + if (!this.disabled && option.disabled) { + return false; + } - return getElementRoot(this.el).querySelector(selector) as HTMLElement | null; + return option.value === value; + }) as HTMLIonPickerColumnOptionElement | undefined; } render() { - const { items, color, disabled: pickerDisabled, isActive, numericInput } = this; + const { color, disabled: pickerDisabled, isActive, numericInput } = this; const mode = getIonMode(this); /** From 2f3f9dc9cab3b77bcc635101283932cf95b19807 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 1 Dec 2023 14:58:01 -0500 Subject: [PATCH 06/53] refactor: clicking option sets value --- .../picker-column-option.tsx | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/core/src/components/picker-column-option/picker-column-option.tsx b/core/src/components/picker-column-option/picker-column-option.tsx index 56decf27633..8939ab67534 100644 --- a/core/src/components/picker-column-option/picker-column-option.tsx +++ b/core/src/components/picker-column-option/picker-column-option.tsx @@ -64,6 +64,19 @@ export class PickerColumnOption implements ComponentInterface { this.ariaLabel = inheritedAttributes['aria-label'] || null; } + /** + * When an option is clicked update the + * parent picker column value. This + * component will handle centering the option + * in the column view. + */ + onClick() { + const parentPickerColumn = this.el.closest('ion-picker-column'); + if (parentPickerColumn !== null) { + parentPickerColumn.setValue(this.value); + } + } + render() { const { color, value, disabled, ariaLabel } = this; const mode = getIonMode(this); @@ -75,7 +88,12 @@ export class PickerColumnOption implements ComponentInterface { ['option-disabled']: disabled, })} > - From 75ee951ce8865f65030f4fe7a8c9a48910e9f1d0 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 1 Dec 2023 14:58:06 -0500 Subject: [PATCH 07/53] chore: lint --- .../picker-column-option/picker-column-option.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/core/src/components/picker-column-option/picker-column-option.tsx b/core/src/components/picker-column-option/picker-column-option.tsx index 8939ab67534..c82b5dcff38 100644 --- a/core/src/components/picker-column-option/picker-column-option.tsx +++ b/core/src/components/picker-column-option/picker-column-option.tsx @@ -88,12 +88,7 @@ export class PickerColumnOption implements ComponentInterface { ['option-disabled']: disabled, })} > - From b1fc67227ca4ca3dce41d9c3b37eea8fcd6e7e88 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 1 Dec 2023 15:16:59 -0500 Subject: [PATCH 08/53] fix: column scrolls into view when option is ready --- .../picker-column-option/picker-column-option.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/core/src/components/picker-column-option/picker-column-option.tsx b/core/src/components/picker-column-option/picker-column-option.tsx index c82b5dcff38..8182ba6ee1f 100644 --- a/core/src/components/picker-column-option/picker-column-option.tsx +++ b/core/src/components/picker-column-option/picker-column-option.tsx @@ -64,6 +64,20 @@ export class PickerColumnOption implements ComponentInterface { this.ariaLabel = inheritedAttributes['aria-label'] || null; } + /** + * The column options can load at any time + * so the selected option needs to tell the + * parent picker column when it is loaded + * so the picker column can ensure it is + * centered in the view. + */ + componentDidLoad() { + const parentPickerColumn = this.el.closest('ion-picker-column'); + if (parentPickerColumn !== null && this.value === parentPickerColumn.value) { + parentPickerColumn.scrollActiveItemIntoView(); + } + } + /** * When an option is clicked update the * parent picker column value. This From 2c773ed0e6f82fb24c4940e78469caf60c908a07 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 1 Dec 2023 15:29:40 -0500 Subject: [PATCH 09/53] fix: do not emit ionChange if value did not change --- .../picker-column/picker-column.tsx | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/core/src/components/picker-column/picker-column.tsx b/core/src/components/picker-column/picker-column.tsx index 0cfafe0224e..7b6c4910533 100644 --- a/core/src/components/picker-column/picker-column.tsx +++ b/core/src/components/picker-column/picker-column.tsx @@ -134,22 +134,18 @@ export class PickerColumn implements ComponentInterface { componentDidRender() { const { el, activeItem, isColumnVisible, value } = this; - if (isColumnVisible) { - if (activeItem) { - this.scrollActiveItemIntoView(); - } else { - const firstOption = el.querySelector('ion-picker-column-option'); + if (isColumnVisible && !activeItem) { + const firstOption = el.querySelector('ion-picker-column-option'); - /** - * If the picker column does not have an active item and the current value - * does not match the first item in the picker column, that means - * the value is out of bounds. In this case, we assign the value to the - * first item to match the scroll position of the column. - * - */ - if (firstOption !== null && firstOption.value !== value) { - this.setValue(firstOption.value); - } + /** + * If the picker column does not have an active item and the current value + * does not match the first item in the picker column, that means + * the value is out of bounds. In this case, we assign the value to the + * first item to match the scroll position of the column. + * + */ + if (firstOption !== null && firstOption.value !== value) { + this.setValue(firstOption.value); } } } @@ -173,6 +169,8 @@ export class PickerColumn implements ComponentInterface { */ @Method() async setValue(value?: string | number) { + if (this.value === value) { return; } + this.value = value; this.ionChange.emit(value); } From 3470c64e51df1a288bcd7a5aacc6aeef8a647b6a Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 1 Dec 2023 15:42:29 -0500 Subject: [PATCH 10/53] build and lint --- core/src/components/picker-column/picker-column.tsx | 4 +++- packages/angular/src/directives/proxies.ts | 4 +--- packages/angular/standalone/src/directives/proxies.ts | 4 +--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/core/src/components/picker-column/picker-column.tsx b/core/src/components/picker-column/picker-column.tsx index 7b6c4910533..4c31b5bc4ee 100644 --- a/core/src/components/picker-column/picker-column.tsx +++ b/core/src/components/picker-column/picker-column.tsx @@ -169,7 +169,9 @@ export class PickerColumn implements ComponentInterface { */ @Method() async setValue(value?: string | number) { - if (this.value === value) { return; } + if (this.value === value) { + return; + } this.value = value; this.ionChange.emit(value); diff --git a/packages/angular/src/directives/proxies.ts b/packages/angular/src/directives/proxies.ts index fd5b4c9426b..1ed4f72c9ec 100644 --- a/packages/angular/src/directives/proxies.ts +++ b/packages/angular/src/directives/proxies.ts @@ -1465,13 +1465,11 @@ export class IonPickerColumn { } -import type { PickerColumnItem as IIonPickerColumnPickerColumnItem } from '@ionic/core'; - export declare interface IonPickerColumn extends Components.IonPickerColumn { /** * Emitted when the value has changed. */ - ionChange: EventEmitter>; + ionChange: EventEmitter>; } diff --git a/packages/angular/standalone/src/directives/proxies.ts b/packages/angular/standalone/src/directives/proxies.ts index 575c9b3f960..2ace14ce82a 100644 --- a/packages/angular/standalone/src/directives/proxies.ts +++ b/packages/angular/standalone/src/directives/proxies.ts @@ -1461,13 +1461,11 @@ export class IonPickerColumn { } -import type { PickerColumnItem as IIonPickerColumnPickerColumnItem } from '@ionic/core/components'; - export declare interface IonPickerColumn extends Components.IonPickerColumn { /** * Emitted when the value has changed. */ - ionChange: EventEmitter>; + ionChange: EventEmitter>; } From 8d5a043a6443da1632e4bbd0c41492b5108f12b6 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 1 Dec 2023 15:42:33 -0500 Subject: [PATCH 11/53] add api --- core/api.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/api.txt b/core/api.txt index d2b8e7863d3..51a44ff3675 100644 --- a/core/api.txt +++ b/core/api.txt @@ -916,7 +916,7 @@ ion-picker-column,prop,disabled,boolean,false,false,false ion-picker-column,prop,items,PickerColumnItem[],[],false,false ion-picker-column,prop,mode,"ios" | "md",undefined,false,false ion-picker-column,prop,value,number | string | undefined,undefined,false,false -ion-picker-column,event,ionChange,PickerColumnItem,true +ion-picker-column,event,ionChange,number | string | undefined,true ion-picker-column-option,shadow ion-picker-column-option,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record | undefined,'primary',false,true From 34ec94ffda07b7ae752e3b9f780a84b2a9d7ca4a Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 1 Dec 2023 16:07:56 -0500 Subject: [PATCH 12/53] test: picker-column tests pass --- .../picker-column/test/basic/index.html | 11 +- .../test/basic/picker-column.e2e.ts | 10 +- .../picker-column/test/disabled/index.html | 30 ++-- .../test/disabled/picker-column.e2e.ts | 129 +++++------------- ...r-disabled-ios-ltr-Mobile-Chrome-linux.png | Bin 2670 -> 0 bytes ...-disabled-ios-ltr-Mobile-Firefox-linux.png | Bin 3703 -> 0 bytes ...r-disabled-ios-ltr-Mobile-Safari-linux.png | Bin 2080 -> 0 bytes ...er-disabled-md-ltr-Mobile-Chrome-linux.png | Bin 2572 -> 0 bytes ...r-disabled-md-ltr-Mobile-Firefox-linux.png | Bin 3633 -> 0 bytes ...er-disabled-md-ltr-Mobile-Safari-linux.png | Bin 2021 -> 0 bytes 10 files changed, 65 insertions(+), 115 deletions(-) delete mode 100644 core/src/components/picker-column/test/disabled/picker-column.e2e.ts-snapshots/picker-disabled-ios-ltr-Mobile-Chrome-linux.png delete mode 100644 core/src/components/picker-column/test/disabled/picker-column.e2e.ts-snapshots/picker-disabled-ios-ltr-Mobile-Firefox-linux.png delete mode 100644 core/src/components/picker-column/test/disabled/picker-column.e2e.ts-snapshots/picker-disabled-ios-ltr-Mobile-Safari-linux.png delete mode 100644 core/src/components/picker-column/test/disabled/picker-column.e2e.ts-snapshots/picker-disabled-md-ltr-Mobile-Chrome-linux.png delete mode 100644 core/src/components/picker-column/test/disabled/picker-column.e2e.ts-snapshots/picker-disabled-md-ltr-Mobile-Firefox-linux.png delete mode 100644 core/src/components/picker-column/test/disabled/picker-column.e2e.ts-snapshots/picker-disabled-md-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/picker-column/test/basic/index.html b/core/src/components/picker-column/test/basic/index.html index 5ffad89f8a8..f919ac491cc 100644 --- a/core/src/components/picker-column/test/basic/index.html +++ b/core/src/components/picker-column/test/basic/index.html @@ -57,12 +57,13 @@

Default

const items = Array(24) .fill() - .map((_, i) => ({ - text: `${i}`, - value: i, - })); + .forEach((_, i) => { + const option = document.createElement('ion-picker-column-option'); + option.value = i; + option.textContent = i; - defaultPickerColumn.items = items; + defaultPickerColumn.appendChild(option); + }); diff --git a/core/src/components/picker-column/test/basic/picker-column.e2e.ts b/core/src/components/picker-column/test/basic/picker-column.e2e.ts index a80d1036c83..4692b76a812 100644 --- a/core/src/components/picker-column/test/basic/picker-column.e2e.ts +++ b/core/src/components/picker-column/test/basic/picker-column.e2e.ts @@ -11,7 +11,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => }); test('should render a picker item for each item', async ({ page }) => { - const columns = page.locator('ion-picker-column .picker-item:not(.picker-item-empty)'); + const columns = page.locator('ion-picker-column ion-picker-column-option'); await expect(columns).toHaveCount(24); }); @@ -21,7 +21,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => }); test('should not have an active item when value is not set', async ({ page }) => { - const activeColumn = page.locator('ion-picker-column .picker-item-active'); + const activeColumn = page.locator('ion-picker-column ion-picker-column-option.option-active'); await expect(activeColumn).toHaveCount(0); }); @@ -31,7 +31,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => }); await page.waitForChanges(); - const activeColumn = page.locator('ion-picker-column .picker-item-active'); + const activeColumn = page.locator('ion-picker-column ion-picker-column-option.option-active'); expect(activeColumn).not.toBeNull(); }); @@ -45,9 +45,9 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => }); await page.waitForChanges(); - const activeColumn = page.locator('ion-picker-column .picker-item-active'); + const activeColumn = page.locator('ion-picker-column ion-picker-column-option.option-active'); - expect(await activeColumn?.innerText()).toEqual('23'); + await expect(activeColumn).toHaveJSProperty('value', 23); }); test('should not emit ionChange when the value is modified externally', async ({ page, skip }) => { diff --git a/core/src/components/picker-column/test/disabled/index.html b/core/src/components/picker-column/test/disabled/index.html index 89090228f4e..4aa73434fdf 100644 --- a/core/src/components/picker-column/test/disabled/index.html +++ b/core/src/components/picker-column/test/disabled/index.html @@ -60,24 +60,28 @@

Column disabled

diff --git a/core/src/components/picker-column/test/disabled/picker-column.e2e.ts b/core/src/components/picker-column/test/disabled/picker-column.e2e.ts index a4a93d47d50..51969a15422 100644 --- a/core/src/components/picker-column/test/disabled/picker-column.e2e.ts +++ b/core/src/components/picker-column/test/disabled/picker-column.e2e.ts @@ -1,123 +1,75 @@ import { expect } from '@playwright/test'; import { configs, test } from '@utils/test/playwright'; -/** - * This behavior does not vary across directions. - */ -configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { - test.describe(title('picker-column: disabled rendering'), () => { - test('should not have visual regressions', async ({ page }) => { - await page.setContent( - ` - - - - - - `, - config - ); - - const picker = page.locator('ion-picker'); - await expect(picker).toHaveScreenshot(screenshot(`picker-disabled`)); - }); - }); -}); - /** * This behavior does not vary across modes/directions. */ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => { test.describe(title('picker-column: disabled items'), () => { + // TODO FW-5580 move this to a spec test in picker-column-option test('all picker items should be enabled by default', async ({ page }) => { await page.setContent( ` - + + A + B + C + - - `, config ); - const pickerItems = page.locator('ion-picker-column .picker-item:not(.picker-item-empty, [disabled])'); + const pickerItems = page.locator('ion-picker-column ion-picker-column-option button:not([disabled])'); expect(await pickerItems.count()).toBe(3); }); + // TODO FW-5580 move this to a spec test in picker-column-option test('disabled picker item should not be interactive', async ({ page }) => { await page.setContent( ` - + + A + B + C + - - `, config ); - const disabledItem = page.locator('ion-picker-column .picker-item[disabled]'); + const disabledItem = page.locator('ion-picker-column ion-picker-column-option button').nth(1); await expect(disabledItem).not.toBeEnabled(); }); test('disabled picker item should not be considered active', async ({ page }) => { await page.setContent( ` - + + A + B + C + - - `, config ); - const disabledItem = page.locator('ion-picker-column .picker-item[data-value="b"]'); - await expect(disabledItem).not.toHaveClass(/picker-item-active/); + const disabledItem = page.locator('ion-picker-column-option').nth(1); + await expect(disabledItem).not.toHaveClass(/option-active/); }); test('setting the value to a disabled item should not cause that item to be active', async ({ page }) => { await page.setContent( ` - + + A + B + C + - - `, config ); @@ -127,33 +79,25 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => await page.waitForChanges(); - const disabledItem = page.locator('ion-picker-column .picker-item[data-value="b"]'); - await expect(disabledItem).toBeDisabled(); - await expect(disabledItem).not.toHaveClass(/picker-item-active/); + const disabledItem = page.locator('ion-picker-column ion-picker-column-option').nth(1); + await expect(disabledItem).not.toHaveClass(/option-active/); }); test('defaulting the value to a disabled item should not cause that item to be active', async ({ page }) => { await page.setContent( ` - + + A + B + C + - - `, config ); - const disabledItem = page.locator('ion-picker-column .picker-item[data-value="b"]'); - await expect(disabledItem).toBeDisabled(); - await expect(disabledItem).not.toHaveClass(/picker-item-active/); + const disabledItem = page.locator('ion-picker-column ion-picker-column-option').nth(1); + await expect(disabledItem).not.toHaveClass(/option-active/); }); }); }); @@ -179,8 +123,9 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { /** * This behavior does not vary across modes/directions. */ +// TODO FW-5580 fix this configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => { - test.describe(title('picker-column: disabled column'), () => { + test.describe.skip(title('picker-column: disabled column'), () => { test.beforeEach(async ({ page }) => { await page.goto('/src/components/picker-column/test/disabled', config); }); diff --git a/core/src/components/picker-column/test/disabled/picker-column.e2e.ts-snapshots/picker-disabled-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/picker-column/test/disabled/picker-column.e2e.ts-snapshots/picker-disabled-ios-ltr-Mobile-Chrome-linux.png deleted file mode 100644 index a18e0d73a00b1b2a144e792d11532e78b789e904..0000000000000000000000000000000000000000 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EV>?&S;ROW``TCTw9D<&rdYkxuqTQ~F{)K2qR8!5k>^%ZarhbQd$c=GRA z{@U|fuSibblo}~JRpnN41s#wc7YydmK{6iUcy>L~%ZBXGa1q2ep NxO=-5e|zTge*iJSD_H;l diff --git a/core/src/components/picker-column/test/disabled/picker-column.e2e.ts-snapshots/picker-disabled-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/picker-column/test/disabled/picker-column.e2e.ts-snapshots/picker-disabled-ios-ltr-Mobile-Firefox-linux.png deleted file mode 100644 index 2e375ce1e6fd12f4cdd9a9918ac088e8fbcd8400..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3703 zcmeHK`#;nBAD=ZDr8f5xHk{INDsqpbSm0{A zF41z^VU-A#G&I+Y%8;-7ZNBe)fBF6o=W%}7`}KIdUwggZuh;wee7;^EmJ125th8GR z0)Z%>AmC0xAaX2Vx5BrAUmdOv9|GB7e*)*=9!H)UsLS^5(NXvoFmttGr<=>U6edg^ zsjggn9qP(pY*pOv0(0$CrV@@Jj~#*OsJOsVB8YP88r6bzeg-6x;8(?SURW~|1I`$fR^J5auYa&$ovLOq3 zJv}|+1%l>gtl2eYa@J;8NXQ>HQ|ArXKVt~zryKk4oF#vnKP7sr#wmzDTbOj?KuU`v zs*1*L6(v5&%goFi$41Y%yJeTew(U4hrH3E~`>A z{bOQoY0#^oSpBd`bzPyZK72JSJw5$i{^zu@%}eDpc5qmz`Uhv!bnuOCC)2amSN=2R zqnF)>6RoJ3v7R!+4A`#VPLgK@+Vs-W(sB3hFWsD2brzf1?MijhC*k|x=hYA@yXv^( z<2KBv9TpU1?NCqDJ|_l_alA0HKdgrSE9Rp-1NYJP&qg2lQ7>HKPd60C_wL=h=zhbt zXq3c>BR3Z(?|7I2ZWtiEDcr-k%_TSVduI$zf((uBJz#dd_@Q_x=w{XTO{IX>rJ1KS z28g=uJNu96>o)>f&wC0$+J>LEKKIG;a1?>@9tGOx@c1@W$! zmX;s9@AO`p)K-~oRy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|oQEP9v@*S!Z1`$+(>j3<&ruEd8VP?#`mzS3ts~A&LQL7JNFF-`E&?7|j2tL6$W63WJJxb4)~9%BEZQ#mM>DgV?|ypA z108T$%Hi5mR85J@Qfqz4biKMI2@gPH;aF8wrLjg#tR6c+CX7ubuC{$T$br*upT=PX zUrGiSSa9axg@@OB5JD+dEKC^KuU( lV15O+{5R-7x2Bt09;&v^AG<$(8GKMeP8=uUxLCiG{{jX+1(W~) diff --git a/core/src/components/picker-column/test/disabled/picker-column.e2e.ts-snapshots/picker-disabled-ios-ltr-Mobile-Safari-linux.png b/core/src/components/picker-column/test/disabled/picker-column.e2e.ts-snapshots/picker-disabled-ios-ltr-Mobile-Safari-linux.png deleted file mode 100644 index d0ee7f1a142e8e16b632af9d8af71f01c6c54316..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2080 zcmdUw|5ws!7ROOHnJGFrV}?pfNND9crfixbAR4%ze&78A=6TL}-p_f?JWc-N;)We#e#%g~mUq)4oZp z#n(;$hncDr=}<+kM|7TuS90LfPa>hB@ZYtpu$+2$5fl|elS-~kQA^X3#0O)Ow`5Lt zQ;6`=dH%J`7xeg^d+j-kqQp>CO&kww4RHR1-i!mGHndEnqxPSM25#k2NGeuk%FJ>Q zL8+!o7E52y;n$~gdXeth?HDCSp_edfgk)0!eLwgn!N~s^0FUjM$n=1KuTN?uEXo|a zPM84!mTk0ewjYLEMa}WB%beQ-dq7mbVSZ5Gxp8W9vJ`bi-8CG}qL@f+%&AVcD$%k< zc<}%d`6cM^tNfgMnRV`@EPkAh^&842+-dCvN-wPwHD?1K>gfN>s7`Fpgg@)39B>w^ z8yT95A!8I~3K{EGW~^dmc|iltmIemSb6T&pcKq$7gBR#=LL-60Bq&4VR=F}CwyEy#}?FIpbl7>){=#7Ty{ClS1F-F|F9gv%X(^ zH=nBz*z~-vNI7_u?!Woe37DT~5=cd);GJ0ov+Rp+28@ssT2_e>EY7>M9AZ)8?{Z@C zE&D-&@F3BO`T#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3 ztTuhGoGNq8y{|HQOR2PcAh8;7%sse??JeEJ#>s-8ryz@W&si)&Z`JeXDC&y#G9;sS zc=#wM3GTi-XHpH{^Px_50#dt?p7?kGy7Z~xN8VD%&D?3Tj|*2VdYymuu8xxUz0ke$ z^7002Fxe(eJc&ftJ$w81?a&ahh3Mw)?(?bCWgwV2(p~H=)#SbFXS3Otn$a$0n`4@f z#Zu-!q!(#*!^+e?lR8_w=tCQgsy0DaSC=CBPIL1OR=GQd`ugvi*OUiv%x=!h&U_k$ zLP<*Et5auZW*p#f1csWGm34n2p2db*$c}J3I|kBY4e8WEe= From e9338337636ea9dd0b10e0aed09a1a567aeccb48 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 1 Dec 2023 16:19:11 -0500 Subject: [PATCH 13/53] test: picker tests pass --- .../components/picker/test/a11y/index.html | 23 ++++------ .../components/picker/test/basic/index.html | 15 +++++-- .../picker/test/basic/picker.e2e.ts | 43 ++++++++----------- .../picker/test/keyboard-entry/picker.e2e.ts | 3 +- 4 files changed, 41 insertions(+), 43 deletions(-) diff --git a/core/src/components/picker/test/a11y/index.html b/core/src/components/picker/test/a11y/index.html index 087a6f7132b..ad27eebe1d9 100644 --- a/core/src/components/picker/test/a11y/index.html +++ b/core/src/components/picker/test/a11y/index.html @@ -16,22 +16,17 @@

Picker - a11y

- + + First + Second + Third + Fourth + Fifth + Sixth + Seventh + - - diff --git a/core/src/components/picker/test/basic/index.html b/core/src/components/picker/test/basic/index.html index b313ce0b2bf..cc8bfb95486 100644 --- a/core/src/components/picker/test/basic/index.html +++ b/core/src/components/picker/test/basic/index.html @@ -111,10 +111,19 @@

Modal

console.log('Column change', ev.detail); }); const setPickerColumn = (selector, items, value) => { - const picker = document.querySelector(selector); + const column = document.querySelector(selector); - picker.items = items; - picker.value = value; + items.forEach((item) => { + const option = document.createElement('ion-picker-column-option'); + option.value = item.value; + option.textContent = item.text; + + option.setAttribute('data-test-value', item.value); + + column.appendChild(option); + }); + + column.value = value; }; const modal = document.querySelector('ion-modal'); diff --git a/core/src/components/picker/test/basic/picker.e2e.ts b/core/src/components/picker/test/basic/picker.e2e.ts index e464a48bed7..f2d12e9f2c3 100644 --- a/core/src/components/picker/test/basic/picker.e2e.ts +++ b/core/src/components/picker/test/basic/picker.e2e.ts @@ -9,11 +9,11 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { test('inline pickers should not have visual regression', async ({ page }) => { await page.goto(`/src/components/picker/test/basic`, config); - const fullStack = page.locator('#inline button[data-value="full-stack"]'); - const onion = page.locator('#inline button[data-value="onion"]'); + const fullStack = page.locator('#inline ion-picker-column-option[data-test-value="full-stack"]'); + const onion = page.locator('#inline ion-picker-column-option[data-test-value="onion"]'); - await expect(fullStack).toHaveClass(/picker-item-active/); - await expect(onion).toHaveClass(/picker-item-active/); + await expect(fullStack).toHaveClass(/option-active/); + await expect(onion).toHaveClass(/option-active/); await page.waitForChanges(); @@ -85,28 +85,21 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => await page.setContent( ` - - + + Minified + Responsive + Full Stack + Mobile First + Serverless + + + Tomato + Avocado + Onion + Potato + Artichoke + - - `, config ); diff --git a/core/src/components/picker/test/keyboard-entry/picker.e2e.ts b/core/src/components/picker/test/keyboard-entry/picker.e2e.ts index ae2210e0c05..ac087eef431 100644 --- a/core/src/components/picker/test/keyboard-entry/picker.e2e.ts +++ b/core/src/components/picker/test/keyboard-entry/picker.e2e.ts @@ -5,8 +5,9 @@ import type { E2ELocator } from '@utils/test/playwright/page/utils/locator'; /** * This behavior does not vary across modes/directions. */ +// TODO FW-5580 fix this functionality configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => { - test.describe(title('picker: keyboard entry'), () => { + test.describe.skip(title('picker: keyboard entry'), () => { test('should scroll to and update the value prop for a single column', async ({ page }) => { await page.setContent( ` From fc36cc50ca8b1b7b1b90853d03011a8ba5761113 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 1 Dec 2023 16:35:16 -0500 Subject: [PATCH 14/53] add TODOs --- .../components/picker-column/picker-column-interfaces.ts | 1 + core/src/components/picker-column/picker-column.md.scss | 1 + core/src/components/picker-column/picker-column.scss | 6 ++++++ core/src/components/picker-column/picker-column.tsx | 2 ++ 4 files changed, 10 insertions(+) diff --git a/core/src/components/picker-column/picker-column-interfaces.ts b/core/src/components/picker-column/picker-column-interfaces.ts index e6f811502b1..a37d9b97f6e 100644 --- a/core/src/components/picker-column/picker-column-interfaces.ts +++ b/core/src/components/picker-column/picker-column-interfaces.ts @@ -1,3 +1,4 @@ +// TODO FW-5580 remove this export interface PickerColumnItem { text: string; value: string | number; diff --git a/core/src/components/picker-column/picker-column.md.scss b/core/src/components/picker-column/picker-column.md.scss index 2247139a83f..1dcd05efee9 100644 --- a/core/src/components/picker-column/picker-column.md.scss +++ b/core/src/components/picker-column/picker-column.md.scss @@ -1,6 +1,7 @@ @import "./picker-column.scss"; @import "../../themes/ionic.globals.md"; +// TODO FW-5580 remove this :host .picker-item-active { color: current-color(base); } diff --git a/core/src/components/picker-column/picker-column.scss b/core/src/components/picker-column/picker-column.scss index b30cc70825f..45953071c46 100644 --- a/core/src/components/picker-column/picker-column.scss +++ b/core/src/components/picker-column/picker-column.scss @@ -44,6 +44,7 @@ scroll-snap-align: none; } +// TODO FW-5580 remove this :host .picker-item { @include padding(0); @include margin(0); @@ -81,11 +82,14 @@ scroll-snap-align: center; } +// TODO FW-5580 remove this. +// Figure out if we still need the .picker-item-empty selector :host .picker-item-empty, :host .picker-item[disabled] { cursor: default; } +// TODO FW-5580 remove this :host .picker-item-empty, :host(:not([disabled])) .picker-item[disabled] { scroll-snap-align: none; @@ -95,10 +99,12 @@ overflow-y: hidden; } +// TODO FW-5580 remove this :host .picker-item[disabled] { opacity: 0.4; } +// TODO FW-5580 remove this :host(.picker-column-active) .picker-item.picker-item-active { color: current-color(base); } diff --git a/core/src/components/picker-column/picker-column.tsx b/core/src/components/picker-column/picker-column.tsx index 4c31b5bc4ee..0c44a4abe8f 100644 --- a/core/src/components/picker-column/picker-column.tsx +++ b/core/src/components/picker-column/picker-column.tsx @@ -14,6 +14,8 @@ import type { PickerColumnItem } from './picker-column-interfaces'; /** * @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use. */ +// TODO FW-5580 we can likely go back to a single stylesheet here +// the per-mode styles were moved to ion-picker-column-option @Component({ tag: 'ion-picker-column', styleUrls: { From 58a89b329e3e790e3d979d7c1c33ffe7fe78849d Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 1 Dec 2023 16:39:59 -0500 Subject: [PATCH 15/53] fix disabled test --- core/src/components/picker-column/test/disabled/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/components/picker-column/test/disabled/index.html b/core/src/components/picker-column/test/disabled/index.html index 4aa73434fdf..92d2eec8978 100644 --- a/core/src/components/picker-column/test/disabled/index.html +++ b/core/src/components/picker-column/test/disabled/index.html @@ -53,7 +53,7 @@

Even items disabled

Column disabled

- +
@@ -82,6 +82,7 @@

Column disabled

fullDisabledPicker.appendChild(option); }); + fullDisabledPicker.value = 11; From 948c8d85a53d985fca99fceb8d28ab0f1b39790a Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 1 Dec 2023 16:44:22 -0500 Subject: [PATCH 16/53] refactor: cache picker column el --- .../picker-column-option.tsx | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/core/src/components/picker-column-option/picker-column-option.tsx b/core/src/components/picker-column-option/picker-column-option.tsx index 8182ba6ee1f..35f2c959dfe 100644 --- a/core/src/components/picker-column-option/picker-column-option.tsx +++ b/core/src/components/picker-column-option/picker-column-option.tsx @@ -15,6 +15,13 @@ import type { Color } from '../../interface'; shadow: true, }) export class PickerColumnOption implements ComponentInterface { + /** + * We keep track of the parent picker column + * so we can update the value of it when + * clicking an enable option. + */ + private pickerColumn: HTMLIonPickerColumnElement | null = null; + @Element() el!: HTMLElement; /** @@ -64,6 +71,14 @@ export class PickerColumnOption implements ComponentInterface { this.ariaLabel = inheritedAttributes['aria-label'] || null; } + connectedCallback() { + this.pickerColumn = this.el.closest('ion-picker-column'); + } + + disconnectedCallback() { + this.pickerColumn = null; + } + /** * The column options can load at any time * so the selected option needs to tell the @@ -72,9 +87,9 @@ export class PickerColumnOption implements ComponentInterface { * centered in the view. */ componentDidLoad() { - const parentPickerColumn = this.el.closest('ion-picker-column'); - if (parentPickerColumn !== null && this.value === parentPickerColumn.value) { - parentPickerColumn.scrollActiveItemIntoView(); + const { pickerColumn } = this; + if (pickerColumn !== null && this.value === pickerColumn.value) { + pickerColumn.scrollActiveItemIntoView(); } } @@ -85,9 +100,9 @@ export class PickerColumnOption implements ComponentInterface { * in the column view. */ onClick() { - const parentPickerColumn = this.el.closest('ion-picker-column'); - if (parentPickerColumn !== null) { - parentPickerColumn.setValue(this.value); + const { pickerColumn } = this; + if (pickerColumn !== null) { + pickerColumn.setValue(this.value); } } From 7473d64a4e10844233972a20a73cf74b7ce1b4bb Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 1 Dec 2023 16:44:26 -0500 Subject: [PATCH 17/53] lint --- core/src/components/picker-column/test/disabled/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/components/picker-column/test/disabled/index.html b/core/src/components/picker-column/test/disabled/index.html index 92d2eec8978..db3f0638734 100644 --- a/core/src/components/picker-column/test/disabled/index.html +++ b/core/src/components/picker-column/test/disabled/index.html @@ -82,7 +82,7 @@

Column disabled

fullDisabledPicker.appendChild(option); }); - fullDisabledPicker.value = 11; + fullDisabledPicker.value = 11; From 313285d2b88e07681131c5779f1f5f9c62f124d0 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 1 Dec 2023 17:15:50 -0500 Subject: [PATCH 18/53] skip test --- .../picker-column/test/disabled/picker-column.e2e.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/components/picker-column/test/disabled/picker-column.e2e.ts b/core/src/components/picker-column/test/disabled/picker-column.e2e.ts index 51969a15422..c2ecc75a1c0 100644 --- a/core/src/components/picker-column/test/disabled/picker-column.e2e.ts +++ b/core/src/components/picker-column/test/disabled/picker-column.e2e.ts @@ -105,8 +105,9 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => /** * This behavior does not vary across directions. */ +// TODO FW-5580 fix this configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { - test.describe(title('picker-column: disabled column rendering'), () => { + test.describe.skip(title('picker-column: disabled column rendering'), () => { test.beforeEach(async ({ page }) => { await page.goto('/src/components/picker-column/test/disabled', config); }); From 5a9a7d1adbe9e80dc982709421ef3e1174e7418e Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 09:53:07 -0500 Subject: [PATCH 19/53] refactor: integrate datetime with picker-column-option --- core/src/components/datetime/datetime.tsx | 49 +++++++++++++------ .../datetime/test/minmax/datetime.e2e.ts | 10 ++-- .../datetime/test/values/datetime.e2e.ts | 35 +++++++------ 3 files changed, 60 insertions(+), 34 deletions(-) diff --git a/core/src/components/datetime/datetime.tsx b/core/src/components/datetime/datetime.tsx index e7752a22a8f..44e1c6c2a7f 100644 --- a/core/src/components/datetime/datetime.tsx +++ b/core/src/components/datetime/datetime.tsx @@ -1617,7 +1617,6 @@ export class Datetime implements ComponentInterface { class="date-column" color={this.color} disabled={disabled} - items={items} value={todayString} onIonChange={(ev: CustomEvent) => { // TODO(FW-1823) Remove this when iOS 14 support is dropped. @@ -1647,7 +1646,11 @@ export class Datetime implements ComponentInterface { ev.stopPropagation(); }} - > + > + {items.map((item: PickerColumnItem) => ( + {item.text} + ))} + ); } @@ -1737,7 +1740,6 @@ export class Datetime implements ComponentInterface { class="day-column" color={this.color} disabled={disabled} - items={days} value={(workingParts.day !== null ? workingParts.day : this.defaultParts.day) ?? undefined} onIonChange={(ev: CustomEvent) => { // TODO(FW-1823) Remove this when iOS 14 support is dropped. @@ -1764,7 +1766,11 @@ export class Datetime implements ComponentInterface { ev.stopPropagation(); }} - > + > + {days.map((day: PickerColumnItem) => ( + {day.text} + ))} + ); } @@ -1782,7 +1788,6 @@ export class Datetime implements ComponentInterface { class="month-column" color={this.color} disabled={disabled} - items={months} value={workingParts.month} onIonChange={(ev: CustomEvent) => { // TODO(FW-1823) Remove this when iOS 14 support is dropped. @@ -1809,7 +1814,11 @@ export class Datetime implements ComponentInterface { ev.stopPropagation(); }} - > + > + {months.map((month: PickerColumnItem) => ( + {month.text} + ))} + ); } private renderYearPickerColumn(years: PickerColumnItem[]) { @@ -1826,7 +1835,6 @@ export class Datetime implements ComponentInterface { class="year-column" color={this.color} disabled={disabled} - items={years} value={workingParts.year} onIonChange={(ev: CustomEvent) => { // TODO(FW-1823) Remove this when iOS 14 support is dropped. @@ -1853,7 +1861,11 @@ export class Datetime implements ComponentInterface { ev.stopPropagation(); }} - > + > + {years.map((year: PickerColumnItem) => ( + {year.text} + ))} + ); } private renderTimePickerColumns(forcePresentation: string) { @@ -1901,7 +1913,6 @@ export class Datetime implements ComponentInterface { color={this.color} disabled={disabled} value={activePart.hour} - items={hoursData} numericInput onIonChange={(ev: CustomEvent) => { this.setWorkingParts({ @@ -1916,7 +1927,11 @@ export class Datetime implements ComponentInterface { ev.stopPropagation(); }} - > + > + {hoursData.map((hour: PickerColumnItem) => ( + {hour.text} + ))} + ); } private renderMinutePickerColumn(minutesData: PickerColumnItem[]) { @@ -1930,7 +1945,6 @@ export class Datetime implements ComponentInterface { color={this.color} disabled={disabled} value={activePart.minute} - items={minutesData} numericInput onIonChange={(ev: CustomEvent) => { this.setWorkingParts({ @@ -1945,7 +1959,11 @@ export class Datetime implements ComponentInterface { ev.stopPropagation(); }} - > + > + {minutesData.map((minute: PickerColumnItem) => ( + {minute.text} + ))} + ); } private renderDayPeriodPickerColumn(dayPeriodData: PickerColumnItem[]) { @@ -1963,7 +1981,6 @@ export class Datetime implements ComponentInterface { color={this.color} disabled={disabled} value={activePart.ampm} - items={dayPeriodData} onIonChange={(ev: CustomEvent) => { const hour = calculateHourFromAMPM(workingParts, ev.detail.value); @@ -1981,7 +1998,11 @@ export class Datetime implements ComponentInterface { ev.stopPropagation(); }} - > + > + {dayPeriodData.map((dayPeriod: PickerColumnItem) => ( + {dayPeriod.text} + ))} + ); } diff --git a/core/src/components/datetime/test/minmax/datetime.e2e.ts b/core/src/components/datetime/test/minmax/datetime.e2e.ts index a4ff72bcd19..b7007f2fe70 100644 --- a/core/src/components/datetime/test/minmax/datetime.e2e.ts +++ b/core/src/components/datetime/test/minmax/datetime.e2e.ts @@ -109,8 +109,8 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => await page.click('.time-body'); await ionPopoverDidPresent.next(); - const hours = page.locator('ion-popover ion-picker-column:nth-child(1) .picker-item:not(.picker-item-empty)'); - const minutes = page.locator('ion-popover ion-picker-column:nth-child(2) .picker-item:not(.picker-item-empty)'); + const hours = page.locator('ion-popover ion-picker-column:nth-child(1) ion-picker-column-option'); + const minutes = page.locator('ion-popover ion-picker-column:nth-child(2) ion-picker-column-option'); expect(await hours.count()).toBe(12); expect(await minutes.count()).toBe(60); @@ -215,7 +215,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => ); const hourPickerItems = page.locator( - 'ion-datetime ion-picker-column:first-of-type .picker-item:not(.picker-item-empty)' + 'ion-datetime ion-picker-column:first-of-type ion-picker-column-option' ); await expect(hourPickerItems).toHaveText(['8', '9', '10', '11']); }); @@ -239,7 +239,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => ); const hourPickerItems = page.locator( - 'ion-datetime ion-picker-column:first-of-type .picker-item:not(.picker-item-empty)' + 'ion-datetime ion-picker-column:first-of-type ion-picker-column-option' ); await expect(hourPickerItems).toHaveText(['12', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11']); }); @@ -356,7 +356,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => await ionPopoverDidPresent.next(); - const hours = page.locator('ion-popover ion-picker-column:nth-child(1) .picker-item:not(.picker-item-empty)'); + const hours = page.locator('ion-popover ion-picker-column:nth-child(1) ion-picker-column-option'); await expect(await hours.count()).toBe(4); }); diff --git a/core/src/components/datetime/test/values/datetime.e2e.ts b/core/src/components/datetime/test/values/datetime.e2e.ts index 4039dc93fed..19b3e8478ca 100644 --- a/core/src/components/datetime/test/values/datetime.e2e.ts +++ b/core/src/components/datetime/test/values/datetime.e2e.ts @@ -29,7 +29,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => config ); - const items = page.locator('.month-column .picker-item:not(.picker-item-empty)'); + const items = page.locator('.month-column ion-picker-column-option'); await expect(items).toHaveText(['May', 'June', 'October']); }); test('should render correct years', async ({ page }) => { @@ -40,7 +40,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => config ); - const items = page.locator('.year-column .picker-item:not(.picker-item-empty)'); + const items = page.locator('.year-column ion-picker-column-option'); await expect(items).toHaveText(['2022', '2021', '2020']); }); test('should render correct hours', async ({ page }) => { @@ -51,7 +51,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => config ); - const items = page.locator('ion-picker-column:first-of-type .picker-item:not(.picker-item-empty)'); + const items = page.locator('ion-picker-column:first-of-type ion-picker-column-option'); await expect(items).toHaveText(['1', '2', '3']); }); test('should render correct minutes', async ({ page }) => { @@ -62,10 +62,10 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => config ); - const items = page.locator('ion-picker-column:nth-of-type(2) .picker-item:not(.picker-item-empty)'); + const items = page.locator('ion-picker-column:nth-of-type(2) ion-picker-column-option'); await expect(items).toHaveText(['01', '02', '03']); }); - test('should adjust default parts for allowed hour and minute values', async ({ page }) => { + test.only('should adjust default parts for allowed hour and minute values', async ({ page }) => { /** * Mock today's date for testing. * Playwright does not support this natively @@ -93,21 +93,26 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => await page.waitForSelector('.datetime-ready'); - const minuteItems = page.locator('ion-picker-column:nth-of-type(2) .picker-item:not(.picker-item-empty)'); - await expect(minuteItems).toHaveText(['00', '15', '30', '45']); - await expect(minuteItems.nth(1)).toHaveClass(/picker-item-active/); + const minuteColumn = page.locator('ion-picker-column').nth(1); + const minuteItems = minuteColumn.locator('ion-picker-column-option'); - const hourItems = page.locator('ion-picker-column:nth-of-type(1) .picker-item:not(.picker-item-empty)'); - await expect(hourItems).toHaveText(['2']); - await expect(hourItems.nth(0)).toHaveClass(/picker-item-active/); + const text = await minuteItems.nth(1).textContent(); + await expect(minuteItems).toHaveText(['00', '15', '30', '45'], { useInnerText: true }); + await expect(minuteColumn).toHaveJSProperty('value', 15); + + const hourColumn = page.locator('ion-picker-column').nth(0); + const hourItems = hourColumn.locator('ion-picker-column-option'); + await expect(hourItems).toHaveText(['2'], { useInnerText: true }); + await expect(hourColumn).toHaveJSProperty('value', 2); /** * Since the allowed hour is 2AM, the time period * should switch from PM to AM. */ - const ampmItems = page.locator('ion-picker-column:nth-of-type(3) .picker-item:not(.picker-item-empty)'); - await expect(ampmItems).toHaveText(['AM', 'PM']); - await expect(ampmItems.nth(0)).toHaveClass(/picker-item-active/); + const ampmColumn = page.locator('ion-picker-column').nth(2); + const ampmItems = ampmColumn.locator('ion-picker-column-option'); + await expect(ampmItems).toHaveText(['AM', 'PM'], { useInnerText: true }); + await expect(ampmColumn).toHaveJSProperty('value', 'am'); }); test('should adjust default parts month for allowed month values', async ({ page }) => { /** @@ -137,7 +142,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => await page.waitForSelector('.datetime-ready'); - const monthItems = page.locator('.month-column .picker-item:not(.picker-item-empty)'); + const monthItems = page.locator('.month-column ion-picker-column-option'); await expect(monthItems).toHaveText(['January']); await expect(monthItems.nth(0)).toHaveClass(/picker-item-active/); }); From 8693fd6cf3ae3ef1570d5f029c4c4e98586eac73 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 10:40:43 -0500 Subject: [PATCH 20/53] refactor: remove default slotted content --- .../components/picker-column-option/picker-column-option.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/components/picker-column-option/picker-column-option.tsx b/core/src/components/picker-column-option/picker-column-option.tsx index 35f2c959dfe..b58e6104ed7 100644 --- a/core/src/components/picker-column-option/picker-column-option.tsx +++ b/core/src/components/picker-column-option/picker-column-option.tsx @@ -118,7 +118,7 @@ export class PickerColumnOption implements ComponentInterface { })} > ); From 84c3c52347ebea382125b6a2d0fa42bf10489c7e Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 10:40:51 -0500 Subject: [PATCH 21/53] fix: datetime passes disabled state correctly --- core/src/components/datetime/datetime.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/core/src/components/datetime/datetime.tsx b/core/src/components/datetime/datetime.tsx index 44e1c6c2a7f..c8ff06ef2f3 100644 --- a/core/src/components/datetime/datetime.tsx +++ b/core/src/components/datetime/datetime.tsx @@ -1612,6 +1612,7 @@ export class Datetime implements ComponentInterface { ? `${workingParts.year}-${workingParts.month}-${workingParts.day}` : `${defaultParts.year}-${defaultParts.month}-${defaultParts.day}`; + console.log('hi there', items) return ( {items.map((item: PickerColumnItem) => ( - {item.text} + {item.text} ))} ); @@ -1768,7 +1769,7 @@ export class Datetime implements ComponentInterface { }} > {days.map((day: PickerColumnItem) => ( - {day.text} + {day.text} ))} ); @@ -1816,7 +1817,7 @@ export class Datetime implements ComponentInterface { }} > {months.map((month: PickerColumnItem) => ( - {month.text} + {month.text} ))} ); @@ -1863,7 +1864,7 @@ export class Datetime implements ComponentInterface { }} > {years.map((year: PickerColumnItem) => ( - {year.text} + {year.text} ))} ); @@ -1929,7 +1930,7 @@ export class Datetime implements ComponentInterface { }} > {hoursData.map((hour: PickerColumnItem) => ( - {hour.text} + {hour.text} ))} ); @@ -1961,7 +1962,7 @@ export class Datetime implements ComponentInterface { }} > {minutesData.map((minute: PickerColumnItem) => ( - {minute.text} + {minute.text} ))} ); @@ -2000,7 +2001,7 @@ export class Datetime implements ComponentInterface { }} > {dayPeriodData.map((dayPeriod: PickerColumnItem) => ( - {dayPeriod.text} + {dayPeriod.text} ))} ); From edb7bade3dd70a8a79dfc179ee0a5f81550ce430 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 10:41:09 -0500 Subject: [PATCH 22/53] typo --- core/src/components/datetime/datetime.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/components/datetime/datetime.tsx b/core/src/components/datetime/datetime.tsx index c8ff06ef2f3..d9884c43032 100644 --- a/core/src/components/datetime/datetime.tsx +++ b/core/src/components/datetime/datetime.tsx @@ -1769,7 +1769,7 @@ export class Datetime implements ComponentInterface { }} > {days.map((day: PickerColumnItem) => ( - {day.text} + {day.text} ))} ); From ed8cfa06fec50a54fb03910d48fc890c0ffd6080 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 10:41:16 -0500 Subject: [PATCH 23/53] chore: remove unused var --- .../components/picker-column-option/picker-column-option.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/components/picker-column-option/picker-column-option.tsx b/core/src/components/picker-column-option/picker-column-option.tsx index b58e6104ed7..f1a0db51a04 100644 --- a/core/src/components/picker-column-option/picker-column-option.tsx +++ b/core/src/components/picker-column-option/picker-column-option.tsx @@ -107,7 +107,7 @@ export class PickerColumnOption implements ComponentInterface { } render() { - const { color, value, disabled, ariaLabel } = this; + const { color, disabled, ariaLabel } = this; const mode = getIonMode(this); return ( From 506f42bec4ee3f04317a5f7bba225751bdaeedf7 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 10:52:01 -0500 Subject: [PATCH 24/53] fix: picker-column emits correct payload --- core/src/components.d.ts | 4 ++-- core/src/components/datetime/datetime.tsx | 10 +++++----- core/src/components/picker-column/picker-column.tsx | 4 ++-- packages/angular/src/directives/proxies.ts | 2 +- packages/angular/standalone/src/directives/proxies.ts | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/src/components.d.ts b/core/src/components.d.ts index b353d1028c0..2104897270f 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -4051,7 +4051,7 @@ declare global { new (): HTMLIonPickerElement; }; interface HTMLIonPickerColumnElementEventMap { - "ionChange": string | number | undefined; + "ionChange": { value: string | number | undefined }; } interface HTMLIonPickerColumnElement extends Components.IonPickerColumn, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLIonPickerColumnElement, ev: IonPickerColumnCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; @@ -6631,7 +6631,7 @@ declare namespace LocalJSX { /** * Emitted when the value has changed. */ - "onIonChange"?: (event: IonPickerColumnCustomEvent) => void; + "onIonChange"?: (event: IonPickerColumnCustomEvent<{ value: string | number | undefined }>) => void; /** * The selected option in the picker. */ diff --git a/core/src/components/datetime/datetime.tsx b/core/src/components/datetime/datetime.tsx index d9884c43032..05b4774359d 100644 --- a/core/src/components/datetime/datetime.tsx +++ b/core/src/components/datetime/datetime.tsx @@ -1817,7 +1817,7 @@ export class Datetime implements ComponentInterface { }} > {months.map((month: PickerColumnItem) => ( - {month.text} + {month.text} ))} ); @@ -1864,7 +1864,7 @@ export class Datetime implements ComponentInterface { }} > {years.map((year: PickerColumnItem) => ( - {year.text} + {year.text} ))} ); @@ -1930,7 +1930,7 @@ export class Datetime implements ComponentInterface { }} > {hoursData.map((hour: PickerColumnItem) => ( - {hour.text} + {hour.text} ))} ); @@ -1962,7 +1962,7 @@ export class Datetime implements ComponentInterface { }} > {minutesData.map((minute: PickerColumnItem) => ( - {minute.text} + {minute.text} ))} ); @@ -2001,7 +2001,7 @@ export class Datetime implements ComponentInterface { }} > {dayPeriodData.map((dayPeriod: PickerColumnItem) => ( - {dayPeriod.text} + {dayPeriod.text} ))} ); diff --git a/core/src/components/picker-column/picker-column.tsx b/core/src/components/picker-column/picker-column.tsx index 0c44a4abe8f..6e0d1f64a97 100644 --- a/core/src/components/picker-column/picker-column.tsx +++ b/core/src/components/picker-column/picker-column.tsx @@ -72,7 +72,7 @@ export class PickerColumn implements ComponentInterface { /** * Emitted when the value has changed. */ - @Event() ionChange!: EventEmitter; + @Event() ionChange!: EventEmitter<{ value: string | number | undefined }>; @Watch('value') valueChange() { @@ -176,7 +176,7 @@ export class PickerColumn implements ComponentInterface { } this.value = value; - this.ionChange.emit(value); + this.ionChange.emit({ value }); } private centerPickerItemInView = (target: HTMLElement, smooth = true, canExitInputMode = true) => { diff --git a/packages/angular/src/directives/proxies.ts b/packages/angular/src/directives/proxies.ts index 1ed4f72c9ec..e91d49f1fb1 100644 --- a/packages/angular/src/directives/proxies.ts +++ b/packages/angular/src/directives/proxies.ts @@ -1469,7 +1469,7 @@ export declare interface IonPickerColumn extends Components.IonPickerColumn { /** * Emitted when the value has changed. */ - ionChange: EventEmitter>; + ionChange: EventEmitter>; } diff --git a/packages/angular/standalone/src/directives/proxies.ts b/packages/angular/standalone/src/directives/proxies.ts index 2ace14ce82a..e59dbc331b9 100644 --- a/packages/angular/standalone/src/directives/proxies.ts +++ b/packages/angular/standalone/src/directives/proxies.ts @@ -1465,7 +1465,7 @@ export declare interface IonPickerColumn extends Components.IonPickerColumn { /** * Emitted when the value has changed. */ - ionChange: EventEmitter>; + ionChange: EventEmitter>; } From 892a269d181e504c66d1c97f61279d23e7ab4867 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 11:03:57 -0500 Subject: [PATCH 25/53] test: migrate some datetime tests --- .../components/datetime/test/readonly/datetime.e2e.ts | 4 ++-- .../components/datetime/test/values/datetime.e2e.ts | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/core/src/components/datetime/test/readonly/datetime.e2e.ts b/core/src/components/datetime/test/readonly/datetime.e2e.ts index 1a1c3c85531..ea47e7ded88 100644 --- a/core/src/components/datetime/test/readonly/datetime.e2e.ts +++ b/core/src/components/datetime/test/readonly/datetime.e2e.ts @@ -49,7 +49,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree await calendarMonthYear.click(); await page.waitForChanges(); - await page.locator('.month-column .picker-item[data-value="3"]').click(); + await page.locator('.month-column ion-picker-column-option').nth(2).click(); await page.waitForChanges(); await expect(calendarMonthYear).toHaveText('March 2022'); @@ -78,7 +78,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree await page.keyboard.press('Enter'); await page.waitForChanges(); - const marchPickerItem = page.locator('.month-column .picker-item[data-value="3"]'); + const marchPickerItem = page.locator('.month-column ion-picker-column-option').nth(2); await expect(marchPickerItem).toBeVisible(); }); diff --git a/core/src/components/datetime/test/values/datetime.e2e.ts b/core/src/components/datetime/test/values/datetime.e2e.ts index 19b3e8478ca..23a9e4a382b 100644 --- a/core/src/components/datetime/test/values/datetime.e2e.ts +++ b/core/src/components/datetime/test/values/datetime.e2e.ts @@ -65,7 +65,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => const items = page.locator('ion-picker-column:nth-of-type(2) ion-picker-column-option'); await expect(items).toHaveText(['01', '02', '03']); }); - test.only('should adjust default parts for allowed hour and minute values', async ({ page }) => { + test('should adjust default parts for allowed hour and minute values', async ({ page }) => { /** * Mock today's date for testing. * Playwright does not support this natively @@ -96,13 +96,12 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => const minuteColumn = page.locator('ion-picker-column').nth(1); const minuteItems = minuteColumn.locator('ion-picker-column-option'); - const text = await minuteItems.nth(1).textContent(); - await expect(minuteItems).toHaveText(['00', '15', '30', '45'], { useInnerText: true }); + await expect(minuteItems).toHaveText(['00', '15', '30', '45']); await expect(minuteColumn).toHaveJSProperty('value', 15); const hourColumn = page.locator('ion-picker-column').nth(0); const hourItems = hourColumn.locator('ion-picker-column-option'); - await expect(hourItems).toHaveText(['2'], { useInnerText: true }); + await expect(hourItems).toHaveText(['2']); await expect(hourColumn).toHaveJSProperty('value', 2); /** @@ -111,7 +110,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => */ const ampmColumn = page.locator('ion-picker-column').nth(2); const ampmItems = ampmColumn.locator('ion-picker-column-option'); - await expect(ampmItems).toHaveText(['AM', 'PM'], { useInnerText: true }); + await expect(ampmItems).toHaveText(['AM', 'PM']); await expect(ampmColumn).toHaveJSProperty('value', 'am'); }); test('should adjust default parts month for allowed month values', async ({ page }) => { @@ -144,7 +143,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => const monthItems = page.locator('.month-column ion-picker-column-option'); await expect(monthItems).toHaveText(['January']); - await expect(monthItems.nth(0)).toHaveClass(/picker-item-active/); + await expect(monthItems.nth(0)).toHaveClass(/option-active/); }); test('today date highlight should persist even if disallowed from dayValues', async ({ page }) => { /** From dc93b8ab1501e7b55875644591ae209e03a4bf21 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 11:05:04 -0500 Subject: [PATCH 26/53] test: migrate locale datetime tests --- core/src/components/datetime/test/locale/datetime.e2e.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/src/components/datetime/test/locale/datetime.e2e.ts b/core/src/components/datetime/test/locale/datetime.e2e.ts index fba13a4137c..7c64ba63738 100644 --- a/core/src/components/datetime/test/locale/datetime.e2e.ts +++ b/core/src/components/datetime/test/locale/datetime.e2e.ts @@ -22,7 +22,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { await datetimeFixture.expectLocalizedDatePicker(screenshot); }); - test('month/year picker should not have visual regressions', async () => { + test.only('month/year picker should not have visual regressions', async () => { await datetimeFixture.goto(config, 'en-US', 'month-year'); await datetimeFixture.expectLocalizedMonthYearPicker(screenshot); }); @@ -107,14 +107,13 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => test('should correctly localize year column data', async ({ page }) => { await page.setContent( ` - + `, config ); await page.waitForSelector('.datetime-ready'); - const datetimeYear = page.locator('ion-datetime .year-column .picker-item[data-value="2022"]'); - + const datetimeYear = page.locator('ion-datetime .year-column ion-picker-column-option').nth(0); await expect(datetimeYear).toHaveText('٢٠٢٢'); }); }); From 656ac5bb0103664bc618235cc0de2a5e2caefb00 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 11:09:25 -0500 Subject: [PATCH 27/53] test: migrate minmax datetime test --- core/src/components/datetime/test/minmax/datetime.e2e.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/components/datetime/test/minmax/datetime.e2e.ts b/core/src/components/datetime/test/minmax/datetime.e2e.ts index b7007f2fe70..7f7819a5132 100644 --- a/core/src/components/datetime/test/minmax/datetime.e2e.ts +++ b/core/src/components/datetime/test/minmax/datetime.e2e.ts @@ -304,7 +304,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => ); const datetime = page.locator('ion-datetime'); - const monthColumnItems = page.locator('ion-datetime .month-column .picker-item:not(.picker-item-empty)'); + const monthColumnItems = page.locator('ion-datetime .month-column ion-picker-column-option'); const ionChange = await page.spyOnEvent('ionChange'); await page.waitForSelector('.datetime-ready'); From cab56466a2d6420e8cf7eda789b56eadf613a9c9 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 11:19:24 -0500 Subject: [PATCH 28/53] fix: datetime use keys for stable identity --- core/src/components/datetime/datetime.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/components/datetime/datetime.tsx b/core/src/components/datetime/datetime.tsx index 05b4774359d..599becbec49 100644 --- a/core/src/components/datetime/datetime.tsx +++ b/core/src/components/datetime/datetime.tsx @@ -1649,7 +1649,7 @@ export class Datetime implements ComponentInterface { }} > {items.map((item: PickerColumnItem) => ( - {item.text} + {item.text} ))} ); @@ -1769,7 +1769,7 @@ export class Datetime implements ComponentInterface { }} > {days.map((day: PickerColumnItem) => ( - {day.text} + {day.text} ))} ); @@ -1817,7 +1817,7 @@ export class Datetime implements ComponentInterface { }} > {months.map((month: PickerColumnItem) => ( - {month.text} + {month.text} ))} ); @@ -1864,7 +1864,7 @@ export class Datetime implements ComponentInterface { }} > {years.map((year: PickerColumnItem) => ( - {year.text} + {year.text} ))} ); @@ -1930,7 +1930,7 @@ export class Datetime implements ComponentInterface { }} > {hoursData.map((hour: PickerColumnItem) => ( - {hour.text} + {hour.text} ))} ); @@ -1962,7 +1962,7 @@ export class Datetime implements ComponentInterface { }} > {minutesData.map((minute: PickerColumnItem) => ( - {minute.text} + {minute.text} ))} ); @@ -2001,7 +2001,7 @@ export class Datetime implements ComponentInterface { }} > {dayPeriodData.map((dayPeriod: PickerColumnItem) => ( - {dayPeriod.text} + {dayPeriod.text} ))} ); From 59113bb4cd3ab35d96ecd072f5cef5701eb22012 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 13:24:32 -0500 Subject: [PATCH 29/53] test: migrate prefer-wheel tests --- .../test/prefer-wheel/datetime.e2e.ts | 76 +++++++++---------- 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/core/src/components/datetime/test/prefer-wheel/datetime.e2e.ts b/core/src/components/datetime/test/prefer-wheel/datetime.e2e.ts index 79ad3c64a6a..712840a3827 100644 --- a/core/src/components/datetime/test/prefer-wheel/datetime.e2e.ts +++ b/core/src/components/datetime/test/prefer-wheel/datetime.e2e.ts @@ -82,7 +82,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); - const dayValues = page.locator('ion-datetime .day-column .picker-item[data-value]'); + const dayValues = page.locator('ion-datetime .day-column ion-picker-column-option'); expect(await dayValues.count()).toEqual(27); }); test('should respect the max bounds', async ({ page }) => { @@ -95,7 +95,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); - const dayValues = page.locator('ion-datetime .day-column .picker-item[data-value]'); + const dayValues = page.locator('ion-datetime .day-column ion-picker-column-option'); expect(await dayValues.count()).toEqual(1); }); test('should respect isDateEnabled preference', async ({ page }) => { @@ -118,9 +118,9 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); - const disabledMonths = page.locator('.month-column .picker-item[disabled]'); - const disabledYears = page.locator('.year-column .picker-item[disabled]'); - const disabledDays = page.locator('.day-column .picker-item[disabled]'); + const disabledMonths = page.locator('.month-column ion-picker-column-option.option-disabled'); + const disabledYears = page.locator('.year-column ion-picker-column-option.option-disabled'); + const disabledDays = page.locator('.day-column ion-picker-column-option.option-disabled'); expect(await disabledMonths.count()).toBe(0); expect(await disabledYears.count()).toBe(0); @@ -143,9 +143,9 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); - const monthValues = page.locator('.month-column .picker-item:not(.picker-item-empty)'); - const yearValues = page.locator('.year-column .picker-item:not(.picker-item-empty)'); - const dayValues = page.locator('.day-column .picker-item:not(.picker-item-empty)'); + const monthValues = page.locator('.month-column ion-picker-column-option'); + const yearValues = page.locator('.year-column ion-picker-column-option'); + const dayValues = page.locator('.day-column ion-picker-column-option'); expect(await monthValues.count()).toBe(2); expect(await yearValues.count()).toBe(3); @@ -178,7 +178,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); const ionChange = await page.spyOnEvent('ionChange'); - const monthValues = page.locator('.month-column .picker-item:not(.picker-item-empty)'); + const monthValues = page.locator('.month-column ion-picker-column-option'); // Change month value await monthValues.nth(0).click(); @@ -212,7 +212,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); const ionChange = await page.spyOnEvent('ionChange'); - const dayValues = page.locator('.day-column .picker-item:not(.picker-item-empty)'); + const dayValues = page.locator('.day-column ion-picker-column-option'); // Change day value await dayValues.nth(0).click(); @@ -233,7 +233,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); const ionChange = await page.spyOnEvent('ionChange'); - const yearValues = page.locator('.year-column .picker-item:not(.picker-item-empty)'); + const yearValues = page.locator('.year-column ion-picker-column-option'); /** * Change year value @@ -259,9 +259,9 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await datetime.evaluate((el: HTMLIonDatetimeElement) => (el.value = '2021-05-25T12:40:00.000Z')); await page.waitForChanges(); - const selectedMonth = datetime.locator('.month-column .picker-item-active'); - const selectedDay = datetime.locator('.day-column .picker-item-active'); - const selectedYear = datetime.locator('.year-column .picker-item-active'); + const selectedMonth = datetime.locator('.month-column ion-picker-column-option.option-active'); + const selectedDay = datetime.locator('.day-column ion-picker-column-option.option-active'); + const selectedYear = datetime.locator('.year-column ion-picker-column-option.option-active'); await expect(selectedMonth).toHaveText(/May/); await expect(selectedDay).toHaveText(/25/); @@ -287,9 +287,8 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); - const monthValues = page.locator('.month-column .picker-item:not(.picker-item-empty)'); - const dayValues = page.locator('.day-column .picker-item:not(.picker-item-empty)'); - + const monthValues = page.locator('.month-column ion-picker-column-option'); + const dayValues = page.locator('.day-column ion-picker-column-option'); await expect(monthValues).toHaveText(['1月', '2月', '3月']); await expect(dayValues).toHaveText(['1日', '2日', '3日']); }); @@ -348,7 +347,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); - const dayValues = page.locator('ion-datetime .date-column .picker-item[data-value]'); + const dayValues = page.locator('ion-datetime .date-column ion-picker-column-option'); expect(await dayValues.count()).toEqual(57); }); test('should respect the max bounds', async ({ page }) => { @@ -361,7 +360,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); - const dayValues = page.locator('ion-datetime .date-column .picker-item[data-value]'); + const dayValues = page.locator('ion-datetime .date-column ion-picker-column-option'); expect(await dayValues.count()).toEqual(41); }); test('should respect isDateEnabled preference', async ({ page }) => { @@ -384,7 +383,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); - const disabledDates = page.locator('.date-column .picker-item[disabled]'); + const disabledDates = page.locator('.date-column ion-picker-column-option.option-disabled'); expect(await disabledDates.count()).toBe(44); }); @@ -405,7 +404,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); - const dateValues = page.locator('.date-column .picker-item:not(.picker-item-empty)'); + const dateValues = page.locator('.date-column ion-picker-column-option'); expect(await dateValues.count()).toBe(5); }); @@ -426,8 +425,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); - const dateValues = page.locator('.date-column .picker-item:not(.picker-item-empty)'); - + const dateValues = page.locator('.date-column ion-picker-column-option'); await expect(dateValues).toHaveText(['2月1日(火)', '2月2日(水)', '2月3日(木)']); }); test('should respect min and max bounds even across years', async ({ page }) => { @@ -447,18 +445,18 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); const dateColumn = page.locator('.date-column'); - const dateValues = dateColumn.locator('.picker-item:not(.picker-item-empty)'); + const dateValues = dateColumn.locator('ion-picker-column-option'); expect(await dateValues.count()).toBe(90); /** * Select 1st item to change the dates rendered */ - await expect(dateValues.nth(0)).toHaveAttribute('data-value', '2022-1-1'); + await expect(dateValues.nth(0)).toHaveJSProperty('value', '2022-1-1'); await dateColumn.evaluate((el: HTMLElement) => (el.scrollTop = 0)); await page.waitForChanges(); - await expect(dateValues.nth(0)).toHaveAttribute('data-value', '2021-12-1'); + await expect(dateValues.nth(0)).toHaveJSProperty('value', '2021-12-1'); }); test('should keep sliding window if default window is within min and max constraints', async ({ page }) => { await page.setContent( @@ -476,7 +474,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); - const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)'); + const dayValues = page.locator('.date-column ion-picker-column-option'); expect(await dayValues.count()).toBe(92); }); @@ -496,7 +494,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); - const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)'); + const dayValues = page.locator('.date-column ion-picker-column-option'); expect(await dayValues.count()).toBe(15); }); @@ -514,7 +512,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); const ionChange = await page.spyOnEvent('ionChange'); - const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)'); + const dayValues = page.locator('.date-column ion-picker-column-option'); // Change day/month value await dayValues.nth(0).click(); @@ -533,7 +531,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); - const dayValues = page.locator('ion-datetime .date-column .picker-item[data-value]'); + const dayValues = page.locator('ion-datetime .date-column ion-picker-column-option'); expect(await dayValues.count()).toEqual(57); }); test('should respect the max bounds', async ({ page }) => { @@ -546,7 +544,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); - const dayValues = page.locator('ion-datetime .date-column .picker-item[data-value]'); + const dayValues = page.locator('ion-datetime .date-column ion-picker-column-option'); expect(await dayValues.count()).toEqual(41); }); test('should respect isDateEnabled preference', async ({ page }) => { @@ -569,7 +567,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); - const disabledDates = page.locator('.date-column .picker-item[disabled]'); + const disabledDates = page.locator('.date-column ion-picker-column-option.option-disabled'); expect(await disabledDates.count()).toBe(44); }); @@ -590,7 +588,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); - const dateValues = page.locator('.date-column .picker-item:not(.picker-item-empty)'); + const dateValues = page.locator('.date-column ion-picker-column-option'); expect(await dateValues.count()).toBe(5); }); @@ -611,7 +609,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); - const dateValues = page.locator('.date-column .picker-item:not(.picker-item-empty)'); + const dateValues = page.locator('.date-column ion-picker-column-option'); await expect(dateValues).toHaveText(['2月1日(火)', '2月2日(水)', '2月3日(木)']); }); @@ -632,18 +630,18 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); const dateColumn = page.locator('.date-column'); - const dateValues = dateColumn.locator('.picker-item:not(.picker-item-empty)'); + const dateValues = dateColumn.locator('ion-picker-column-option'); expect(await dateValues.count()).toBe(90); /** * Select 1st item to change the dates rendered */ - await expect(dateValues.nth(0)).toHaveAttribute('data-value', '2022-1-1'); + await expect(dateValues.nth(0)).toHaveJSProperty('value', '2022-1-1'); await dateColumn.evaluate((el: HTMLElement) => (el.scrollTop = 0)); await page.waitForChanges(); - await expect(dateValues.nth(0)).toHaveAttribute('data-value', '2021-12-1'); + await expect(dateValues.nth(0)).toHaveJSProperty('value', '2021-12-1'); }); test('should keep sliding window if default window is within min and max constraints', async ({ page }) => { await page.setContent( @@ -661,7 +659,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); - const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)'); + const dayValues = page.locator('.date-column ion-picker-column-option'); expect(await dayValues.count()).toBe(92); }); @@ -681,7 +679,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await page.waitForSelector('.datetime-ready'); - const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)'); + const dayValues = page.locator('.date-column ion-picker-column-option'); expect(await dayValues.count()).toBe(15); }); From 95628755aa6966a7cfd4704e87e88c5cf7d6acbe Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 13:24:40 -0500 Subject: [PATCH 30/53] fix: picker column option notifies picker column when ready --- .../picker-column-option/picker-column-option.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/core/src/components/picker-column-option/picker-column-option.tsx b/core/src/components/picker-column-option/picker-column-option.tsx index f1a0db51a04..5665236921c 100644 --- a/core/src/components/picker-column-option/picker-column-option.tsx +++ b/core/src/components/picker-column-option/picker-column-option.tsx @@ -67,6 +67,7 @@ export class PickerColumnOption implements ComponentInterface { /** * The initial value of `aria-label` needs to be set for * the first render. + */ this.ariaLabel = inheritedAttributes['aria-label'] || null; } @@ -81,14 +82,20 @@ export class PickerColumnOption implements ComponentInterface { /** * The column options can load at any time - * so the selected option needs to tell the + * so the options needs to tell the * parent picker column when it is loaded * so the picker column can ensure it is * centered in the view. + * + * We intentionally run this for every + * option. If we only ran this from + * the selected option then if the newly + * loaded options were not selected then + * scrollActiveItemIntoView would not be called. */ componentDidLoad() { const { pickerColumn } = this; - if (pickerColumn !== null && this.value === pickerColumn.value) { + if (pickerColumn !== null) { pickerColumn.scrollActiveItemIntoView(); } } From cfcbcd92bdb7f95824856edc7a6c85d1dda66bc8 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 13:25:09 -0500 Subject: [PATCH 31/53] fix: picker column selects correct element on scroll --- .../picker-column/picker-column.tsx | 43 +++++++++++++++++-- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/core/src/components/picker-column/picker-column.tsx b/core/src/components/picker-column/picker-column.tsx index 6e0d1f64a97..51a6482ad78 100644 --- a/core/src/components/picker-column/picker-column.tsx +++ b/core/src/components/picker-column/picker-column.tsx @@ -4,6 +4,7 @@ import { getElementRoot, raf } from '@utils/helpers'; import { hapticSelectionChanged, hapticSelectionEnd, hapticSelectionStart } from '@utils/native/haptic'; import { isPlatform } from '@utils/platform'; import { createColorClasses } from '@utils/theme'; +import { doc } from '@utils/browser'; import { getIonMode } from '../../global/ionic-global'; import type { Color } from '../../interface'; @@ -296,10 +297,46 @@ export class PickerColumn implements ComponentInterface { const centerX = bbox.x + bbox.width / 2; const centerY = bbox.y + bbox.height / 2; - const newActiveElement = el.shadowRoot!.elementFromPoint( + /** + * elementFromPoint returns the top-most element. + * This means that if an ion-backdrop is overlaying the + * picker then the appropriate picker-column-option will + * not be selected. To account for this, we use elementsFromPoint + * and use an Array.find to find the appropriate column option + * at that point. + * + * Additionally, the picker column could be used in the + * Shadow DOM (i.e. in ion-datetime) so we need to make + * sure we are choosing the correct host otherwise + * the elements returns by elementsFromPoint will be + * retargeted. To account for this, we check to see + * if the picker column has a parent shadow root. If + * so, we use that shadow root when doing elementsFromPoint. + * Otherwise, we just use the document. + */ + const rootNode = el.getRootNode(); + const hasParentShadow = rootNode instanceof ShadowRoot; + const referenceNode = hasParentShadow ? rootNode as ShadowRoot : doc; + + /** + * If the reference node is undefined + * then it's likely that doc is undefined + * due to being in an SSR environment. + */ + if (referenceNode === undefined) { + return; + } + + const elementsAtPoint = referenceNode.elementsFromPoint( centerX, centerY - ) as HTMLIonPickerColumnOptionElement | null; + ) as HTMLIonPickerColumnOptionElement[]; + + /** + * elementsFromPoint can returns multiple elements + * so find the relevant picker column option if one exists. + */ + const newActiveElement = elementsAtPoint.find(el => el.tagName === 'ION-PICKER-COLUMN-OPTION') as HTMLIonPickerColumnOptionElement | undefined; if (activeEl !== undefined) { this.setPickerItemActiveState(activeEl, false); @@ -313,7 +350,7 @@ export class PickerColumn implements ComponentInterface { * below if newActiveElement was null but activeEl * was undefined. */ - if (newActiveElement === null || newActiveElement.disabled) { + if (newActiveElement === undefined || newActiveElement.disabled) { return; } From 3b67bd3e0c86dbadd7f0b6ea05ea072fac87ba3e Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 13:26:36 -0500 Subject: [PATCH 32/53] build and lint --- core/api.txt | 2 +- core/src/components/datetime/datetime.tsx | 29 ++++++++++++++----- .../datetime/test/minmax/datetime.e2e.ts | 8 ++--- .../picker-column/picker-column.tsx | 13 ++++----- 4 files changed, 30 insertions(+), 22 deletions(-) diff --git a/core/api.txt b/core/api.txt index 51a44ff3675..81317d78e36 100644 --- a/core/api.txt +++ b/core/api.txt @@ -916,7 +916,7 @@ ion-picker-column,prop,disabled,boolean,false,false,false ion-picker-column,prop,items,PickerColumnItem[],[],false,false ion-picker-column,prop,mode,"ios" | "md",undefined,false,false ion-picker-column,prop,value,number | string | undefined,undefined,false,false -ion-picker-column,event,ionChange,number | string | undefined,true +ion-picker-column,event,ionChange,{ value: string | number | undefined; },true ion-picker-column-option,shadow ion-picker-column-option,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record | undefined,'primary',false,true diff --git a/core/src/components/datetime/datetime.tsx b/core/src/components/datetime/datetime.tsx index 599becbec49..bc74098be32 100644 --- a/core/src/components/datetime/datetime.tsx +++ b/core/src/components/datetime/datetime.tsx @@ -1612,7 +1612,6 @@ export class Datetime implements ComponentInterface { ? `${workingParts.year}-${workingParts.month}-${workingParts.day}` : `${defaultParts.year}-${defaultParts.month}-${defaultParts.day}`; - console.log('hi there', items) return ( {items.map((item: PickerColumnItem) => ( - {item.text} + + {item.text} + ))} ); @@ -1769,7 +1770,9 @@ export class Datetime implements ComponentInterface { }} > {days.map((day: PickerColumnItem) => ( - {day.text} + + {day.text} + ))} ); @@ -1817,7 +1820,9 @@ export class Datetime implements ComponentInterface { }} > {months.map((month: PickerColumnItem) => ( - {month.text} + + {month.text} + ))} ); @@ -1864,7 +1869,9 @@ export class Datetime implements ComponentInterface { }} > {years.map((year: PickerColumnItem) => ( - {year.text} + + {year.text} + ))} ); @@ -1930,7 +1937,9 @@ export class Datetime implements ComponentInterface { }} > {hoursData.map((hour: PickerColumnItem) => ( - {hour.text} + + {hour.text} + ))} ); @@ -1962,7 +1971,9 @@ export class Datetime implements ComponentInterface { }} > {minutesData.map((minute: PickerColumnItem) => ( - {minute.text} + + {minute.text} + ))} ); @@ -2001,7 +2012,9 @@ export class Datetime implements ComponentInterface { }} > {dayPeriodData.map((dayPeriod: PickerColumnItem) => ( - {dayPeriod.text} + + {dayPeriod.text} + ))} ); diff --git a/core/src/components/datetime/test/minmax/datetime.e2e.ts b/core/src/components/datetime/test/minmax/datetime.e2e.ts index 7f7819a5132..b59c886e459 100644 --- a/core/src/components/datetime/test/minmax/datetime.e2e.ts +++ b/core/src/components/datetime/test/minmax/datetime.e2e.ts @@ -214,9 +214,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => config ); - const hourPickerItems = page.locator( - 'ion-datetime ion-picker-column:first-of-type ion-picker-column-option' - ); + const hourPickerItems = page.locator('ion-datetime ion-picker-column:first-of-type ion-picker-column-option'); await expect(hourPickerItems).toHaveText(['8', '9', '10', '11']); }); @@ -238,9 +236,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => config ); - const hourPickerItems = page.locator( - 'ion-datetime ion-picker-column:first-of-type ion-picker-column-option' - ); + const hourPickerItems = page.locator('ion-datetime ion-picker-column:first-of-type ion-picker-column-option'); await expect(hourPickerItems).toHaveText(['12', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11']); }); diff --git a/core/src/components/picker-column/picker-column.tsx b/core/src/components/picker-column/picker-column.tsx index 51a6482ad78..7321a5b4a16 100644 --- a/core/src/components/picker-column/picker-column.tsx +++ b/core/src/components/picker-column/picker-column.tsx @@ -1,10 +1,10 @@ import type { ComponentInterface, EventEmitter } from '@stencil/core'; import { Component, Element, Event, Host, Method, Prop, State, Watch, h } from '@stencil/core'; +import { doc } from '@utils/browser'; import { getElementRoot, raf } from '@utils/helpers'; import { hapticSelectionChanged, hapticSelectionEnd, hapticSelectionStart } from '@utils/native/haptic'; import { isPlatform } from '@utils/platform'; import { createColorClasses } from '@utils/theme'; -import { doc } from '@utils/browser'; import { getIonMode } from '../../global/ionic-global'; import type { Color } from '../../interface'; @@ -316,7 +316,7 @@ export class PickerColumn implements ComponentInterface { */ const rootNode = el.getRootNode(); const hasParentShadow = rootNode instanceof ShadowRoot; - const referenceNode = hasParentShadow ? rootNode as ShadowRoot : doc; + const referenceNode = hasParentShadow ? (rootNode as ShadowRoot) : doc; /** * If the reference node is undefined @@ -327,16 +327,15 @@ export class PickerColumn implements ComponentInterface { return; } - const elementsAtPoint = referenceNode.elementsFromPoint( - centerX, - centerY - ) as HTMLIonPickerColumnOptionElement[]; + const elementsAtPoint = referenceNode.elementsFromPoint(centerX, centerY) as HTMLIonPickerColumnOptionElement[]; /** * elementsFromPoint can returns multiple elements * so find the relevant picker column option if one exists. */ - const newActiveElement = elementsAtPoint.find(el => el.tagName === 'ION-PICKER-COLUMN-OPTION') as HTMLIonPickerColumnOptionElement | undefined; + const newActiveElement = elementsAtPoint.find((el) => el.tagName === 'ION-PICKER-COLUMN-OPTION') as + | HTMLIonPickerColumnOptionElement + | undefined; if (activeEl !== undefined) { this.setPickerItemActiveState(activeEl, false); From 4b564ee9b2f1d995c9c9b7358f30c9888c701eac Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 13:33:30 -0500 Subject: [PATCH 33/53] test: remove .only --- core/src/components/datetime/test/locale/datetime.e2e.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/components/datetime/test/locale/datetime.e2e.ts b/core/src/components/datetime/test/locale/datetime.e2e.ts index 7c64ba63738..6df37a77ba8 100644 --- a/core/src/components/datetime/test/locale/datetime.e2e.ts +++ b/core/src/components/datetime/test/locale/datetime.e2e.ts @@ -22,7 +22,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { await datetimeFixture.expectLocalizedDatePicker(screenshot); }); - test.only('month/year picker should not have visual regressions', async () => { + test('month/year picker should not have visual regressions', async () => { await datetimeFixture.goto(config, 'en-US', 'month-year'); await datetimeFixture.expectLocalizedMonthYearPicker(screenshot); }); From 3da0590a09d5f0480788af7327efbb10ab6174a2 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 14:07:55 -0500 Subject: [PATCH 34/53] fix(datetime): expose shadow parts --- core/src/components/datetime/datetime.tsx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/core/src/components/datetime/datetime.tsx b/core/src/components/datetime/datetime.tsx index bc74098be32..6e49fc756e2 100644 --- a/core/src/components/datetime/datetime.tsx +++ b/core/src/components/datetime/datetime.tsx @@ -1648,7 +1648,7 @@ export class Datetime implements ComponentInterface { }} > {items.map((item: PickerColumnItem) => ( - + {item.text} ))} @@ -1736,13 +1736,14 @@ export class Datetime implements ComponentInterface { const { disabled, workingParts } = this; const activePart = this.getActivePartsWithFallback(); + const pickerColumnValue = (workingParts.day !== null ? workingParts.day : this.defaultParts.day) ?? undefined; return ( { // TODO(FW-1823) Remove this when iOS 14 support is dropped. // Due to a Safari 14 issue we need to destroy @@ -1770,7 +1771,7 @@ export class Datetime implements ComponentInterface { }} > {days.map((day: PickerColumnItem) => ( - + {day.text} ))} @@ -1820,7 +1821,7 @@ export class Datetime implements ComponentInterface { }} > {months.map((month: PickerColumnItem) => ( - + {month.text} ))} @@ -1869,7 +1870,7 @@ export class Datetime implements ComponentInterface { }} > {years.map((year: PickerColumnItem) => ( - + {year.text} ))} @@ -1937,7 +1938,7 @@ export class Datetime implements ComponentInterface { }} > {hoursData.map((hour: PickerColumnItem) => ( - + {hour.text} ))} @@ -1971,7 +1972,7 @@ export class Datetime implements ComponentInterface { }} > {minutesData.map((minute: PickerColumnItem) => ( - + {minute.text} ))} @@ -2012,7 +2013,7 @@ export class Datetime implements ComponentInterface { }} > {dayPeriodData.map((dayPeriod: PickerColumnItem) => ( - + {dayPeriod.text} ))} @@ -2564,3 +2565,5 @@ export class Datetime implements ComponentInterface { } let datetimeIds = 0; +const WHEEL_ITEM_PART = 'wheel-item'; +const WHEEL_ITEM_ACTIVE_PART = `${WHEEL_ITEM_PART} active`; From 514b3b6885d0c1f835add36dd70dc3d93468ffc5 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 14:08:04 -0500 Subject: [PATCH 35/53] fix(picker-column-option): color can be overridden --- .../picker-column-option/picker-column-option.md.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/components/picker-column-option/picker-column-option.md.scss b/core/src/components/picker-column-option/picker-column-option.md.scss index 8dc535d8991..f1741b53002 100644 --- a/core/src/components/picker-column-option/picker-column-option.md.scss +++ b/core/src/components/picker-column-option/picker-column-option.md.scss @@ -1,5 +1,5 @@ @import "./picker-column-option.scss"; -:host(.option-active) button { +:host(.option-active) { color: current-color(base); } From 6ddc15f3ed2b2ad99f36465d6bf0870a49342c23 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 14:08:12 -0500 Subject: [PATCH 36/53] test(datetime): migrate custom tests --- core/src/components/datetime/test/custom/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/components/datetime/test/custom/index.html b/core/src/components/datetime/test/custom/index.html index a76f4582469..b70046b86e5 100644 --- a/core/src/components/datetime/test/custom/index.html +++ b/core/src/components/datetime/test/custom/index.html @@ -68,12 +68,12 @@ } .custom-grid-wheel::part(wheel-item), - ion-picker-column::part(wheel-item) { + ion-picker-column-option { color: rgb(255, 134, 154); } .custom-grid-wheel::part(wheel-item active), - ion-picker-column::part(wheel-item active) { + ion-picker-column-option.option-active { color: rgb(128, 30, 171); } From 6d2f998d6e5b7efdb01407808cc35ba18e2151f7 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 14:08:34 -0500 Subject: [PATCH 37/53] chore: lint --- core/src/components/datetime/datetime.tsx | 49 +++++++++++++++++++---- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/core/src/components/datetime/datetime.tsx b/core/src/components/datetime/datetime.tsx index 6e49fc756e2..9109d859a14 100644 --- a/core/src/components/datetime/datetime.tsx +++ b/core/src/components/datetime/datetime.tsx @@ -1648,7 +1648,12 @@ export class Datetime implements ComponentInterface { }} > {items.map((item: PickerColumnItem) => ( - + {item.text} ))} @@ -1771,7 +1776,12 @@ export class Datetime implements ComponentInterface { }} > {days.map((day: PickerColumnItem) => ( - + {day.text} ))} @@ -1821,7 +1831,12 @@ export class Datetime implements ComponentInterface { }} > {months.map((month: PickerColumnItem) => ( - + {month.text} ))} @@ -1870,7 +1885,12 @@ export class Datetime implements ComponentInterface { }} > {years.map((year: PickerColumnItem) => ( - + {year.text} ))} @@ -1938,7 +1958,12 @@ export class Datetime implements ComponentInterface { }} > {hoursData.map((hour: PickerColumnItem) => ( - + {hour.text} ))} @@ -1972,7 +1997,12 @@ export class Datetime implements ComponentInterface { }} > {minutesData.map((minute: PickerColumnItem) => ( - + {minute.text} ))} @@ -2013,7 +2043,12 @@ export class Datetime implements ComponentInterface { }} > {dayPeriodData.map((dayPeriod: PickerColumnItem) => ( - + {dayPeriod.text} ))} From a52413113fd93c4029ddecb40efdfbe973947e1b Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 14:11:04 -0500 Subject: [PATCH 38/53] add todo --- core/src/components/picker-column/picker-column.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/components/picker-column/picker-column.tsx b/core/src/components/picker-column/picker-column.tsx index 7321a5b4a16..9d37a7defcb 100644 --- a/core/src/components/picker-column/picker-column.tsx +++ b/core/src/components/picker-column/picker-column.tsx @@ -473,6 +473,7 @@ export class PickerColumn implements ComponentInterface { * from two layers of shadow nesting. If this causes problems, * the attribute can be moved to datetime.tsx and set on every * instance of ion-picker-column there instead. + * TODO FW-5580 remove exportparts */ return ( From 90e2d2cf2cac39374241a1de89010767744ad392 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 14:16:05 -0500 Subject: [PATCH 39/53] remove outdated comment --- core/src/components/picker-column/picker-column.tsx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/core/src/components/picker-column/picker-column.tsx b/core/src/components/picker-column/picker-column.tsx index 9d37a7defcb..a96620a4487 100644 --- a/core/src/components/picker-column/picker-column.tsx +++ b/core/src/components/picker-column/picker-column.tsx @@ -341,14 +341,6 @@ export class PickerColumn implements ComponentInterface { this.setPickerItemActiveState(activeEl, false); } - /** - * This null check is important because activeEl - * can be undefined but newActiveElement can be - * null since we are using a querySelector. - * newActiveElement !== activeEl would return true - * below if newActiveElement was null but activeEl - * was undefined. - */ if (newActiveElement === undefined || newActiveElement.disabled) { return; } From c1d5401556a7d6dc5d388a1b9b4b61ee469924b6 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 4 Dec 2023 14:38:21 -0500 Subject: [PATCH 40/53] test(datetime): migrate one more test file --- core/src/components/datetime/test/datetime.e2e.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/components/datetime/test/datetime.e2e.ts b/core/src/components/datetime/test/datetime.e2e.ts index f6ac137d710..ec415946b6a 100644 --- a/core/src/components/datetime/test/datetime.e2e.ts +++ b/core/src/components/datetime/test/datetime.e2e.ts @@ -18,7 +18,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { page, }) => { const monthYearToggle = page.locator('ion-datetime .calendar-month-year'); - const monthColumnItems = page.locator('ion-datetime .month-column .picker-item:not(.picker-item-empty)'); + const monthColumnItems = page.locator('ion-datetime .month-column ion-picker-column-option'); await expect(monthYearToggle).toContainText('January 2022'); @@ -34,7 +34,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { test('should adjust the selected day when moving to a month with a different number of days', async ({ page }) => { const monthYearToggle = page.locator('ion-datetime .calendar-month-year'); - const monthColumnItems = page.locator('ion-datetime .month-column .picker-item:not(.picker-item-empty)'); + const monthColumnItems = page.locator('ion-datetime .month-column ion-picker-column-option'); const datetime = page.locator('ion-datetime'); const ionChange = await page.spyOnEvent('ionChange'); From e8d5599aada8b520639e9d9d5adb1942994b7840 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 5 Dec 2023 13:24:58 -0500 Subject: [PATCH 41/53] Update core/src/components/picker-column/picker-column.tsx Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com> --- core/src/components/picker-column/picker-column.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/components/picker-column/picker-column.tsx b/core/src/components/picker-column/picker-column.tsx index a96620a4487..396ce9495cb 100644 --- a/core/src/components/picker-column/picker-column.tsx +++ b/core/src/components/picker-column/picker-column.tsx @@ -300,7 +300,7 @@ export class PickerColumn implements ComponentInterface { /** * elementFromPoint returns the top-most element. * This means that if an ion-backdrop is overlaying the - * picker then the appropriate picker-column-option will + * picker then the appropriate picker column option will * not be selected. To account for this, we use elementsFromPoint * and use an Array.find to find the appropriate column option * at that point. From d48c41db5ba2c169b3906ef5d8d5e2367b47872e Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 5 Dec 2023 13:25:55 -0500 Subject: [PATCH 42/53] use generic for query selector --- core/src/components/picker-column/picker-column.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/components/picker-column/picker-column.tsx b/core/src/components/picker-column/picker-column.tsx index 396ce9495cb..17413091d47 100644 --- a/core/src/components/picker-column/picker-column.tsx +++ b/core/src/components/picker-column/picker-column.tsx @@ -441,7 +441,7 @@ export class PickerColumn implements ComponentInterface { get activeItem() { const { value } = this; const options = Array.from( - this.el.querySelectorAll('ion-picker-column-option') as NodeListOf + this.el.querySelectorAll('ion-picker-column-option') ); return options.find((option: HTMLIonPickerColumnOptionElement) => { /** From e4797f73f47ecc2db1446aeceac999ec89dda27b Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 5 Dec 2023 13:26:53 -0500 Subject: [PATCH 43/53] remove explicit type since it can be inferred --- core/src/components/picker-column/picker-column.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/components/picker-column/picker-column.tsx b/core/src/components/picker-column/picker-column.tsx index 17413091d47..32e301186a9 100644 --- a/core/src/components/picker-column/picker-column.tsx +++ b/core/src/components/picker-column/picker-column.tsx @@ -443,7 +443,7 @@ export class PickerColumn implements ComponentInterface { const options = Array.from( this.el.querySelectorAll('ion-picker-column-option') ); - return options.find((option: HTMLIonPickerColumnOptionElement) => { + return options.find((option) => { /** * If the whole picker column is disabled, the current value should appear active * If the current value item is specifically disabled, it should not appear active From a98e85d632fb82bc98654002a0c401047401bc8a Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 5 Dec 2023 13:27:19 -0500 Subject: [PATCH 44/53] remove explicit type case --- core/src/components/picker-column/picker-column.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/components/picker-column/picker-column.tsx b/core/src/components/picker-column/picker-column.tsx index 32e301186a9..a9ffddf7454 100644 --- a/core/src/components/picker-column/picker-column.tsx +++ b/core/src/components/picker-column/picker-column.tsx @@ -453,7 +453,7 @@ export class PickerColumn implements ComponentInterface { } return option.value === value; - }) as HTMLIonPickerColumnOptionElement | undefined; + }); } render() { From 33a21d367530584da9fe3ac11540768741f02e11 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 5 Dec 2023 13:28:47 -0500 Subject: [PATCH 45/53] remove typecast in favor of generic --- core/src/components/picker-column/picker-column.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/components/picker-column/picker-column.tsx b/core/src/components/picker-column/picker-column.tsx index a9ffddf7454..95619dc0af9 100644 --- a/core/src/components/picker-column/picker-column.tsx +++ b/core/src/components/picker-column/picker-column.tsx @@ -104,9 +104,9 @@ export class PickerColumn implements ComponentInterface { * Because this initial call to scrollActiveItemIntoView has to fire before * the scroll listener is set up, we need to manage the active class manually. */ - const oldActive = getElementRoot(el).querySelector( + const oldActive = getElementRoot(el).querySelector( `.${PICKER_ITEM_ACTIVE_CLASS}` - ) as HTMLIonPickerColumnOptionElement | null; + ); if (oldActive) { this.setPickerItemActiveState(oldActive, false); } From 0ef015b5be4d4bbdc1ec4976081a383a760da2e6 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 5 Dec 2023 13:29:06 -0500 Subject: [PATCH 46/53] remove unneeded typecast --- core/src/components/picker-column/picker-column.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/src/components/picker-column/picker-column.tsx b/core/src/components/picker-column/picker-column.tsx index 95619dc0af9..5d628a2369a 100644 --- a/core/src/components/picker-column/picker-column.tsx +++ b/core/src/components/picker-column/picker-column.tsx @@ -333,9 +333,7 @@ export class PickerColumn implements ComponentInterface { * elementsFromPoint can returns multiple elements * so find the relevant picker column option if one exists. */ - const newActiveElement = elementsAtPoint.find((el) => el.tagName === 'ION-PICKER-COLUMN-OPTION') as - | HTMLIonPickerColumnOptionElement - | undefined; + const newActiveElement = elementsAtPoint.find((el) => el.tagName === 'ION-PICKER-COLUMN-OPTION'); if (activeEl !== undefined) { this.setPickerItemActiveState(activeEl, false); From f9d01b90410c137aa57b8a36ae5f09aa68a2e211 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 5 Dec 2023 13:31:14 -0500 Subject: [PATCH 47/53] remove explicit types --- core/src/components/datetime/datetime.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/components/datetime/datetime.tsx b/core/src/components/datetime/datetime.tsx index 9109d859a14..aecf1ef53a4 100644 --- a/core/src/components/datetime/datetime.tsx +++ b/core/src/components/datetime/datetime.tsx @@ -1647,7 +1647,7 @@ export class Datetime implements ComponentInterface { ev.stopPropagation(); }} > - {items.map((item: PickerColumnItem) => ( + {items.map((item) => ( - {days.map((day: PickerColumnItem) => ( + {days.map((day) => ( - {months.map((month: PickerColumnItem) => ( + {months.map((month) => ( - {years.map((year: PickerColumnItem) => ( + {years.map((year) => ( - {hoursData.map((hour: PickerColumnItem) => ( + {hoursData.map((hour) => ( - {minutesData.map((minute: PickerColumnItem) => ( + {minutesData.map((minute) => ( - {dayPeriodData.map((dayPeriod: PickerColumnItem) => ( + {dayPeriodData.map((dayPeriod) => ( Date: Tue, 5 Dec 2023 13:34:18 -0500 Subject: [PATCH 48/53] active part no longer includes base part --- core/src/components/datetime/datetime.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/core/src/components/datetime/datetime.tsx b/core/src/components/datetime/datetime.tsx index aecf1ef53a4..38c9f2c598d 100644 --- a/core/src/components/datetime/datetime.tsx +++ b/core/src/components/datetime/datetime.tsx @@ -1649,7 +1649,7 @@ export class Datetime implements ComponentInterface { > {items.map((item) => ( {days.map((day) => ( {months.map((month) => ( {years.map((year) => ( {hoursData.map((hour) => ( {minutesData.map((minute) => ( {dayPeriodData.map((dayPeriod) => ( Date: Tue, 5 Dec 2023 13:34:26 -0500 Subject: [PATCH 49/53] lint --- core/src/components/picker-column/picker-column.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/src/components/picker-column/picker-column.tsx b/core/src/components/picker-column/picker-column.tsx index 5d628a2369a..43bc2f8b37e 100644 --- a/core/src/components/picker-column/picker-column.tsx +++ b/core/src/components/picker-column/picker-column.tsx @@ -438,9 +438,7 @@ export class PickerColumn implements ComponentInterface { get activeItem() { const { value } = this; - const options = Array.from( - this.el.querySelectorAll('ion-picker-column-option') - ); + const options = Array.from(this.el.querySelectorAll('ion-picker-column-option')); return options.find((option) => { /** * If the whole picker column is disabled, the current value should appear active From ca1b51938dffaaeeed69dd759b077b4c535a5a10 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 5 Dec 2023 14:58:31 -0500 Subject: [PATCH 50/53] fix bad merge on api.txt --- core/api.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/api.txt b/core/api.txt index e301b172a6b..34e875c3bb5 100644 --- a/core/api.txt +++ b/core/api.txt @@ -916,12 +916,8 @@ ion-picker-column,prop,disabled,boolean,false,false,false ion-picker-column,prop,items,PickerColumnItem[],[],false,false ion-picker-column,prop,mode,"ios" | "md",undefined,false,false ion-picker-column,prop,value,number | string | undefined,undefined,false,false -<<<<<<< HEAD -ion-picker-column,event,ionChange,{ value: string | number | undefined; },true -======= ion-picker-column,method,setFocus,setFocus() => Promise -ion-picker-column,event,ionChange,PickerColumnItem,true ->>>>>>> origin/FW-5580 +ion-picker-column,event,ionChange,{ value: string | number | undefined; },true ion-picker-column-option,shadow ion-picker-column-option,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record | undefined,'primary',false,true From 0db0071533e5f1319a1633f334bbd8726e81bcc1 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Wed, 6 Dec 2023 14:55:54 -0500 Subject: [PATCH 51/53] Update core/src/components/picker-column-option/picker-column-option.tsx Co-authored-by: Maria Hutt --- .../components/picker-column-option/picker-column-option.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/components/picker-column-option/picker-column-option.tsx b/core/src/components/picker-column-option/picker-column-option.tsx index 5665236921c..87b828574f8 100644 --- a/core/src/components/picker-column-option/picker-column-option.tsx +++ b/core/src/components/picker-column-option/picker-column-option.tsx @@ -101,7 +101,7 @@ export class PickerColumnOption implements ComponentInterface { } /** - * When an option is clicked update the + * When an option is clicked, update the * parent picker column value. This * component will handle centering the option * in the column view. From da2db5ca63f4a773682ddb311086d5b73281e571 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Wed, 6 Dec 2023 14:59:49 -0500 Subject: [PATCH 52/53] fix: smooth scrolling when value changes --- core/src/components/picker-column/picker-column.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/components/picker-column/picker-column.tsx b/core/src/components/picker-column/picker-column.tsx index 5aae62d1cda..1914e4e6792 100644 --- a/core/src/components/picker-column/picker-column.tsx +++ b/core/src/components/picker-column/picker-column.tsx @@ -86,7 +86,7 @@ export class PickerColumn implements ComponentInterface { * Only scroll the active item into view when the picker column * is actively visible to the user. */ - this.scrollActiveItemIntoView(); + this.scrollActiveItemIntoView(true); } } @@ -159,11 +159,11 @@ export class PickerColumn implements ComponentInterface { /** @internal */ @Method() - async scrollActiveItemIntoView() { + async scrollActiveItemIntoView(smooth = false) { const activeEl = this.activeItem; if (activeEl) { - this.centerPickerItemInView(activeEl, false, false); + this.centerPickerItemInView(activeEl, smooth, false); } } From 4e59020f7dcfb59226cae16778d51fd9ea56aaee Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Wed, 6 Dec 2023 15:05:46 -0500 Subject: [PATCH 53/53] build --- core/src/components.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/components.d.ts b/core/src/components.d.ts index a11ab3a46dd..7a97463128e 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -1976,7 +1976,7 @@ export namespace Components { * If `true`, tapping the picker will reveal a number input keyboard that lets the user type in values for each picker column. This is useful when working with time pickers. */ "numericInput": boolean; - "scrollActiveItemIntoView": () => Promise; + "scrollActiveItemIntoView": (smooth?: boolean) => Promise; /** * Sets focus on the scrollable container within the picker column. Use this method instead of the global `pickerColumn.focus()`. */