octicon-git-branch(16/) Commit Graph

140 Commits

Author SHA1 Message Date
Liam DeBeasi
0e13b5b540 test(picker): clean up tests (#27433)
Issue number: N/A

---------

<!-- 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. -->

There are several redundant tests I missed during my generator pass.

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


feb1f6c138

- The isOpen tests are testing that you can open/close the modal by
triggering the `isOpen` property. I combined the two tests into 1 test
since they are doing the same thing: Checking that the modal opens when
`isOpen` is `true` and closes when `isOpen` is false. This also avoids
the 500ms timeout of the 2nd test which should speed up execution.


f14b15beca

- Removed the "standalone" screenshot in favor of just checking that the
overlay is visible. Rendering of the contents of the overlay are not
dependent on `ion-app` being present.

## 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. -->
2023-05-09 17:08:07 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
Sean Perkins
9313a914b7 fix(overlays): assign incremental id to overlay host (#27278)
Issue number: Internal

---------

<!-- Please refer to our contributing documentation for any questions on
submitting a pull request, or let us know here if you need any help:
https://ionicframework.com/docs/building/contributing -->

<!-- Some docs updates need to be made in the `ionic-docs` repo, in a
separate PR. See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#modifying-documentation
for details. -->

<!-- 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 counter for incrementing the `id` and `z-index` of an overlay is
incremented whenever the `connectedCallback` is fired for an overlay.

When an overlay is presented and/or conditionally rendered, the overlay
`id` can increment by `n+2` instead of `n+1`.

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

- Increments all overlay ids consistently
- Removes legacy `ion-modal-{id}` and `ion-popover-{id}` logic
- Adds unit tests for the id behavior
- Tests are split up into separate files so that the counter is always
starting from `0`
- Adds an integration test with the Angular test app to verify
conditional rendering behavior

## 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. -->
2023-05-03 17:24:19 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
df3aaff7c3 test(picker, picker-column): migrate to generators (#27352)
Issue number: N/A

---------

<!-- Please refer to our contributing documentation for any questions on
submitting a pull request, or let us know here if you need any help:
https://ionicframework.com/docs/building/contributing -->

<!-- Some docs updates need to be made in the `ionic-docs` repo, in a
separate PR. See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#modifying-documentation
for details. -->

<!-- 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. -->

Picker and picker column tests use legacy syntax

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

- Picker and picker column tests use generator syntax

## 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. -->
2023-05-02 15:38:00 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
4826a3d9f5 test(config): introduce legacy and modern playwright projects (#27228)
Issue number: N/A

---------

<!-- Please refer to our contributing documentation for any questions on
submitting a pull request, or let us know here if you need any help:
https://ionicframework.com/docs/building/contributing -->

<!-- Some docs updates need to be made in the `ionic-docs` repo, in a
separate PR. See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#modifying-documentation
for details. -->

<!-- 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. -->

This is the first PR to introduce the infrastructure required to add
test generators to the Ionic Framework project. This PR introduces the
file name changes necessary to support two playwright configs, so I
recommend reviewing the PR by commit:


1e5012cea1

- Created a `playwright.config-legacy.ts` file and updates
`package.json`.
- Running `npm run test.e2e` will run the generator tests, and running
`npm run test.e2e.legacy` will run the legacy tests.


4fe8de7df7

- Updates the GitHub Action scripts to run both the modern and legacy
E2E tests. I added command modifiers to avoid collisions with output
directories.


e8bcfaf926

- Updates `*.e2e.ts` files to have the legacy format name:
`*.e2e-legacy.ts`. This naming scheme is required for the two Playwright
configs to pull in the correct files. When migrating tests to
generators, team members will rename the file to remove the `-legacy`
part.


5bf196c36d
(warning: lots of files!)

- Updates the `*.e2e.ts-snapshots` directories to have the legacy format
name: `*.e2e-legacy.ts-snapshots`. The screenshot directory in
Playwright is generated based on the test file name which is why we are
updating the screenshot directory. When migrating tests to generators,
team members will rename the directory to remove the `-legacy` part.

## 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. -->
2023-04-26 18:27:17 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
c0aea33576 refactor(): update directories to use kebab case (#27230)
Issue number: N/A

---------

<!-- Please refer to our contributing documentation for any questions on
submitting a pull request, or let us know here if you need any help:
https://ionicframework.com/docs/building/contributing -->

<!-- Some docs updates need to be made in the `ionic-docs` repo, in a
separate PR. See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#modifying-documentation
for details. -->

<!-- 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 team decided on some new processes for adding tests. One of those
processes is that test directories should use kebab case.

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

- Updates test directories to use kebab case

## 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. -->
2023-04-18 20:10:56 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
8c8908c49d test(many): use web-first assertions (#27113)
<!-- Please refer to our contributing documentation for any questions on
submitting a pull request, or let us know here if you need any help:
https://ionicframework.com/docs/building/contributing -->

<!-- Some docs updates need to be made in the `ionic-docs` repo, in a
separate PR. See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#modifying-documentation
for details. -->

<!-- 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. -->


<!-- Issues are required for both bug fixes and features. -->
Issue URL: N/A

Playwright recommends using Locators with web-first assertions instead
of using `waitForSelector`:
https://playwright.dev/docs/api/class-frame#frame-wait-for-selector


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

- Removes waitForSelector usages for checking if components are visible
in favor of the `toBeVisible` or `toBeHidden` assertions.

## 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. -->
2023-04-05 12:47:18 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
708ccbf808 chore(): sync with main 2023-03-01 11:22:56 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
70246d5182 chore(): sync with main 2023-03-01 09:03:59 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
df3735765a fix(button): update for ios spec (#26864)
BREAKING CHANGE:

Button is updated to align with the design specification for iOS.

**Design tokens**

| Token                              | Previous Value | New Value |
| ---------------------------------- | -------------- | --------- |
| `$button-ios-letter-spacing`       | `-0.03em`      | `0`       |
| `$button-ios-clear-letter-spacing` | `0`            | Removed   |
| `$button-ios-height`               | `2.8em`        | `3.1em`   |
| `$button-ios-border-radius`        | `10px`         | `14px`    |
| `$button-ios-large-height`         | `2.8em`        | `3.1em`   |
| `$button-ios-large-border-radius`  | `12px`         | `16px`    |
2023-02-28 11:36:44 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
c3b619f76f chore(): add updated snapshots 2023-02-22 15:40:01 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
799871e95d chore(): sync with main 2023-02-22 10:00:56 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
804e54e5ca test(many): migrate to new toHaveScreenshot API (#26797) 2023-02-16 11:37:29 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Sean Perkins
daa89a26ac feat(picker-column): assign custom aria-labels to column options (#26749) 2023-02-13 16:30:03 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
1a8bd6d8c6 chore(deps): update to stencil v3 (#26663) 2023-01-31 18:07:22 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
b78b454e08 revert(): revert base components feature (#26692)
The Ionic Framework team would like to re-evaluate our approach to improving customization options when building mobile applications. We are looking at other solutions that a) make customizing an app UI easier and b) are applicable to a broader set of developers.
2023-01-30 11:52:36 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
18f109c7da feat(base-components): add ability to remove ios and md theme (#26669) 2023-01-24 16:18:35 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
e8fb9e7328 chore(): sync with main 2023-01-23 13:38:16 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Amanda Johnston
c2e1ad385d chore(many): replace any types and add tech debt tickets (#26293)
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2023-01-06 09:34:55 -06:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
20829f54cd chore(): add updated snapshots 2022-12-20 16:03:24 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
d54b9dfdc0 chore(): sync with main 2022-12-20 10:44:26 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
bd05fccf58 test(config): update to playwright 1.29.0 (#26388) 2022-12-20 09:26:51 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
839a16f9eb chore(): add updated snapshots 2022-12-05 16:50:39 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
c0a8501657 feat(picker): add ability to use picker inline (#26336) 2022-11-22 15:33:47 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
0fbcc5b9a9 refactor(picker): remove refresh key (#26340)
BREAKING CHANGE:

The `refresh` key has been removed from the `PickerColumn` interface. Developers should use the `columns` property to refresh the `ion-picker` view.
2022-11-22 13:43:50 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Sean Perkins
c149b42d0b Merge remote-tracking branch 'origin/main' into sync-7-11-15-22 2022-11-15 15:40:21 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Amanda Johnston
00dc428fcf test(picker): migrate to Playwright (#26282) 2022-11-14 13:16:54 -06:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
322a1dbcd0 refactor(types): remove overlay attribute interfaces (#26181)
BREAKING CHANGE:

`ActionSheetAttributes`, `AlertAttributes`, `AlertTextareaAttributes`, `AlertInputAttributes`, `LoadingAttributes`, `ModalAttributes`, `PickerAttributes`, `PopoverAttributes`, and `ToastAttributes` have been removed. Developers should use `{ [key: string]: any }` instead.
2022-10-28 16:12:28 -04:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
827ab06d4d chore(picker): deprecate the refresh key (#25634)
resolves #25631
2022-07-14 10:20:15 -04:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
efe9e92984 chore(): update @stencil/sass, regenerate package-locks (#25441) 2022-06-09 13:45:48 -04:00 octicon-file-diff(16/) octicon-file-code(16/)
Sean Perkins
15c169043f chore(docs): remove manual documentation (#24984) 2022-04-21 12:31:51 -04:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
9fbaaf95eb chore(): simplify overlay attribute types (#25074) 2022-04-07 14:11:30 -04:00 octicon-file-diff(16/) octicon-file-code(16/)
Sean Perkins
83186598ed fix(picker-column): column renders correctly with selected value (#24988)
Resolves #17664
2022-04-04 14:46:57 -04:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
5676bab316 lint(eslint): migrate to eslint and prettier (#25046) 2022-04-04 11:12:53 -04:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
c90ce311a8 fix(datetime): wheel picker shows correct column order in rtl (#24546)
resolves #24378
2022-01-11 09:36:41 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
b3759aed5b fix(overlays): declarative modals now work properly with the hardware back button (#24165) 2021-11-05 10:04:13 -04:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
bd96a81ff8 feat(action-sheet, loading, modal, picker, popover): pass HTML attributes to host element (#23929) 2021-09-15 10:02:19 -04:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
50b88b24c2 chore(): run build to update picker readme (#23822) 2021-08-25 18:57:26 -04:00 octicon-file-diff(16/) octicon-file-code(16/)
Sarah Drasner
9317f6eb41 docs(picker): add a simple picker example for Vue (#23818)
There was previously no example for a vue picker, this adds one.

closes #2053
2021-08-25 17:50:33 -04:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
773bbcb211 fix(overlays): overlay interfaces are now exported from framework packages and documented (#23619)
resolves #22790
2021-07-15 08:50:50 -04:00 octicon-file-diff(16/) octicon-file-code(16/)
Ely Lucas
b83e00934e feat(react): add react hooks to control overlay components (#22484) 2021-03-01 11:34:13 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Brandy Carney
a9b2260100 test(core): add lang attr to html tag to resolve axe errors (#22410) 2020-11-02 17:08:03 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
fff4aec6cf fix(overlays): trap focus inside overlay components except toast (#21716)
fixes #21647
2020-07-22 12:09:31 -04:00 octicon-file-diff(16/) octicon-file-code(16/)
Adam Bradley
79518468dd fix(overlays): move prepareOverlay to connectedCallback
For custom elements builds, overlays cannot use hasAttribute() in the constructor, so moving it to connectedCallback instead.
2020-07-21 13:07:54 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexey Vinogradov
5bf83b80d7 feat(all): add optional generics typings for overlay component methods (#21393) 2020-06-03 09:08:27 -04:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
bb62023a0c fix(all): overlay components no longer display outline when focused (#21226) 2020-05-07 16:33:51 -04:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
fc2be8d08b fix(overlays): focus overlay when presented (#20997)
fixes #19882, fixes #17126
2020-04-28 16:43:00 -04:00 octicon-file-diff(16/) octicon-file-code(16/)
Manu MA
976e68da5b refactor(): minor updates for next stencil version (#20787) 2020-03-24 11:59:07 -04:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
b6c2a77deb fix(overlays): prevent accidental dismiss of overlays when tapping screen twice (#20683)
fixes #20608
2020-03-06 10:11:20 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Brandy Carney
33186ba716 fix(picker): include showBackdrop in interface (#20301)
fixes #18893
2020-01-27 11:20:32 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Brandy Carney
94159291b2 feat(components): improve button states and add new css properties (#19440)
Before users had to know the exact opacity that the MD/iOS spec called for in order to change the hover or focused background color. This allows them to change the background without having to know the opacity. 

- changes apply to Action Sheet (Buttons), Back Button, Button, FAB Button, Item, Menu Button, Segment Button, Tab Button
- greatly reduces the requirement by users to set the background hover, focused states for dark modes and custom themes, also eliminates the need to know what the hover opacity is for each based on the spec
- updates the MD dark theme per their spec
- adds a component guide for internal use changing Ionic components

references #18279 fixes #20213 fixes #19965

BREAKING CHANGE:

*Activated Class*

The `activated` class that is automatically added to buttons on press has been renamed to `ion-activated`. This will be more consistent with our `ion-focused` class we add and also will reduce conflicts with user's CSS.

*CSS Variables*

The `--background-hover`, `--background-focused` and `--background-activated` CSS variables on components that render native buttons will now have an opacity automatically set. If you are setting any of these like the following:

```
--background-hover: rgba(44, 44, 44, 0.08);
```

You will likely not see a hover state anymore. It should be updated to only set the desired color:

```
--background-hover: rgba(44, 44, 44);
```

If the opacity desired is something other than what the spec asks for, use:

```
--background-hover: rgba(44, 44, 44);
--background-hover-opacity: 1;
```
2020-01-23 16:57:47 -05:00 octicon-file-diff(16/) octicon-file-code(16/)