Commit Graph

13408 Commits

Author SHA1 Message Date
Liam DeBeasi
fdfc5fc332 chore: resolve merge conflicts 2023-12-05 14:57:09 -05:00
Liam DeBeasi
b5dbc101ea Merge remote-tracking branch 'origin/FW-5575' into FW-5580 2023-12-05 14:45:19 -05:00
Liam DeBeasi
59bd18a7ff chore: sync 2023-12-05 14:44:05 -05:00
Liam DeBeasi
91d0e267b2 feat(picker-column): add styles, disabled and active states (#28621)
Issue number: Internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

We'd like to introduce a new API to the picker column to allow
developers to manipulate the picker options right in the DOM. Currently
developers need to pass an object which is quite cumbersome as you need
to re-pass that object anytime you want to change a single option.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

This PR does some of the prep work to make integrating the picker column
option into picker column easier. It does the following things:

1. Copies the base button styles from picker-column over to
picker-column-option
2. Creates active and disabled states (plus styles)
3. Add tests for base styles

Note: There are duplicate styles across picker-column and
picker-column-option that will be cleaned up once picker-column-option
is integrated and shown to be functional.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2023-12-05 14:40:53 -05:00
Amanda Johnston
cf9fe315a3 feat(picker-column): add prefix and suffix slots (#28603)
Issue number: Internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

The new picker component does not have a counterpart for the `prefix`
and `suffix` properties on the old picker column.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- `prefix` and `suffix` slots added.
- Picker items wrapped in a new `.picker-opts` element for positioning
purposes, similar to the legacy picker column. This necessitated
additional changes to functionality and styling, since previously the
items were direct descendants of the host.
- New `setFocus` method added. This gets around a browser bug in Firefox
where calling `focus()` on the column doesn't correctly move focus, as
the nearest focusable element (`.picker-opts`) is in the shadow DOM.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->

While you can no longer call `focus()` on the column in Firefox and must
use `setFocus()` instead, this isn't considered a breaking change
because this component isn't public API yet.

## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2023-12-05 13:14:53 -06:00
Amanda Johnston
fe3070bac2 chore(): sync with feature-8.0 (#28642)
Issue number: #

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

-
-
-

## Does this introduce a breaking change?

- [ ] Yes
- [ ] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sean Perkins <sean@ionic.io>
Co-authored-by: Éric Le Maître <eric.erwan.le.maitre@gmail.com>
Co-authored-by: Shawn Taylor <shawn@ionic.io>
2023-12-05 13:03:52 -06:00
Liam DeBeasi
d36d645865 lint 2023-12-05 13:34:26 -05:00
Liam DeBeasi
cf3d028d69 active part no longer includes base part 2023-12-05 13:34:18 -05:00
Liam DeBeasi
f9d01b9041 remove explicit types 2023-12-05 13:31:14 -05:00
Liam DeBeasi
0ef015b5be remove unneeded typecast 2023-12-05 13:29:06 -05:00
Liam DeBeasi
33a21d3675 remove typecast in favor of generic 2023-12-05 13:28:47 -05:00
Liam DeBeasi
a98e85d632 remove explicit type case 2023-12-05 13:27:19 -05:00
Liam DeBeasi
e4797f73f4 remove explicit type since it can be inferred 2023-12-05 13:26:53 -05:00
Liam DeBeasi
d48c41db5b use generic for query selector 2023-12-05 13:26:24 -05:00
Liam DeBeasi
e8d5599aad Update core/src/components/picker-column/picker-column.tsx
Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
2023-12-05 13:24:58 -05:00
Liam DeBeasi
c1d5401556 test(datetime): migrate one more test file 2023-12-04 14:38:21 -05:00
Liam DeBeasi
90e2d2cf2c remove outdated comment 2023-12-04 14:16:05 -05:00
Liam DeBeasi
a52413113f add todo 2023-12-04 14:11:04 -05:00
Liam DeBeasi
6d2f998d6e chore: lint 2023-12-04 14:08:34 -05:00
Liam DeBeasi
6ddc15f3ed test(datetime): migrate custom tests 2023-12-04 14:08:12 -05:00
Liam DeBeasi
514b3b6885 fix(picker-column-option): color can be overridden 2023-12-04 14:08:04 -05:00
Liam DeBeasi
3da0590a09 fix(datetime): expose shadow parts 2023-12-04 14:07:55 -05:00
Liam DeBeasi
4b564ee9b2 test: remove .only 2023-12-04 13:33:30 -05:00
Liam DeBeasi
3b67bd3e0c build and lint 2023-12-04 13:26:36 -05:00
Liam DeBeasi
cfcbcd92bd fix: picker column selects correct element on scroll 2023-12-04 13:25:09 -05:00
Liam DeBeasi
95628755aa fix: picker column option notifies picker column when ready 2023-12-04 13:24:40 -05:00
Liam DeBeasi
59113bb4cd test: migrate prefer-wheel tests 2023-12-04 13:24:32 -05:00
Liam DeBeasi
cab56466a2 fix: datetime use keys for stable identity 2023-12-04 11:19:24 -05:00
Liam DeBeasi
656ac5bb01 test: migrate minmax datetime test 2023-12-04 11:09:25 -05:00
Liam DeBeasi
dc93b8ab15 test: migrate locale datetime tests 2023-12-04 11:05:04 -05:00
Liam DeBeasi
892a269d18 test: migrate some datetime tests 2023-12-04 11:03:57 -05:00
Liam DeBeasi
506f42bec4 fix: picker-column emits correct payload 2023-12-04 10:52:01 -05:00
Liam DeBeasi
ed8cfa06fe chore: remove unused var 2023-12-04 10:41:16 -05:00
Liam DeBeasi
edb7bade3d typo 2023-12-04 10:41:09 -05:00
Liam DeBeasi
84c3c52347 fix: datetime passes disabled state correctly 2023-12-04 10:40:51 -05:00
Liam DeBeasi
8693fd6cf3 refactor: remove default slotted content 2023-12-04 10:40:43 -05:00
Liam DeBeasi
5a9a7d1adb refactor: integrate datetime with picker-column-option 2023-12-04 09:53:07 -05:00
Liam DeBeasi
313285d2b8 skip test 2023-12-01 17:15:50 -05:00
Liam DeBeasi
7473d64a4e lint 2023-12-01 16:44:26 -05:00
Liam DeBeasi
948c8d85a5 refactor: cache picker column el 2023-12-01 16:44:22 -05:00
Liam DeBeasi
58a89b329e fix disabled test 2023-12-01 16:39:59 -05:00
Liam DeBeasi
fc36cc50ca add TODOs 2023-12-01 16:35:16 -05:00
Liam DeBeasi
e933833763 test: picker tests pass 2023-12-01 16:19:11 -05:00
Liam DeBeasi
34ec94ffda test: picker-column tests pass 2023-12-01 16:07:56 -05:00
Liam DeBeasi
8d5a043a64 add api 2023-12-01 15:42:33 -05:00
Liam DeBeasi
3470c64e51 build and lint 2023-12-01 15:42:29 -05:00
Liam DeBeasi
2c773ed0e6 fix: do not emit ionChange if value did not change 2023-12-01 15:29:40 -05:00
Liam DeBeasi
b1fc67227c fix: column scrolls into view when option is ready 2023-12-01 15:16:59 -05:00
Liam DeBeasi
75ee951ce8 chore: lint 2023-12-01 14:58:06 -05:00
Liam DeBeasi
2f3f9dc9ca refactor: clicking option sets value 2023-12-01 14:58:01 -05:00