Compare commits

..

42 Commits

Author SHA1 Message Date
Liam DeBeasi
bc64f72109 chore: sync with main
chore: sync with main
2023-09-11 10:04:03 -04:00
Liam DeBeasi
474308618d Merge remote-tracking branch 'origin/main' into sync-feat-74 2023-09-11 09:23:16 -04:00
hoi4
19f3bb23fd feat: export TransitionOptions interface and getIonPageElement (#28140)
Issue number: resolves #28137

---------

Changes according to [this
comment](https://github.com/ionic-team/ionic-framework/issues/28137#issuecomment-1710283096)

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

@liamdebeasi Sorry for replacing the previous PR. I only copied the main
branch to my fork so I couldn't rebase properly. I am unfortunately not
extremely familiar with Github.

---------

Co-authored-by: Philipp Heuer <philipp@studysmarter.de>
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2023-09-11 08:53:56 -04:00
Liam DeBeasi
cd8d5091a1 feat(datetime): add disabled part (#28134) 2023-09-07 15:57:38 -04:00
Maria Hutt
e0542a7867 fix(menu): remove app dir from safe area padding (#28123)
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 `--ion-safe-area-left` and `--ion-safe-area-right` variables in
`ion-menu` are being set as if they use the app's direction. It's been
determined that safe area is not logical and uses the device's
direction. The current implementation is adding padding in the wrong
sides for `ion-toolbar` and `ion-content` within a `ion-menu`.

Additionally, `ion-menu` does not use the entire screen so the safe area
only needs to be applied to the side that is touching the device screen.

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

- Set the `--ion-safe-area-left` and `--ion-safe-area-right` variables
to the correct values based on the device's direction.
- Padding is only added to the side that is not in the safe area.
- `ion-toolbar` is adding `--ion-safe-area-left` and
`--ion-safe-area-right` based on the device's direction.
- `ion-toolbar` can now inherit the correct values from
`--ion-safe-area-left` and `--ion-safe-area-right`.
- `ion-content` can now inherit the correct values from
`--ion-safe-area-left` and `--ion-safe-area-right`.

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

Dev build: 7.3.4-dev.11694015543.18bc484f
2023-09-07 18:33:20 +00:00
Liam DeBeasi
4b4ad75bf0 chore: add error when no new diffs generated (#28132)
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. -->

When the "Update Reference Screenshot" job is run but no new screenshots
are generated, the following error is logged:

```
nothing added to commit but untracked files present (use "git add" to track)
Error: Process completed with exit code 1.
```

This is happening because there are no files to commit when running `git
commit`. Brandy noted that this was confusing since it doesn't actually
tell you why there are no files to commit.

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

- If there are no diffs to commit then the update screenshot script will
log a message saying that no screenshot diffs were generated.

Example:

```
⚠️ Error: No new screenshots generated ⚠️
This means that there were zero visual diffs when running screenshot tests.
Make sure you have pushed any code changes that would result in visual diffs.
```


https://github.com/ionic-team/ionic-framework/actions/runs/6099399582/job/16552017414

## 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-09-06 16:38:39 +00:00
Brandy Carney
79b005da70 feat(datetime): add parts for calendar day, active, and today (#27641)
Issue number: resolves #25340

---------

- Exposes the following parts for a calendar day: `calendar-day`,
`today`, and `active`
- Combines the `calendar-day-highlight` element with the `calendar-day`
element so developers don't have to know to style two different elements
& we don't have to expose them as separate parts
- Improves height parity of the calendar day across browsers
- Updates the `custom` e2e test to include an example of styling days
using the newly exposed CSS parts
- Adds tests for the focus states of the calendar day
2023-09-06 11:58:41 -04:00
dependabot[bot]
3c94cd18eb chore(deps): Bump @stencil/core from 4.1.0 to 4.2.0 in /core (#28124)
Bumps [@stencil/core](https://github.com/ionic-team/stencil) from 4.1.0
to 4.2.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/ionic-team/stencil/releases"><code>@​stencil/core</code>'s
releases</a>.</em></p>
<blockquote>
<h2>🌲 4.2.0 (2023-09-05)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>compiler:</strong> resolve implicit enum types (<a
href="https://redirect.github.com/ionic-team/stencil/issues/4739">#4739</a>)
(<a
href="f5a3bd8739">f5a3bd8</a>)</li>
<li><strong>runtime:</strong> patch methods for scoped slot
<code>append</code>, <code>prepend</code>, and
<code>insertAdjacent</code> (<a
href="https://redirect.github.com/ionic-team/stencil/issues/4719">#4719</a>)
(<a
href="1d98462135">1d98462</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li><strong>typescript:</strong> upgrade to TypeScript 5.1 (<a
href="https://redirect.github.com/ionic-team/stencil/pull/4718">#4718</a>)
(<a
href="49df0e7b9b">49df0e7</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/ionic-team/stencil/blob/main/CHANGELOG.md"><code>@​stencil/core</code>'s
changelog</a>.</em></p>
<blockquote>
<h1>🎺 <a
href="https://github.com/ionic-team/stencil/compare/v4.2.0-0...v4.2.0">4.2.0</a>
(2023-09-05)</h1>
<h3>Bug Fixes</h3>
<ul>
<li><strong>compiler:</strong> resolve implicit enum types (<a
href="https://redirect.github.com/ionic-team/stencil/issues/4739">#4739</a>)
(<a
href="f5a3bd8739">f5a3bd8</a>)</li>
<li><strong>runtime:</strong> patch methods for scoped slot
<code>append</code>, <code>prepend</code>, and
<code>insertAdjacent</code> (<a
href="https://redirect.github.com/ionic-team/stencil/issues/4719">#4719</a>)
(<a
href="1d98462135">1d98462</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li><strong>typescript:</strong> upgrade to TypeScript 5.1 (<a
href="https://redirect.github.com/ionic-team/stencil/pull/4718">#4718</a>)
(<a
href="49df0e7b9b">49df0e7</a>)</li>
</ul>
<h1>🐸 <a
href="https://github.com/ionic-team/stencil/compare/v4.1.0...v4.2.0-0">4.2.0-0</a>
(2023-09-05)</h1>
<h3>Bug Fixes</h3>
<ul>
<li><strong>compiler:</strong> resolve implicit enum types (<a
href="https://redirect.github.com/ionic-team/stencil/issues/4739">#4739</a>)
(<a
href="f5a3bd8739">f5a3bd8</a>)</li>
<li><strong>runtime:</strong> patch methods for scoped slot
<code>append</code>, <code>prepend</code>, and
<code>insertAdjacent</code> (<a
href="https://redirect.github.com/ionic-team/stencil/issues/4719">#4719</a>)
(<a
href="1d98462135">1d98462</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li><strong>typescript:</strong> upgrade to TypeScript 5.1 (<a
href="https://redirect.github.com/ionic-team/stencil/pull/4718">#4718</a>)
(<a
href="49df0e7b9b">49df0e7</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="44e10d2cdf"><code>44e10d2</code></a>
Release v4.2.0 (<a
href="https://redirect.github.com/ionic-team/stencil/issues/4758">#4758</a>)</li>
<li><a
href="817701c58f"><code>817701c</code></a>
Release v4.2.0-0 (<a
href="https://redirect.github.com/ionic-team/stencil/issues/4757">#4757</a>)</li>
<li><a
href="1d98462135"><code>1d98462</code></a>
fix(runtime): patch methods for scoped slot <code>append</code>,
<code>prepend</code>, and `insertA...</li>
<li><a
href="1567f8693a"><code>1567f86</code></a>
chore(snc): eliminate TS2774 errors (<a
href="https://redirect.github.com/ionic-team/stencil/issues/4750">#4750</a>)</li>
<li><a
href="efa93dd450"><code>efa93dd</code></a>
chore(snc): fix a single SNC error in
query-nonce-meta-tag-content.spec.ts (#...</li>
<li><a
href="ec0778d8e4"><code>ec0778d</code></a>
chore(deps): update dependency postcss to v8.4.29 (<a
href="https://redirect.github.com/ionic-team/stencil/issues/4754">#4754</a>)</li>
<li><a
href="29fa192edd"><code>29fa192</code></a>
chore(snc): drop snc count for serialize-css (<a
href="https://redirect.github.com/ionic-team/stencil/issues/4730">#4730</a>)</li>
<li><a
href="94009485a0"><code>9400948</code></a>
chore(deps): update dependency <code>@​rollup/pluginutils</code> to
v5.0.4 (<a
href="https://redirect.github.com/ionic-team/stencil/issues/4742">#4742</a>)</li>
<li><a
href="0f2db7dfa1"><code>0f2db7d</code></a>
chore(deps): update dependency <code>@​types/node</code> to v20.5.6 (<a
href="https://redirect.github.com/ionic-team/stencil/issues/4731">#4731</a>)</li>
<li><a
href="1482bc8b0a"><code>1482bc8</code></a>
chore(deps): update dependency <code>@​types/listr</code> to v0.14.5 (<a
href="https://redirect.github.com/ionic-team/stencil/issues/4751">#4751</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/ionic-team/stencil/compare/v4.1.0...v4.2.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@stencil/core&package-manager=npm_and_yarn&previous-version=4.1.0&new-version=4.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-06 15:35:23 +00:00
Liam DeBeasi
07ceb836f7 merge release-7.3.3
Release 7.3.3
2023-09-06 10:01:08 -04:00
ionitron
7dbce4fc09 chore(): update package lock files 2023-09-06 13:24:04 +00:00
ionitron
3de1dd3c14 v7.3.3 2023-09-06 13:23:50 +00:00
Sean Perkins
ea23129e61 chore: disable codeflow for pull requests (#28101)
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. -->

Team isn't using the integration. 

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

- Disables the Codeflow integration on pull requests

## 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-09-06 01:57:20 +00:00
Liam DeBeasi
7b551fd54b fix(react): overlay content is shown with hook (#28109)
Issue number: resolves #28102

---------

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

When one modal is added and another modal is removed, the modal that is
removed does not account for the newly added modal when updating the
overlay context in React. As a result, the inner contents of the newly
added modal is not mounted.

We originally tried to fix this in
https://github.com/ionic-team/ionic-framework/pull/24553, but the fix
was not complete. While storing the latest information in a React ref
was correct, the way we updated the ref was done in a way such that data
was still stale.

In particular, the `overlaysRef` is updated whenever `IonOverlayManager`
is re-rendered. State updates are batched, so updating the state twice
in quick succession does not necessarily result in 2 separate renders.

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

- We need to make sure the ref is updated synchronously before any
render so that `addOverlay` and `removeOverlay` always have access to
the latest data.
- Added a test

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

Dev build: `7.3.3-dev.11693592339.18e000af`

---------

Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
Co-authored-by: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com>
2023-09-05 21:04:27 +00:00
Liam DeBeasi
176585f446 fix(modal): swipe to dismiss resets status bar style (#28110)
Issue number: resolves #28105

---------

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

When swiping to dismiss the card modal, the status bar style is reset
too late. Since we are using 1 animation for the card modal, the dismiss
animation is played _then_ the `dismiss` method is called (which resets
the status bar style). This means the status bar style is wrong for the
duration of the dismiss animation.

This does not impact dragging to close the modal such that the status
bar changes mid-gesture or calling the `dismiss` method directly -- only
quickly swiping to dismiss.

Also one of the changes in core/src/components/modal/modal.tsx
accidentally changed the modal behavior so that the status bar is
changed _after_ the present transition finishes.

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

- When the card modal is swiped to dismiss the `onDismiss` callback will
also reset the status bar style.
- When the card modal is presented the status bar is set correctly as
the animation begins

| `main` | branch |
| - | - |
| <video
src="https://github.com/ionic-team/ionic-framework/assets/2721089/8a18419d-a7ec-4629-8632-62e2ed401912"></video>
| <video
src="https://github.com/ionic-team/ionic-framework/assets/2721089/62ffcf00-8dbd-4e0c-83a3-5af5d463bccc"></video>
|


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


Dev build: `7.3.3-dev.11693592322.138d91e6`
2023-09-05 16:15:30 +00:00
Sean Perkins
38c4da3353 chore(ci): use node v18 for github actions (#28103)
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. -->

`action/setup-node@v3` shipped a "breaking" change that requires node
v18. This breaks our dev build release process.


https://github.com/ionic-team/ionic-framework/actions/runs/6044495970/job/16403194005

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

- Updates the publish action to use node v18

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

Here is a successful run with these changes:
https://github.com/ionic-team/ionic-framework/actions/runs/6044521110
2023-09-01 17:57:10 +00:00
Sean Perkins
f74ad6300d test(progress-bar): remove range from basic screenshot tests (#28035)
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. -->

The progress bar basic test makes use of the `ion-range` component in
the captured screenshot. This results in tight coupling when the
appearance of the range changes.

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

- Decouples `ion-range` from the progress bar basic screenshot captures
- Splits out dynamic behavior that was used with `ion-range` to test
files that can be manually interacted with

## 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-09-01 17:08:40 +00:00
Maria Hutt
e6c7bb60e7 feat(checkbox, radio, toggle, range): stacked labels for form controls (#28075)
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
Co-authored-by: ionitron <hi@ionicframework.com>
2023-09-01 09:30:59 -07:00
Maria Hutt
a079d202c5 test(radio): correct screenshot name from toggle (#28099)
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. -->

Radio has a test with the wrong screenshot name of toggle.

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

- Radio has a test with the correct screenshot name.

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

N/A
2023-09-01 15:04:25 +00:00
Liam DeBeasi
6d4eabcc10 fix(textarea): cols property is respected (#28081)
Issue number: resolves #22142

---------

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

Textarea always takes up the entire width of a line which prevents the
`cols` property from working correctly.

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

- The textarea respects the `col` property value only when `autoGrow` is
`false`

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

Dev build: `7.3.2-dev.11693402720.1adb3bcf`

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2023-09-01 14:56:41 +00:00
Liam DeBeasi
3086c9c1ad chore: add lint rule to block toMatchSnapshot usage (#28091)
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. -->

In addition to migrating away from `toMatchSnapshot` as found in PRs
such as https://github.com/ionic-team/ionic-framework/pull/28083, I
think it would be valuable to have a lint rule to prevent developers
from accidentally using this API in the future.

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

- Adds a lint rule which errors if `toMatchSnapshot` is being used in
`*.e2e.ts` files.

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

~Note: This PR's lint step will continue to fail until the remaining
`toHaveScreenshot` migration PRs have been merged. Do note merge this PR
until that has been completed.~ All set!

---------

Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2023-09-01 14:26:23 +00:00
Liam DeBeasi
cbafa6b40d chore: sync with main
chore: sync with main
2023-09-01 10:12:12 -04:00
Liam DeBeasi
e6c09291f5 Merge remote-tracking branch 'origin/main' into sync-feature-7.4 2023-09-01 09:51:09 -04:00
Maria Hutt
63cb96831e docs(angular): update README for clear directory paths (#28098)
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. -->

- The instructions doesn't provide clear directory paths for syncing
local changes.

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

- The instructions has clear directory paths for syncing local changes.
- Switched to the `[!NOTE]` for notes.

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

N/A
2023-08-31 22:46:29 +00:00
Liam DeBeasi
7dc9d2d55e test(textarea): migrate to toHaveScreenshot (#28087)
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. -->

Several tests for this component are still using Playwright's old
`toMatchSnapshot` assertion. It's now recommended to use the newer
`toHaveScreenshot` assertion. This new assertion reduces the size of
each screenshot and brings anti-flake improvements such as disabling
animations by default.

We previously migrated most of our codebase to use `toHaveScreenshot`,
but it looks like we missed the tests that were written during the
development of Ionic 7 in a separate branch off `main`.

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

- Migrate component tests to use `toHaveScreenshot`.

Note: There should be no layout changes to any of the screenshots. The
only difference between the old and new screenshots should be image and
file size.

## 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-08-31 16:48:17 +00:00
Sean Perkins
c8d214a82c chore(vue): add missing routerAnimation type (#28094)
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. -->

The Vue Router implementation [assigns data to the `routerAnimation` on
the view
item](cddefd1548/packages/vue/src/components/IonRouterOutlet.ts (L165-L170)),
but the [type does not exist on the `ViewItem`
interface](https://github.com/ionic-team/ionic-framework/blob/main/packages/vue-router/src/types.ts#L62-L76).
The actual routing implementation does not make use of the type, but
this is backfilling the information when we wire up the types to the
implementation.

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

- Adds the missing type for `routerAnimation` to the `ViewItem`

## 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-08-31 16:45:06 +00:00
Shawn Taylor
584e9d3be2 fix(overlays): prevent overlays from getting stuck open (#28069)
Issue number: resolves #27200 

---------

<!-- 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. -->
A bug occurs when you click twice quickly to open an overlay with a
small timeout. In some cases, the overlay will present, dismiss,
present, then not dismiss the second time, getting stuck open. You can
reproduce manually this by grabbing the test HTML included in this PR
and putting it in a branch that doesn't include a fix.

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

- When an overlay with a short timeout is triggered twice quickly, it
will open-close-open-close.
- The behavior is the same for all overlay components

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

Relevant links:
* https://github.com/ionic-team/ionic-framework/issues/27200
* https://ionic-cloud.atlassian.net/browse/FW-4374
* https://ionic-cloud.atlassian.net/browse/FW-4053

I'm not sure how to write an automated test for this bug due to the
short timeout required.

You can manually test the fix in [this
Stackblitz](https://stackblitz.com/edit/g1kjci?file=package.json) by
changing the Ionic version between 7.3.1 and
7.3.2-dev.11693262117.17edbf6d

---------

Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2023-08-31 16:30:43 +00:00
Liam DeBeasi
e1fdbb344a test(datetime): un-flake presentation test (#28090)
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 two problems with this test:

1. The screenshots are not capturing the correct UI. For example, the
following screenshot should capture the date and time grid picker, but
it's only capturing the year wheel picker:
8ab3476ac7/core/src/components/datetime/test/presentation/datetime.e2e.ts-snapshots/datetime-presentation-date-time-diff-ios-rtl-Mobile-Safari-linux.png
2. These screenshots are flaky. This is possibly due to how they were
written where they iterate through an array, select a value from the
`select`, and then wait a timeout for the view to change.
3. I also discovered that we'll have some visual diffs once 2024 hits.
The current value of the datetime on the wheel picker is 2022. 2023 is
shown, but 2024 is not (since we are still in 2023). Once Jan 1 2024
hits, these tests will likely start to fail with visual diffs.

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

- Refactored these tests to use a test fixture where each presentation
is a separate test. This ensures that the tests are correct. Because
there is less interaction going on with the page (i.e. the correct
presentation is set on load), my hope is that this also reduces test
flakiness.
- Also changed the date used to be several years ago so we don't have
new years showing up in the wheel picker screenshots as time goes on.

## 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-08-31 16:03:41 +00:00
Liam DeBeasi
2a80eb6bd0 fix(popover): dynamic width popover is positioned correctly (#28072)
Issue number: resolves #27190, resolves #24780

---------

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

Popovers with dynamic widths were not being positioned correctly
relative to the trigger element. This was happening because the child
component always had dimensions of 0 x 0. Ionic has logic built-in to
wait for the child components to be rendered, but this was not working
as intended for two reasons:

1. `this.usersElement` was referencing the popover element itself not
the user’s component. When calling `deepReady` on
01fc9b4511/core/src/components/popover/popover.tsx (L477)
we are waiting for the popover to be hydrated, not the child content.
The popover was already hydrated on page load, so this resolves
immediately. However, the child content that was just added to the DOM
has not yet been hydrated, so we aren’t waiting long enough.

This is happening because we return `BaseComponent `from
`attachComponent` which is a reference to the overlay:
01fc9b4511/core/src/utils/framework-delegate.ts (L133)

Other framework delegates return the actual child content:

- Core delegate with controller:
01fc9b4511/core/src/utils/framework-delegate.ts (L35)
(this is part of why the controller popover works but the inline popover
does not)
- React delegate:
01fc9b4511/packages/react/src/framework-delegate.tsx (L31)
- Vue delegate:
01fc9b4511/packages/vue/src/framework-delegate.ts (L45)

2. `attachComponent` is unable to return the correct element currently
because the child content has not been mounted yet in this scenario.
`ionMount` is emitted after `attachComponent` resolves:
01fc9b4511/core/src/components/popover/popover.tsx (L466)

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

- `ionMount` is emitted before `attachComponent` runs
- `attachComponent` now consistently returns the child view if present
in the DOM
- Added a test

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

Dev build: `7.3.2-dev.11693321763.15a54694`

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2023-08-31 13:10:36 +00:00
Liam DeBeasi
cddefd1548 test(input): migrate input to toHaveScreenshot (#28084)
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. -->

Several tests for this component are still using Playwright's old
`toMatchSnapshot` assertion. It's now recommended to use the newer
`toHaveScreenshot` assertion. This new assertion reduces the size of
each screenshot and brings anti-flake improvements such as disabling
animations by default.

We previously migrated most of our codebase to use `toHaveScreenshot`,
but it looks like we missed the tests that were written during the
development of Ionic 7 in a separate branch off `main`.

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

- Migrate component tests to use `toHaveScreenshot`.

Note: There should be no layout changes to any of the screenshots. The
only difference between the old and new screenshots should be image and
file size.

## 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-08-30 20:59:51 +00:00
Liam DeBeasi
437ef16d1d test(select): migrate to toHaveScreenshot (#28088)
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. -->

Several tests for this component are still using Playwright's old
`toMatchSnapshot` assertion. It's now recommended to use the newer
`toHaveScreenshot` assertion. This new assertion reduces the size of
each screenshot and brings anti-flake improvements such as disabling
animations by default.

We previously migrated most of our codebase to use `toHaveScreenshot`,
but it looks like we missed the tests that were written during the
development of Ionic 7 in a separate branch off `main`.

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

- Migrate component tests to use `toHaveScreenshot`.

Note: There should be no layout changes to any of the screenshots. The
only difference between the old and new screenshots should be image and
file size.

## 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-08-30 20:40:17 +00:00
Liam DeBeasi
7babf6178c test(datetime): remove duplicate test (#28092)
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. -->

That particular test is flaky. When going to try and fix the flakiness,
I realized that this behavior is already tested by another test. This
test presents the `ion-picker-internal` components which are also tested
in
7c2b6aed05/core/src/components/datetime/test/custom/datetime.e2e.ts (L10).
These show the same components which have the same APIs, so this test
shouldn't even be needed.

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

- Removed the duplicate test

## 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-08-30 19:16:08 +00:00
Liam DeBeasi
271b90deca test(toggle): migrate to toHaveScreenshot (#28086)
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. -->

Several tests for this component are still using Playwright's old
`toMatchSnapshot` assertion. It's now recommended to use the newer
`toHaveScreenshot` assertion. This new assertion reduces the size of
each screenshot and brings anti-flake improvements such as disabling
animations by default.

We previously migrated most of our codebase to use `toHaveScreenshot`,
but it looks like we missed the tests that were written during the
development of Ionic 7 in a separate branch off `main`.

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

- Migrate component tests to use `toHaveScreenshot`.

Note: There should be no layout changes to any of the screenshots. The
only difference between the old and new screenshots should be image and
file size.

## 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-08-30 18:11:07 +00:00
Liam DeBeasi
9dfdfe2ed6 test(checkbox): migrate to toHaveScreenshot (#28085)
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. -->

Several tests for this component are still using Playwright's old
`toMatchSnapshot` assertion. It's now recommended to use the newer
`toHaveScreenshot` assertion. This new assertion reduces the size of
each screenshot and brings anti-flake improvements such as disabling
animations by default.

We previously migrated most of our codebase to use `toHaveScreenshot`,
but it looks like we missed the tests that were written during the
development of Ionic 7 in a separate branch off `main`.

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

- Migrate component tests to use `toHaveScreenshot`.

Note: There should be no layout changes to any of the screenshots. The
only difference between the old and new screenshots should be image and
file size.

## 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-08-30 16:33:11 +00:00
Liam DeBeasi
0f5ce8e329 test(range): migrate to toHaveScreenshot (#28089)
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. -->

Several tests for this component are still using Playwright's old
`toMatchSnapshot` assertion. It's now recommended to use the newer
`toHaveScreenshot` assertion. This new assertion reduces the size of
each screenshot and brings anti-flake improvements such as disabling
animations by default.

We previously migrated most of our codebase to use `toHaveScreenshot`,
but it looks like we missed the tests that were written during the
development of Ionic 7 in a separate branch off `main`.

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

- Migrate component tests to use `toHaveScreenshot`.

Note: There should be no layout changes to any of the screenshots. The
only difference between the old and new screenshots should be image and
file size.

## 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-08-30 15:20:35 +00:00
Liam DeBeasi
abc8118ef6 test(radio): migrate to toHaveScreenshot (#28083)
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. -->

Several tests for this component are still using Playwright's old
`toMatchSnapshot` assertion. It's now recommended to use the newer
`toHaveScreenshot` assertion. This new assertion reduces the size of
each screenshot and brings anti-flake improvements such as disabling
animations by default.

We previously migrated most of our codebase to use `toHaveScreenshot`,
but it looks like we missed the tests that were written during the
development of Ionic 7 in a separate branch off `main`.

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

- Migrate component tests to use `toHaveScreenshot`.

Note: There should be no layout changes to any of the screenshots. The
only difference between the old and new screenshots should be image and
file size.

## 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-08-30 15:18:27 +00:00
Liam DeBeasi
f379c72d92 chore: remove deprecated attribute selectors (#28082)
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. -->

The `text-wrap` attribute was removed in Ionic v5, but references to it
still exist in the `ion-label` stylesheets.


https://github.com/ionic-team/ionic-framework/blob/main/BREAKING_ARCHIVE/v5.md#css-utilities

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

- Removed references to the unsupported `text-wrap` attributed.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

Note: This is not a breaking change because support for `text-wrap` was
removed in Ionic v5.

<!-- 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-08-30 14:53:50 +00:00
Liam DeBeasi
8ab3476ac7 merge release-7.3.2
Release 7.3.2
2023-08-30 08:09:57 -05:00
ionitron
a25c38223c chore(): update package lock files 2023-08-30 12:48:07 +00:00
Liam DeBeasi
21b0731cf2 chore: sync with main
chore: sync with main
2023-08-29 09:23:58 -05:00
Liam DeBeasi
b655067867 chore: sync with main 2023-08-29 09:58:37 -04:00
Amanda Johnston
32244fbdd1 fix(datetime): scroll to newly selected date when value changes (#27806)
Issue number: Resolves #26391

---------

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

When updating the `value` programmatically on an `ion-datetime` after it
has already been created:
- With grid style: The selected date visually updates, but the calendar
does not scroll to the newly selected month.
- With wheel style: The selected date does not visually update, i.e. the
wheels do not move to show the newly selected date.

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

- Grid style datetimes now scroll to the selected date using the same
animation as when clicking the next/prev month buttons.
- This animation mirrors the behavior in both MUI and native iOS. See
the [design
doc](https://github.com/ionic-team/ionic-framework-design-documents/blob/main/projects/ionic-framework/components/datetime/0003-datetime-async-value.md)
for more information and screen recordings.
- The animation will not occur if the month/year did not change, or when
the datetime is hidden.
- Wheel style datetimes now visually update to the selected date. No
animation occurs, also mirroring native.
- The `parseDate` util has also had its type signatures updated to
account for returning `undefined` when the date string is improperly
formatted. This was missed when the util was refactored to support
multiple date selection.

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

- Docs PR: https://github.com/ionic-team/ionic-docs/pull/3053
- While this can technically be considered a bug fix, we are merging it
into a feature branch for safety; it's a fairly significant change to
how datetime behaves, and may interfere with custom logic when updating
a datetime's value async.
- Jumping to the newly selected value is handled by replacing everything
[here](https://github.com/ionic-team/ionic-framework/pull/27806/files#diff-4a407530c60e3cf72bcc11acdd21c4803a94bf47ea81b99e757db1c93d2735b8L364-L407)
with `processValue()`. This covers both wheel and grid datetimes.
- `activePartsClone` as a whole was also removed. It was added in
https://github.com/ionic-team/ionic-framework/pull/24244 to enable
changing `activeParts` without triggering a rerender (and thus jumping
to the new value) but since we now want to do that jump, the clone is no
longer needed.
- The animation code might be tricky to follow, so I recorded going
through it:
https://github.com/ionic-team/ionic-framework/assets/90629384/1afa5762-f493-441a-b662-f0429f2d86a7
2023-08-23 13:49:19 -05:00
Liam DeBeasi
ae9f1ab43e refactor(toast): deprecate cssClass on ToastButton (#27959) 2023-08-23 09:21:20 -04:00
1967 changed files with 2549 additions and 1007 deletions

View File

@@ -5,7 +5,7 @@ runs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- name: Install Angular Server Dependencies
run: npm ci

View File

@@ -5,7 +5,7 @@ runs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core

View File

@@ -11,7 +11,7 @@ runs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- name: Install Dependencies
run: npm ci

View File

@@ -6,7 +6,7 @@ runs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- name: Install Dependencies
run: npm install
working-directory: ./core

View File

@@ -5,7 +5,7 @@ runs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core

View File

@@ -5,7 +5,7 @@ runs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core

View File

@@ -5,7 +5,7 @@ runs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core

View File

@@ -5,7 +5,7 @@ runs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core

View File

@@ -21,7 +21,7 @@ runs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
# Provenance requires npm 9.5.0+
- name: Install latest npm
run: npm install -g npm@latest

View File

@@ -5,7 +5,7 @@ runs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- uses: ./.github/workflows/actions/download-archive
with:

View File

@@ -5,7 +5,7 @@ runs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- name: Install Dependencies
run: npm ci
working-directory: ./core

View File

@@ -13,7 +13,7 @@ runs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core

View File

@@ -8,7 +8,7 @@ runs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- name: Install Dependencies
run: npm ci
working-directory: ./core

View File

@@ -8,7 +8,7 @@ runs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core

View File

@@ -8,7 +8,7 @@ runs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core

View File

@@ -8,7 +8,7 @@ runs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core

View File

@@ -9,7 +9,7 @@ runs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- uses: actions/download-artifact@v3
with:
path: ./artifacts
@@ -35,7 +35,16 @@ runs:
git config user.name ionitron
git config user.email hi@ionicframework.com
git add src/\*.png --force
git commit -m "chore(): add updated snapshots"
git push
if git diff --exit-code; then
echo -e "\033[1;31m⚠ Error: No new screenshots generated ⚠️\033[0m"
echo -e "\033[1;31mThis means that there were zero visual diffs when running screenshot tests.\033[0m"
echo -e "\033[1;31mMake sure you have pushed any code changes that would result in visual diffs.\033[0m"
exit 1
else
git commit -m "chore(): add updated snapshots"
git push
fi
shell: bash
working-directory: ./core

View File

@@ -4,7 +4,7 @@
"enabled": false
},
"pullRequests": {
"enabled": true
"enabled": false
}
}
}

View File

@@ -3,6 +3,21 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [7.3.3](https://github.com/ionic-team/ionic-framework/compare/v7.3.2...v7.3.3) (2023-09-06)
### Bug Fixes
* **modal:** swipe to dismiss resets status bar style ([#28110](https://github.com/ionic-team/ionic-framework/issues/28110)) ([176585f](https://github.com/ionic-team/ionic-framework/commit/176585f446b04a6a0cedab2e09417637dbfc78ee)), closes [#28105](https://github.com/ionic-team/ionic-framework/issues/28105)
* **overlays:** prevent overlays from getting stuck open ([#28069](https://github.com/ionic-team/ionic-framework/issues/28069)) ([584e9d3](https://github.com/ionic-team/ionic-framework/commit/584e9d3be220343451c2d4b9bf90658ecd530de1)), closes [#27200](https://github.com/ionic-team/ionic-framework/issues/27200)
* **popover:** dynamic width popover is positioned correctly ([#28072](https://github.com/ionic-team/ionic-framework/issues/28072)) ([2a80eb6](https://github.com/ionic-team/ionic-framework/commit/2a80eb6bd0b16a9dab9bea600bb7f935d25c0e1b)), closes [#27190](https://github.com/ionic-team/ionic-framework/issues/27190) [#24780](https://github.com/ionic-team/ionic-framework/issues/24780)
* **react:** overlay content is shown with hook ([#28109](https://github.com/ionic-team/ionic-framework/issues/28109)) ([7b551fd](https://github.com/ionic-team/ionic-framework/commit/7b551fd54b9e16a2538e5b82a13d72b3007fa045)), closes [#28102](https://github.com/ionic-team/ionic-framework/issues/28102)
* **textarea:** cols property is respected ([#28081](https://github.com/ionic-team/ionic-framework/issues/28081)) ([6d4eabc](https://github.com/ionic-team/ionic-framework/commit/6d4eabcc1046c28c1abf69a8bda3e06f80cf3f8f)), closes [#22142](https://github.com/ionic-team/ionic-framework/issues/22142)
## [7.3.2](https://github.com/ionic-team/ionic-framework/compare/v7.3.1...v7.3.2) (2023-08-30)

View File

@@ -46,7 +46,8 @@ module.exports = {
{
"files": ["*.e2e.ts"],
"rules": {
"custom-rules/await-playwright-promise-assertion": "error"
"custom-rules/await-playwright-promise-assertion": "error",
"custom-rules/no-playwright-to-match-snapshot-assertion": "error"
}
}
]

View File

@@ -3,6 +3,20 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [7.3.3](https://github.com/ionic-team/ionic-framework/compare/v7.3.2...v7.3.3) (2023-09-06)
### Bug Fixes
* **modal:** swipe to dismiss resets status bar style ([#28110](https://github.com/ionic-team/ionic-framework/issues/28110)) ([176585f](https://github.com/ionic-team/ionic-framework/commit/176585f446b04a6a0cedab2e09417637dbfc78ee)), closes [#28105](https://github.com/ionic-team/ionic-framework/issues/28105)
* **overlays:** prevent overlays from getting stuck open ([#28069](https://github.com/ionic-team/ionic-framework/issues/28069)) ([584e9d3](https://github.com/ionic-team/ionic-framework/commit/584e9d3be220343451c2d4b9bf90658ecd530de1)), closes [#27200](https://github.com/ionic-team/ionic-framework/issues/27200)
* **popover:** dynamic width popover is positioned correctly ([#28072](https://github.com/ionic-team/ionic-framework/issues/28072)) ([2a80eb6](https://github.com/ionic-team/ionic-framework/commit/2a80eb6bd0b16a9dab9bea600bb7f935d25c0e1b)), closes [#27190](https://github.com/ionic-team/ionic-framework/issues/27190) [#24780](https://github.com/ionic-team/ionic-framework/issues/24780)
* **textarea:** cols property is respected ([#28081](https://github.com/ionic-team/ionic-framework/issues/28081)) ([6d4eabc](https://github.com/ionic-team/ionic-framework/commit/6d4eabcc1046c28c1abf69a8bda3e06f80cf3f8f)), closes [#22142](https://github.com/ionic-team/ionic-framework/issues/22142)
## [7.3.2](https://github.com/ionic-team/ionic-framework/compare/v7.3.1...v7.3.2) (2023-08-30)

View File

@@ -289,12 +289,13 @@ ion-card-title,prop,mode,"ios" | "md",undefined,false,false
ion-card-title,css-prop,--color
ion-checkbox,shadow
ion-checkbox,prop,alignment,"center" | "start",'center',false,false
ion-checkbox,prop,checked,boolean,false,false,false
ion-checkbox,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record<never, never> | undefined,undefined,false,true
ion-checkbox,prop,disabled,boolean,false,false,false
ion-checkbox,prop,indeterminate,boolean,false,false,false
ion-checkbox,prop,justify,"end" | "space-between" | "start",'space-between',false,false
ion-checkbox,prop,labelPlacement,"end" | "fixed" | "start",'start',false,false
ion-checkbox,prop,labelPlacement,"end" | "fixed" | "stacked" | "start",'start',false,false
ion-checkbox,prop,legacy,boolean | undefined,undefined,false,false
ion-checkbox,prop,mode,"ios" | "md",undefined,false,false
ion-checkbox,prop,name,string,this.inputId,false,false
@@ -427,6 +428,10 @@ ion-datetime,css-prop,--background-rgb
ion-datetime,css-prop,--title-color
ion-datetime,css-prop,--wheel-fade-background-rgb
ion-datetime,css-prop,--wheel-highlight-background
ion-datetime,part,calendar-day
ion-datetime,part,calendar-day active
ion-datetime,part,calendar-day disabled
ion-datetime,part,calendar-day today
ion-datetime,part,month-year-button
ion-datetime,part,time-button
ion-datetime,part,time-button active
@@ -1008,10 +1013,11 @@ ion-progress-bar,part,stream
ion-progress-bar,part,track
ion-radio,shadow
ion-radio,prop,alignment,"center" | "start",'center',false,false
ion-radio,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record<never, never> | undefined,undefined,false,true
ion-radio,prop,disabled,boolean,false,false,false
ion-radio,prop,justify,"end" | "space-between" | "start",'space-between',false,false
ion-radio,prop,labelPlacement,"end" | "fixed" | "start",'start',false,false
ion-radio,prop,labelPlacement,"end" | "fixed" | "stacked" | "start",'start',false,false
ion-radio,prop,legacy,boolean | undefined,undefined,false,false
ion-radio,prop,mode,"ios" | "md",undefined,false,false
ion-radio,prop,name,string,this.inputId,false,false
@@ -1038,7 +1044,7 @@ ion-range,prop,debounce,number | undefined,undefined,false,false
ion-range,prop,disabled,boolean,false,false,false
ion-range,prop,dualKnobs,boolean,false,false,false
ion-range,prop,label,string | undefined,undefined,false,false
ion-range,prop,labelPlacement,"end" | "fixed" | "start",'start',false,false
ion-range,prop,labelPlacement,"end" | "fixed" | "stacked" | "start",'start',false,false
ion-range,prop,legacy,boolean | undefined,undefined,false,false
ion-range,prop,max,number,100,false,false
ion-range,prop,min,number,0,false,false
@@ -1364,7 +1370,7 @@ ion-textarea,prop,autocapitalize,string,'none',false,false
ion-textarea,prop,autofocus,boolean,false,false,false
ion-textarea,prop,clearOnEdit,boolean,false,false,false
ion-textarea,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record<never, never> | undefined,undefined,false,true
ion-textarea,prop,cols,number | undefined,undefined,false,false
ion-textarea,prop,cols,number | undefined,undefined,false,true
ion-textarea,prop,counter,boolean,false,false,false
ion-textarea,prop,counterFormatter,((inputLength: number, maxLength: number) => string) | undefined,undefined,false,false
ion-textarea,prop,debounce,number | undefined,undefined,false,false
@@ -1478,12 +1484,13 @@ ion-toast,part,icon
ion-toast,part,message
ion-toggle,shadow
ion-toggle,prop,alignment,"center" | "start",'center',false,false
ion-toggle,prop,checked,boolean,false,false,false
ion-toggle,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record<never, never> | undefined,undefined,false,true
ion-toggle,prop,disabled,boolean,false,false,false
ion-toggle,prop,enableOnOffLabels,boolean | undefined,config.get('toggleOnOffLabels'),false,false
ion-toggle,prop,justify,"end" | "space-between" | "start",'space-between',false,false
ion-toggle,prop,labelPlacement,"end" | "fixed" | "start",'start',false,false
ion-toggle,prop,labelPlacement,"end" | "fixed" | "stacked" | "start",'start',false,false
ion-toggle,prop,legacy,boolean | undefined,undefined,false,false
ion-toggle,prop,mode,"ios" | "md",undefined,false,false
ion-toggle,prop,name,string,this.inputId,false,false

View File

@@ -1,6 +1,7 @@
module.exports = {
rules: {
'no-component-on-ready-method': require('./no-component-on-ready-method.js'),
'await-playwright-promise-assertion': require('./await-playwright-promise-assertion.js')
'await-playwright-promise-assertion': require('./await-playwright-promise-assertion.js'),
'no-playwright-to-match-snapshot-assertion': require('./no-playwright-to-match-snapshot-assertion.js')
}
}

View File

@@ -0,0 +1,29 @@
module.exports = {
meta: {
messages: {
noPlaywrightToMatchSnapshotAssertion: '"toHaveScreenshot" assertions should be used in favor of "toMatchSnapshot". "toHaveScreenshot" brings file size reductions and anti-flake behaviors such as disabling animations by default.',
},
},
create(context) {
return {
ExpressionStatement(node) {
if (node.expression.callee === undefined) {
return;
}
const { property } = node.expression.callee;
/**
* Check to see if toMatchSnapshot is being used
*/
if (
property !== undefined &&
property.type === 'Identifier' &&
property.name === 'toMatchSnapshot'
) {
context.report({ node: node, messageId: 'noPlaywrightToMatchSnapshotAssertion' });
}
}
}
}
};

18
core/package-lock.json generated
View File

@@ -1,15 +1,15 @@
{
"name": "@ionic/core",
"version": "7.3.2",
"version": "7.3.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/core",
"version": "7.3.2",
"version": "7.3.3",
"license": "MIT",
"dependencies": {
"@stencil/core": "^4.1.0",
"@stencil/core": "^4.2.0",
"ionicons": "7.1.0",
"tslib": "^2.1.0"
},
@@ -1634,9 +1634,9 @@
}
},
"node_modules/@stencil/core": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.1.0.tgz",
"integrity": "sha512-yIpL+CX02fy5zvFXwXcHZjjEILRm3aiONbucpfLIWPS7zcBAuucdROssartEa+D7E1JRko97ydxn1Ntdu4GoWg==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.2.0.tgz",
"integrity": "sha512-HhxRs/b/VHTCM35lunFCzYajRQeYezsJQGgalENNpkrKUOPMvzv0dalXe8Yn/8p9eyn+GZVZuWLd0CAR4VWBbA==",
"bin": {
"stencil": "bin/stencil"
},
@@ -11524,9 +11524,9 @@
"requires": {}
},
"@stencil/core": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.1.0.tgz",
"integrity": "sha512-yIpL+CX02fy5zvFXwXcHZjjEILRm3aiONbucpfLIWPS7zcBAuucdROssartEa+D7E1JRko97ydxn1Ntdu4GoWg=="
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.2.0.tgz",
"integrity": "sha512-HhxRs/b/VHTCM35lunFCzYajRQeYezsJQGgalENNpkrKUOPMvzv0dalXe8Yn/8p9eyn+GZVZuWLd0CAR4VWBbA=="
},
"@stencil/react-output-target": {
"version": "0.5.3",

View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/core",
"version": "7.3.2",
"version": "7.3.3",
"description": "Base components for Ionic",
"keywords": [
"ionic",
@@ -31,7 +31,7 @@
"loader/"
],
"dependencies": {
"@stencil/core": "^4.1.0",
"@stencil/core": "^4.2.0",
"ionicons": "7.1.0",
"tslib": "^2.1.0"
},

View File

@@ -55,9 +55,6 @@ const config: PlaywrightTestConfig = {
timeout: 5000,
toHaveScreenshot: {
threshold: 0.1
},
toMatchSnapshot: {
threshold: 0.1
}
},
/* Fail the build on CI if you accidentally left test.only in the source code. */

View File

@@ -602,6 +602,10 @@ export namespace Components {
"mode"?: "ios" | "md";
}
interface IonCheckbox {
/**
* How to control the alignment of the checkbox and label on the cross axis. `"start"`: The label and control will appear on the left of the cross axis in LTR, and on the right side in RTL. `"center"`: The label and control will appear at the center of the cross axis in both LTR and RTL.
*/
"alignment": 'start' | 'center';
/**
* If `true`, the checkbox is selected.
*/
@@ -623,9 +627,9 @@ export namespace Components {
*/
"justify": 'start' | 'end' | 'space-between';
/**
* Where to place the label relative to the checkbox. `"start"`: The label will appear to the left of the checkbox in LTR and to the right in RTL. `"end"`: The label will appear to the right of the checkbox in LTR and to the left in RTL. `"fixed"`: The label has the same behavior as `"start"` except it also has a fixed width. Long text will be truncated with ellipses ("...").
* Where to place the label relative to the checkbox. `"start"`: The label will appear to the left of the checkbox in LTR and to the right in RTL. `"end"`: The label will appear to the right of the checkbox in LTR and to the left in RTL. `"fixed"`: The label has the same behavior as `"start"` except it also has a fixed width. Long text will be truncated with ellipses ("..."). `"stacked"`: The label will appear above the checkbox regardless of the direction. The alignment of the label can be controlled with the `alignment` property.
*/
"labelPlacement": 'start' | 'end' | 'fixed';
"labelPlacement": 'start' | 'end' | 'fixed' | 'stacked';
/**
* Set the `legacy` property to `true` to forcibly use the legacy form control markup. Ionic will only opt checkboxes in to the modern form markup when they are using either the `aria-label` attribute or have text in the default slot. As a result, the `legacy` property should only be used as an escape hatch when you want to avoid this automatic opt-in behavior. Note that this property will be removed in an upcoming major release of Ionic, and all form components will be opted-in to using the modern form markup.
*/
@@ -2216,6 +2220,10 @@ export namespace Components {
"value": number;
}
interface IonRadio {
/**
* How to control the alignment of the radio and label on the cross axis. `"start"`: The label and control will appear on the left of the cross axis in LTR, and on the right side in RTL. `"center"`: The label and control will appear at the center of the cross axis in both LTR and RTL.
*/
"alignment": 'start' | 'center';
/**
* 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).
*/
@@ -2229,9 +2237,9 @@ export namespace Components {
*/
"justify": 'start' | 'end' | 'space-between';
/**
* Where to place the label relative to the radio. `"start"`: The label will appear to the left of the radio in LTR and to the right in RTL. `"end"`: The label will appear to the right of the radio in LTR and to the left in RTL. `"fixed"`: The label has the same behavior as `"start"` except it also has a fixed width. Long text will be truncated with ellipses ("...").
* Where to place the label relative to the radio. `"start"`: The label will appear to the left of the radio in LTR and to the right in RTL. `"end"`: The label will appear to the right of the radio in LTR and to the left in RTL. `"fixed"`: The label has the same behavior as `"start"` except it also has a fixed width. Long text will be truncated with ellipses ("..."). `"stacked"`: The label will appear above the radio regardless of the direction. The alignment of the label can be controlled with the `alignment` property.
*/
"labelPlacement": 'start' | 'end' | 'fixed';
"labelPlacement": 'start' | 'end' | 'fixed' | 'stacked';
/**
* Set the `legacy` property to `true` to forcibly use the legacy form control markup. Ionic will only opt components in to the modern form markup when they are using either the `aria-label` attribute or the default slot that contains the label text. As a result, the `legacy` property should only be used as an escape hatch when you want to avoid this automatic opt-in behavior. Note that this property will be removed in an upcoming major release of Ionic, and all form components will be opted-in to using the modern form markup.
*/
@@ -2291,9 +2299,9 @@ export namespace Components {
*/
"label"?: string;
/**
* Where to place the label relative to the range. `"start"`: The label will appear to the left of the range in LTR and to the right in RTL. `"end"`: The label will appear to the right of the range in LTR and to the left in RTL. `"fixed"`: The label has the same behavior as `"start"` except it also has a fixed width. Long text will be truncated with ellipses ("...").
* Where to place the label relative to the range. `"start"`: The label will appear to the left of the range in LTR and to the right in RTL. `"end"`: The label will appear to the right of the range in LTR and to the left in RTL. `"fixed"`: The label has the same behavior as `"start"` except it also has a fixed width. Long text will be truncated with ellipses ("..."). `"stacked"`: The label will appear above the range regardless of the direction.
*/
"labelPlacement": 'start' | 'end' | 'fixed';
"labelPlacement": 'start' | 'end' | 'fixed' | 'stacked';
/**
* Set the `legacy` property to `true` to forcibly use the legacy form control markup. Ionic will only opt components in to the modern form markup when they are using either the `aria-label` attribute or the `label` property. As a result, the `legacy` property should only be used as an escape hatch when you want to avoid this automatic opt-in behavior. Note that this property will be removed in an upcoming major release of Ionic, and all form components will be opted-in to using the modern form markup.
*/
@@ -3165,6 +3173,10 @@ export namespace Components {
"trigger": string | undefined;
}
interface IonToggle {
/**
* How to control the alignment of the toggle and label on the cross axis. ``"start"`: The label and control will appear on the left of the cross axis in LTR, and on the right side in RTL. `"center"`: The label and control will appear at the center of the cross axis in both LTR and RTL.
*/
"alignment": 'start' | 'center';
/**
* If `true`, the toggle is selected.
*/
@@ -3186,9 +3198,9 @@ export namespace Components {
*/
"justify": 'start' | 'end' | 'space-between';
/**
* Where to place the label relative to the input. `"start"`: The label will appear to the left of the toggle in LTR and to the right in RTL. `"end"`: The label will appear to the right of the toggle in LTR and to the left in RTL. `"fixed"`: The label has the same behavior as `"start"` except it also has a fixed width. Long text will be truncated with ellipses ("...").
* Where to place the label relative to the input. `"start"`: The label will appear to the left of the toggle in LTR and to the right in RTL. `"end"`: The label will appear to the right of the toggle in LTR and to the left in RTL. `"fixed"`: The label has the same behavior as `"start"` except it also has a fixed width. Long text will be truncated with ellipses ("..."). `"stacked"`: The label will appear above the toggle regardless of the direction. The alignment of the label can be controlled with the `alignment` property.
*/
"labelPlacement": 'start' | 'end' | 'fixed';
"labelPlacement": 'start' | 'end' | 'fixed' | 'stacked';
/**
* Set the `legacy` property to `true` to forcibly use the legacy form control markup. Ionic will only opt components in to the modern form markup when they are using either the `aria-label` attribute or the default slot that contains the label text. As a result, the `legacy` property should only be used as an escape hatch when you want to avoid this automatic opt-in behavior. Note that this property will be removed in an upcoming major release of Ionic, and all form components will be opted-in to using the modern form markup.
*/
@@ -4625,6 +4637,10 @@ declare namespace LocalJSX {
"mode"?: "ios" | "md";
}
interface IonCheckbox {
/**
* How to control the alignment of the checkbox and label on the cross axis. `"start"`: The label and control will appear on the left of the cross axis in LTR, and on the right side in RTL. `"center"`: The label and control will appear at the center of the cross axis in both LTR and RTL.
*/
"alignment"?: 'start' | 'center';
/**
* If `true`, the checkbox is selected.
*/
@@ -4646,9 +4662,9 @@ declare namespace LocalJSX {
*/
"justify"?: 'start' | 'end' | 'space-between';
/**
* Where to place the label relative to the checkbox. `"start"`: The label will appear to the left of the checkbox in LTR and to the right in RTL. `"end"`: The label will appear to the right of the checkbox in LTR and to the left in RTL. `"fixed"`: The label has the same behavior as `"start"` except it also has a fixed width. Long text will be truncated with ellipses ("...").
* Where to place the label relative to the checkbox. `"start"`: The label will appear to the left of the checkbox in LTR and to the right in RTL. `"end"`: The label will appear to the right of the checkbox in LTR and to the left in RTL. `"fixed"`: The label has the same behavior as `"start"` except it also has a fixed width. Long text will be truncated with ellipses ("..."). `"stacked"`: The label will appear above the checkbox regardless of the direction. The alignment of the label can be controlled with the `alignment` property.
*/
"labelPlacement"?: 'start' | 'end' | 'fixed';
"labelPlacement"?: 'start' | 'end' | 'fixed' | 'stacked';
/**
* Set the `legacy` property to `true` to forcibly use the legacy form control markup. Ionic will only opt checkboxes in to the modern form markup when they are using either the `aria-label` attribute or have text in the default slot. As a result, the `legacy` property should only be used as an escape hatch when you want to avoid this automatic opt-in behavior. Note that this property will be removed in an upcoming major release of Ionic, and all form components will be opted-in to using the modern form markup.
*/
@@ -6226,6 +6242,10 @@ declare namespace LocalJSX {
"value"?: number;
}
interface IonRadio {
/**
* How to control the alignment of the radio and label on the cross axis. `"start"`: The label and control will appear on the left of the cross axis in LTR, and on the right side in RTL. `"center"`: The label and control will appear at the center of the cross axis in both LTR and RTL.
*/
"alignment"?: 'start' | 'center';
/**
* 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).
*/
@@ -6239,9 +6259,9 @@ declare namespace LocalJSX {
*/
"justify"?: 'start' | 'end' | 'space-between';
/**
* Where to place the label relative to the radio. `"start"`: The label will appear to the left of the radio in LTR and to the right in RTL. `"end"`: The label will appear to the right of the radio in LTR and to the left in RTL. `"fixed"`: The label has the same behavior as `"start"` except it also has a fixed width. Long text will be truncated with ellipses ("...").
* Where to place the label relative to the radio. `"start"`: The label will appear to the left of the radio in LTR and to the right in RTL. `"end"`: The label will appear to the right of the radio in LTR and to the left in RTL. `"fixed"`: The label has the same behavior as `"start"` except it also has a fixed width. Long text will be truncated with ellipses ("..."). `"stacked"`: The label will appear above the radio regardless of the direction. The alignment of the label can be controlled with the `alignment` property.
*/
"labelPlacement"?: 'start' | 'end' | 'fixed';
"labelPlacement"?: 'start' | 'end' | 'fixed' | 'stacked';
/**
* Set the `legacy` property to `true` to forcibly use the legacy form control markup. Ionic will only opt components in to the modern form markup when they are using either the `aria-label` attribute or the default slot that contains the label text. As a result, the `legacy` property should only be used as an escape hatch when you want to avoid this automatic opt-in behavior. Note that this property will be removed in an upcoming major release of Ionic, and all form components will be opted-in to using the modern form markup.
*/
@@ -6319,9 +6339,9 @@ declare namespace LocalJSX {
*/
"label"?: string;
/**
* Where to place the label relative to the range. `"start"`: The label will appear to the left of the range in LTR and to the right in RTL. `"end"`: The label will appear to the right of the range in LTR and to the left in RTL. `"fixed"`: The label has the same behavior as `"start"` except it also has a fixed width. Long text will be truncated with ellipses ("...").
* Where to place the label relative to the range. `"start"`: The label will appear to the left of the range in LTR and to the right in RTL. `"end"`: The label will appear to the right of the range in LTR and to the left in RTL. `"fixed"`: The label has the same behavior as `"start"` except it also has a fixed width. Long text will be truncated with ellipses ("..."). `"stacked"`: The label will appear above the range regardless of the direction.
*/
"labelPlacement"?: 'start' | 'end' | 'fixed';
"labelPlacement"?: 'start' | 'end' | 'fixed' | 'stacked';
/**
* Set the `legacy` property to `true` to forcibly use the legacy form control markup. Ionic will only opt components in to the modern form markup when they are using either the `aria-label` attribute or the `label` property. As a result, the `legacy` property should only be used as an escape hatch when you want to avoid this automatic opt-in behavior. Note that this property will be removed in an upcoming major release of Ionic, and all form components will be opted-in to using the modern form markup.
*/
@@ -7298,6 +7318,10 @@ declare namespace LocalJSX {
"trigger"?: string | undefined;
}
interface IonToggle {
/**
* How to control the alignment of the toggle and label on the cross axis. ``"start"`: The label and control will appear on the left of the cross axis in LTR, and on the right side in RTL. `"center"`: The label and control will appear at the center of the cross axis in both LTR and RTL.
*/
"alignment"?: 'start' | 'center';
/**
* If `true`, the toggle is selected.
*/
@@ -7319,9 +7343,9 @@ declare namespace LocalJSX {
*/
"justify"?: 'start' | 'end' | 'space-between';
/**
* Where to place the label relative to the input. `"start"`: The label will appear to the left of the toggle in LTR and to the right in RTL. `"end"`: The label will appear to the right of the toggle in LTR and to the left in RTL. `"fixed"`: The label has the same behavior as `"start"` except it also has a fixed width. Long text will be truncated with ellipses ("...").
* Where to place the label relative to the input. `"start"`: The label will appear to the left of the toggle in LTR and to the right in RTL. `"end"`: The label will appear to the right of the toggle in LTR and to the left in RTL. `"fixed"`: The label has the same behavior as `"start"` except it also has a fixed width. Long text will be truncated with ellipses ("..."). `"stacked"`: The label will appear above the toggle regardless of the direction. The alignment of the label can be controlled with the `alignment` property.
*/
"labelPlacement"?: 'start' | 'end' | 'fixed';
"labelPlacement"?: 'start' | 'end' | 'fixed' | 'stacked';
/**
* Set the `legacy` property to `true` to forcibly use the legacy form control markup. Ionic will only opt components in to the modern form markup when they are using either the `aria-label` attribute or the default slot that contains the label text. As a result, the `legacy` property should only be used as an escape hatch when you want to avoid this automatic opt-in behavior. Note that this property will be removed in an upcoming major release of Ionic, and all form components will be opted-in to using the modern form markup.
*/

View File

@@ -3,6 +3,7 @@ import { Watch, Component, Element, Event, Host, Method, Prop, h, readTask } fro
import type { Gesture } from '@utils/gesture';
import { createButtonActiveGesture } from '@utils/gesture/button-active';
import { raf } from '@utils/helpers';
import { createLockController } from '@utils/lock-controller';
import {
BACKDROP,
createDelegateController,
@@ -40,8 +41,8 @@ import { mdLeaveAnimation } from './animations/md.leave';
})
export class ActionSheet implements ComponentInterface, OverlayInterface {
private readonly delegateController = createDelegateController(this);
private readonly lockController = createLockController();
private readonly triggerController = createTriggerController();
private currentTransition?: Promise<any>;
private wrapperEl?: HTMLElement;
private groupEl?: HTMLElement;
private gesture?: Gesture;
@@ -198,25 +199,13 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
*/
@Method()
async present(): Promise<void> {
/**
* When using an inline action sheet
* and dismissing a action sheet it is possible to
* quickly present the action sheet while it is
* dismissing. We need to await any current
* transition to allow the dismiss to finish
* before presenting again.
*/
if (this.currentTransition !== undefined) {
await this.currentTransition;
}
const unlock = await this.lockController.lock();
await this.delegateController.attachViewToDom();
this.currentTransition = present(this, 'actionSheetEnter', iosEnterAnimation, mdEnterAnimation);
await present(this, 'actionSheetEnter', iosEnterAnimation, mdEnterAnimation);
await this.currentTransition;
this.currentTransition = undefined;
unlock();
}
/**
@@ -230,13 +219,16 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
*/
@Method()
async dismiss(data?: any, role?: string): Promise<boolean> {
this.currentTransition = dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation, mdLeaveAnimation);
const dismissed = await this.currentTransition;
const unlock = await this.lockController.lock();
const dismissed = await dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation, mdLeaveAnimation);
if (dismissed) {
this.delegateController.removeViewFromDom();
}
unlock();
return dismissed;
}

View File

@@ -4,6 +4,7 @@ import { ENABLE_HTML_CONTENT_DEFAULT } from '@utils/config';
import type { Gesture } from '@utils/gesture';
import { createButtonActiveGesture } from '@utils/gesture/button-active';
import { raf } from '@utils/helpers';
import { createLockController } from '@utils/lock-controller';
import {
createDelegateController,
createTriggerController,
@@ -46,6 +47,7 @@ import { mdLeaveAnimation } from './animations/md.leave';
})
export class Alert implements ComponentInterface, OverlayInterface {
private readonly delegateController = createDelegateController(this);
private readonly lockController = createLockController();
private readonly triggerController = createTriggerController();
private customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
private activeId?: string;
@@ -54,7 +56,6 @@ export class Alert implements ComponentInterface, OverlayInterface {
private processedButtons: AlertButton[] = [];
private wrapperEl?: HTMLElement;
private gesture?: Gesture;
private currentTransition?: Promise<any>;
presented = false;
lastFocus?: HTMLElement;
@@ -373,23 +374,13 @@ export class Alert implements ComponentInterface, OverlayInterface {
*/
@Method()
async present(): Promise<void> {
/**
* When using an inline alert
* and dismissing an alert it is possible to
* quickly present the alert while it is
* dismissing. We need to await any current
* transition to allow the dismiss to finish
* before presenting again.
*/
if (this.currentTransition !== undefined) {
await this.currentTransition;
}
const unlock = await this.lockController.lock();
await this.delegateController.attachViewToDom();
this.currentTransition = present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation);
await this.currentTransition;
this.currentTransition = undefined;
await present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation);
unlock();
}
/**
@@ -403,13 +394,16 @@ export class Alert implements ComponentInterface, OverlayInterface {
*/
@Method()
async dismiss(data?: any, role?: string): Promise<boolean> {
this.currentTransition = dismiss(this, data, role, 'alertLeave', iosLeaveAnimation, mdLeaveAnimation);
const dismissed = await this.currentTransition;
const unlock = await this.lockController.lock();
const dismissed = await dismiss(this, data, role, 'alertLeave', iosLeaveAnimation, mdLeaveAnimation);
if (dismissed) {
this.delegateController.removeViewFromDom();
}
unlock();
return dismissed;
}

View File

@@ -108,6 +108,14 @@
@include margin($checkbox-item-label-margin-top, null, $checkbox-item-label-margin-bottom, null);
}
:host(.in-item.checkbox-label-placement-stacked) .label-text-wrapper {
@include margin($checkbox-item-label-margin-top, null, $form-control-label-margin, null);
}
:host(.in-item.checkbox-label-placement-stacked) .native-wrapper {
@include margin(null, null, $checkbox-item-label-margin-bottom, null);
}
/**
* If no label text is placed into the slot
* then the element should be hidden otherwise
@@ -181,6 +189,17 @@ input {
justify-content: end;
}
// Align Items
// ---------------------------------------------
:host(.checkbox-alignment-start) .checkbox-wrapper {
align-items: start;
}
:host(.checkbox-alignment-center) .checkbox-wrapper {
align-items: center;
}
// Label Placement - Start
// ----------------------------------------------------------------
@@ -248,6 +267,24 @@ input {
max-width: 200px;
}
// Label Placement - Stacked
// ----------------------------------------------------------------
/**
* Label is on top of the checkbox.
*/
:host(.checkbox-label-placement-stacked) .checkbox-wrapper {
flex-direction: column;
}
:host(.checkbox-label-placement-stacked) .label-text-wrapper {
/**
* The margin between the label and
* the checkbox should be on the bottom
* when the label sits at the top.
*/
@include margin(null, 0, $form-control-label-margin, 0);
}
// Checked / Indeterminate Checkbox
// ---------------------------------------------

View File

@@ -81,8 +81,9 @@ export class Checkbox implements ComponentInterface {
* `"start"`: The label will appear to the left of the checkbox in LTR and to the right in RTL.
* `"end"`: The label will appear to the right of the checkbox in LTR and to the left in RTL.
* `"fixed"`: The label has the same behavior as `"start"` except it also has a fixed width. Long text will be truncated with ellipses ("...").
* `"stacked"`: The label will appear above the checkbox regardless of the direction. The alignment of the label can be controlled with the `alignment` property.
*/
@Prop() labelPlacement: 'start' | 'end' | 'fixed' = 'start';
@Prop() labelPlacement: 'start' | 'end' | 'fixed' | 'stacked' = 'start';
/**
* How to pack the label and checkbox within a line.
@@ -95,6 +96,13 @@ export class Checkbox implements ComponentInterface {
*/
@Prop() justify: 'start' | 'end' | 'space-between' = 'space-between';
/**
* How to control the alignment of the checkbox and label on the cross axis.
* `"start"`: The label and control will appear on the left of the cross axis in LTR, and on the right side in RTL.
* `"center"`: The label and control will appear at the center of the cross axis in both LTR and RTL.
*/
@Prop() alignment: 'start' | 'center' = 'center';
// TODO(FW-3100): remove this
/**
* Set the `legacy` property to `true` to forcibly use the legacy form control markup.
@@ -224,6 +232,7 @@ export class Checkbox implements ComponentInterface {
labelPlacement,
name,
value,
alignment,
} = this;
const mode = getIonMode(this);
const path = getSVGPath(mode, indeterminate);
@@ -240,6 +249,7 @@ export class Checkbox implements ComponentInterface {
'checkbox-indeterminate': indeterminate,
interactive: true,
[`checkbox-justify-${justify}`]: true,
[`checkbox-alignment-${alignment}`]: true,
[`checkbox-label-placement-${labelPlacement}`]: true,
})}
>

View File

@@ -12,7 +12,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
);
const checkbox = page.locator('ion-checkbox');
expect(await checkbox.screenshot()).toMatchSnapshot(screenshot(`checkbox-color-checked`));
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-color-checked`));
});
test('should not apply color when unchecked', async ({ page }) => {
@@ -24,7 +24,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
);
const checkbox = page.locator('ion-checkbox');
expect(await checkbox.screenshot()).toMatchSnapshot(screenshot(`checkbox-color-unchecked`));
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-color-unchecked`));
});
});
});

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1015 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 906 B

View File

@@ -15,7 +15,7 @@ configs().forEach(({ title, screenshot, config }) => {
config
);
const list = page.locator('ion-list');
expect(await list.screenshot()).toMatchSnapshot(screenshot(`checkbox-list`));
await expect(list).toHaveScreenshot(screenshot(`checkbox-list`));
});
test('should render correctly in inset list', async ({ page }) => {
await page.setContent(
@@ -29,7 +29,7 @@ configs().forEach(({ title, screenshot, config }) => {
config
);
const list = page.locator('ion-list');
expect(await list.screenshot()).toMatchSnapshot(screenshot(`checkbox-inset-list`));
await expect(list).toHaveScreenshot(screenshot(`checkbox-inset-list`));
});
});
});
@@ -46,7 +46,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
config
);
const item = page.locator('ion-item');
expect(await item.screenshot()).toMatchSnapshot(screenshot(`checkbox-item-color`));
await expect(item).toHaveScreenshot(screenshot(`checkbox-item-color`));
});
});
});
@@ -67,7 +67,24 @@ configs({ directions: ['ltr'], modes: ['md'] }).forEach(({ title, screenshot, co
config
);
const list = page.locator('ion-list');
expect(await list.screenshot()).toMatchSnapshot(screenshot(`checkbox-long-label-in-item`));
await expect(list).toHaveScreenshot(screenshot(`checkbox-long-label-in-item`));
});
});
test.describe(title('checkbox: stacked label in item'), () => {
test('should render margins correctly when using stacked label in item', async ({ page }) => {
await page.setContent(
`
<ion-list>
<ion-item>
<ion-checkbox label-placement="stacked">Enable Notifications</ion-checkbox>
</ion-item>
</ion-list>
`,
config
);
const list = page.locator('ion-list');
await expect(list).toHaveScreenshot(screenshot(`checkbox-stacked-label-in-item`));
});
});
});

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -137,6 +137,27 @@
</div>
</div>
<h1>Placement Stacked</h1>
<div class="grid">
<div class="grid-item">
<h2>Align Start</h2>
<ion-list>
<ion-item>
<ion-checkbox label-placement="stacked" alignment="start">Enable Notifications</ion-checkbox>
</ion-item>
</ion-list>
</div>
<div class="grid-item">
<h2>Align Center</h2>
<ion-list>
<ion-item>
<ion-checkbox label-placement="stacked" alignment="center">Enable Notifications</ion-checkbox>
</ion-item>
</ion-list>
</div>
</div>
<h1>States</h1>
<div class="grid">
<div class="grid-item">

View File

@@ -21,7 +21,7 @@ configs().forEach(({ title, screenshot, config }) => {
);
const checkbox = page.locator('ion-checkbox');
expect(await checkbox.screenshot()).toMatchSnapshot(screenshot(`checkbox-label-start-justify-start`));
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-start-justify-start`));
});
test('should render an end justification with label in the start position', async ({ page }) => {
@@ -33,7 +33,7 @@ configs().forEach(({ title, screenshot, config }) => {
);
const checkbox = page.locator('ion-checkbox');
expect(await checkbox.screenshot()).toMatchSnapshot(screenshot(`checkbox-label-start-justify-end`));
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-start-justify-end`));
});
test('should render a space between justification with label in the start position', async ({ page }) => {
@@ -45,7 +45,7 @@ configs().forEach(({ title, screenshot, config }) => {
);
const checkbox = page.locator('ion-checkbox');
expect(await checkbox.screenshot()).toMatchSnapshot(screenshot(`checkbox-label-start-justify-space-between`));
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-start-justify-space-between`));
});
test('should truncate long labels with ellipses', async ({ page }) => {
@@ -59,7 +59,7 @@ configs().forEach(({ title, screenshot, config }) => {
);
const checkbox = page.locator('ion-checkbox');
expect(await checkbox.screenshot()).toMatchSnapshot(screenshot(`checkbox-long-label`));
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-long-label`));
});
});
@@ -73,7 +73,7 @@ configs().forEach(({ title, screenshot, config }) => {
);
const checkbox = page.locator('ion-checkbox');
expect(await checkbox.screenshot()).toMatchSnapshot(screenshot(`checkbox-label-end-justify-start`));
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-end-justify-start`));
});
test('should render an end justification with label in the end position', async ({ page }) => {
@@ -85,7 +85,7 @@ configs().forEach(({ title, screenshot, config }) => {
);
const checkbox = page.locator('ion-checkbox');
expect(await checkbox.screenshot()).toMatchSnapshot(screenshot(`checkbox-label-end-justify-end`));
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-end-justify-end`));
});
test('should render a space between justification with label in the end position', async ({ page }) => {
@@ -97,7 +97,7 @@ configs().forEach(({ title, screenshot, config }) => {
);
const checkbox = page.locator('ion-checkbox');
expect(await checkbox.screenshot()).toMatchSnapshot(screenshot(`checkbox-label-end-justify-space-between`));
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-end-justify-space-between`));
});
});
@@ -111,7 +111,7 @@ configs().forEach(({ title, screenshot, config }) => {
);
const checkbox = page.locator('ion-checkbox');
expect(await checkbox.screenshot()).toMatchSnapshot(screenshot(`checkbox-label-fixed-justify-start`));
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-fixed-justify-start`));
});
test('should render an end justification with label in the fixed position', async ({ page }) => {
@@ -123,7 +123,7 @@ configs().forEach(({ title, screenshot, config }) => {
);
const checkbox = page.locator('ion-checkbox');
expect(await checkbox.screenshot()).toMatchSnapshot(screenshot(`checkbox-label-fixed-justify-end`));
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-fixed-justify-end`));
});
test('should render a space between justification with label in the fixed position', async ({ page }) => {
@@ -135,7 +135,33 @@ configs().forEach(({ title, screenshot, config }) => {
);
const checkbox = page.locator('ion-checkbox');
expect(await checkbox.screenshot()).toMatchSnapshot(screenshot(`checkbox-label-fixed-justify-space-between`));
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-fixed-justify-space-between`));
});
});
test.describe('checkbox: stacked placement', () => {
test('should align the label to the start of the container in the stacked position', async ({ page }) => {
await page.setContent(
`
<ion-checkbox label-placement="stacked" alignment="start" style="width: 200px">This is a long label</ion-checkbox>
`,
config
);
const checkbox = page.locator('ion-checkbox');
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-stacked-align-start`));
});
test('should align the label to the center of the container in the stacked position', async ({ page }) => {
await page.setContent(
`
<ion-checkbox label-placement="stacked" alignment="center" style="width: 200px">This is a long label</ion-checkbox>
`,
config
);
const checkbox = page.locator('ion-checkbox');
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-stacked-align-center`));
});
});
});

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 956 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 977 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 948 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 946 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 962 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 939 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Some files were not shown because too many files have changed in this diff Show More