167 Commits

Author SHA1 Message Date
e379a907ae Merge branch 'main' into chore/update-from-main 2025-08-20 15:20:13 -04:00
1899b49d25 fix(refresher): prevent focus-related scroll jumps on refresh (#30636)
Issue number: resolves #

---------

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

Currently, if you focus on something and then refresh with a refresher,
the browser will try to scroll to what's focused after refreshing. This
can be an unexpected and disrupting user experience.



https://github.com/user-attachments/assets/3ef5999d-d104-422a-a6a9-4f478912f48a


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

With these changes, we blur the active element to prevent the browser
from trying to scroll back to something off screen after refreshing.

Also, I did try to create regression tests for this, but playwright
actually doesn't currently seem to make it possible as far as I can tell
- that's actually what I spent most of my time on this issue trying to
do. Looks like the only way to trigger the refresher with playwright
uses mouse click events, which inherently blurs the active element. You
need to use cursor events for this to work, because cursor events do not
cause a blur on the active element.


https://github.com/user-attachments/assets/bd1a3bfc-9b48-4b3f-b8dc-6959eefc9107


## Does this introduce a breaking change?

- [ ] Yes
- [X] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

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

**Current dev build:**
```
8.7.3-dev.11755285796.12743331
```
2025-08-18 19:59:57 +00:00
345bd53831 Merge branch 'main' into chore/update-next-from-main 2025-06-04 16:58:30 -04:00
8ef79cf4fb chore(deps): update playwright (#30367)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence | Type |
Update |
|---|---|---|---|---|---|---|---|
| [@playwright/test](https://playwright.dev)
([source](https://redirect.github.com/microsoft/playwright)) |
[`^1.51.1` ->
`^1.52.0`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.51.1/1.52.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@playwright%2ftest/1.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@playwright%2ftest/1.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@playwright%2ftest/1.51.1/1.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@playwright%2ftest/1.51.1/1.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | minor |
| mcr.microsoft.com/playwright | `v1.51.1` -> `v1.52.0` |
[![age](https://developer.mend.io/api/mc/badges/age/docker/mcr.microsoft.com%2fplaywright/v1.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/docker/mcr.microsoft.com%2fplaywright/v1.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/docker/mcr.microsoft.com%2fplaywright/v1.51.1/v1.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/docker/mcr.microsoft.com%2fplaywright/v1.51.1/v1.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| final | minor |

---

### Release Notes

<details>
<summary>microsoft/playwright (@&#8203;playwright/test)</summary>

###
[`v1.52.0`](https://redirect.github.com/microsoft/playwright/compare/v1.51.1...471930b1ceae03c9e66e0eb80c1364a1a788e7db)

[Compare
Source](https://redirect.github.com/microsoft/playwright/compare/v1.51.1...v1.52.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekday before 11am" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/ionic-team/ionic-framework).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNDguNCIsInVwZGF0ZWRJblZlciI6IjM5LjI1Ny4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: ionitron <hi@ionicframework.com>
2025-04-29 17:25:36 +00:00
d52fca084c fix(config): allow LogLevel to work with isolatedModules and update all warns and errors to respect logLevel (#30350)
Issue number: internal

---------

## What is the current behavior?
- `LogLevel` throws error `Error: Cannot access ambient const enums when
'isolatedModules' is enabled`
- Several existing console warns and errors are not calling the function
that respects the `logLevel` config

## What is the new behavior?
- Remove `const` from the `enum` to work with `isolatedModules`
- Update `console.warn`s to `printIonWarning`
- Update `console.error`s to `printIonError`

## Does this introduce a breaking change?
- [ ] Yes
- [x] No

## Other information

Dev build: `8.5.5-dev.11744729748.174bf7e0`

---------

Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
2025-04-16 16:23:16 +00:00
b8b5984150 Merge branch 'main' into chore-merge-main-into-next 2025-03-18 18:05:14 -04:00
c63ec2e98d chore(deps): update playwright (#29840)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence | Type |
Update |
|---|---|---|---|---|---|---|---|
|
[@axe-core/playwright](https://redirect.github.com/dequelabs/axe-core-npm)
| [`^4.10.0` ->
`^4.10.1`](https://renovatebot.com/diffs/npm/@axe-core%2fplaywright/4.10.0/4.10.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@axe-core%2fplaywright/4.10.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@axe-core%2fplaywright/4.10.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@axe-core%2fplaywright/4.10.0/4.10.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@axe-core%2fplaywright/4.10.0/4.10.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | patch |
| [@playwright/test](https://playwright.dev)
([source](https://redirect.github.com/microsoft/playwright)) |
[`^1.46.1` ->
`^1.51.0`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.46.1/1.51.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@playwright%2ftest/1.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@playwright%2ftest/1.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@playwright%2ftest/1.46.1/1.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@playwright%2ftest/1.46.1/1.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | minor |
| mcr.microsoft.com/playwright | `v1.46.1` -> `v1.51.0` |
[![age](https://developer.mend.io/api/mc/badges/age/docker/mcr.microsoft.com%2fplaywright/v1.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/docker/mcr.microsoft.com%2fplaywright/v1.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/docker/mcr.microsoft.com%2fplaywright/v1.46.1/v1.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/docker/mcr.microsoft.com%2fplaywright/v1.46.1/v1.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| final | minor |

---

### Release Notes

<details>
<summary>dequelabs/axe-core-npm (@&#8203;axe-core/playwright)</summary>

###
[`v4.10.1`](https://redirect.github.com/dequelabs/axe-core-npm/blob/HEAD/CHANGELOG.md#4101-2024-10-29)

[Compare
Source](https://redirect.github.com/dequelabs/axe-core-npm/compare/v4.10.0...v4.10.1)

##### Bug Fixes

- Update axe-core to v4.10.1
([#&#8203;1124](https://redirect.github.com/dequelabs/axe-core-npm/issues/1124))
([099818b](099818bcef))
- Update axe-core to v4.10.2
([#&#8203;1128](https://redirect.github.com/dequelabs/axe-core-npm/issues/1128))
([aaaa34e](aaaa34e7c3))

</details>

<details>
<summary>microsoft/playwright (@&#8203;playwright/test)</summary>

###
[`v1.51.0`](https://redirect.github.com/microsoft/playwright/compare/v1.50.1...3707a93754368ec1e0e2876767e8a9209f036f8a)

[Compare
Source](https://redirect.github.com/microsoft/playwright/compare/v1.50.1...v1.51.0)

###
[`v1.50.1`](https://redirect.github.com/microsoft/playwright/releases/tag/v1.50.1)

[Compare
Source](https://redirect.github.com/microsoft/playwright/compare/v1.50.0...v1.50.1)

##### Highlights


[https://github.com/microsoft/playwright/issues/34483](https://redirect.github.com/microsoft/playwright/issues/34483)
- \[Feature]: single aria snapshot for different
engines/browsers[https://github.com/microsoft/playwright/issues/34497](https://redirect.github.com/microsoft/playwright/issues/34497)7
- \[Bug]: Firefox not handling keepalive: true fetch
request[https://github.com/microsoft/playwright/issues/34504](https://redirect.github.com/microsoft/playwright/issues/34504)04
- \[Bug]: update snapshots not creating good
dif[https://github.com/microsoft/playwright/issues/34507](https://redirect.github.com/microsoft/playwright/issues/34507)507
- \[Bug]: snapshotPathTemplate doesnt work when multiple
proje[https://github.com/microsoft/playwright/issues/34462](https://redirect.github.com/microsoft/playwright/issues/34462)4462
- \[Bug]: updateSnapshots "changed" throws an error

#### Browser Versions

-   Chromium 133.0.6943.16
-   Mozilla Firefox 134.0
-   WebKit 18.2

This version was also tested against the following stable channels:

-   Google Chrome 132
-   Microsoft Edge 132

###
[`v1.50.0`](https://redirect.github.com/microsoft/playwright/releases/tag/v1.50.0)

[Compare
Source](https://redirect.github.com/microsoft/playwright/compare/v1.49.1...v1.50.0)

#### Test runner

- New option
[`timeout`](https://playwright.dev/docs/api/class-test#test-step-option-timeout)
allows specifying a maximum run time for an individual test step. A
timed-out step will fail the execution of the test.

    ```js
    test('some test', async ({ page }) => {
      await test.step('a step', async () => {
        // This step can time out separately from the test
      }, { timeout: 1000 });
    });
    ```

- New method
[test.step.skip()](https://playwright.dev/docs/api/class-test#test-step-skip)
to disable execution of a test step.

    ```js
    test('some test', async ({ page }) => {
      await test.step('before running step', async () => {
        // Normal step
      });

      await test.step.skip('not yet ready', async () => {
        // This step is skipped
      });

      await test.step('after running step', async () => {
        // This step still runs even though the previous one was skipped
      });
    });
    ```

- Expanded
[expect(locator).toMatchAriaSnapshot()](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-match-aria-snapshot-2)
to allow storing of aria snapshots in separate YAML files.

- Added method
[expect(locator).toHaveAccessibleErrorMessage()](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-accessible-error-message)
to assert the Locator points to an element with a given [aria
errormessage](https://w3c.github.io/aria/#aria-errormessage).

- Option
[testConfig.updateSnapshots](https://playwright.dev/docs/api/class-testconfig#test-config-update-snapshots)
added the configuration enum `changed`. `changed` updates only the
snapshots that have changed, whereas `all` now updates all snapshots,
regardless of whether there are any differences.

- New option
[testConfig.updateSourceMethod](https://playwright.dev/docs/api/class-testconfig#test-config-update-source-method)
defines the way source code is updated when
[testConfig.updateSnapshots](https://playwright.dev/docs/api/class-testconfig#test-config-update-snapshots)
is configured. Added `overwrite` and `3-way` modes that write the
changes into source code, on top of existing `patch` mode that creates a
patch file.

    ```bash
npx playwright test --update-snapshots=changed
--update-source-method=3way
    ```

- Option
[testConfig.webServer](https://playwright.dev/docs/api/class-testconfig#test-config-web-server)
added a `gracefulShutdown` field for specifying a process kill signal
other than the default `SIGKILL`.

- Exposed
[testStep.attachments](https://playwright.dev/docs/api/class-teststep#test-step-attachments)
from the reporter API to allow retrieval of all attachments created by
that step.

- New option `pathTemplate` for `toHaveScreenshot` and
`toMatchAriaSnapshot` assertions in the
[testConfig.expect](https://playwright.dev/docs/api/class-testconfig#test-config-expect)
configuration.

#### UI updates

-   Updated default HTML reporter to improve display of attachments.
-   New button for picking elements to produce aria snapshots.
- Additional details (such as keys pressed) are now displayed alongside
action API calls in traces.
- Display of `canvas` content in traces is error-prone. Display is now
disabled by default, and can be enabled via the `Display canvas content`
UI setting.
-   `Call` and `Network` panels now display additional time information.

#### Breaking

-
[expect(locator).toBeEditable()](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-editable)
and
[locator.isEditable()](https://playwright.dev/docs/api/class-locator#locator-is-editable)
now throw if the target element is not `<input>`, `<select>`, or a
number of other editable elements.
- Option
[testConfig.updateSnapshots](https://playwright.dev/docs/api/class-testconfig#test-config-update-snapshots)
now updates all snapshots when set to `all`, rather than only the
failed/changed snapshots. Use the new enum `changed` to keep the old
functionality of only updating the changed snapshots.

#### Browser Versions

-   Chromium 133.0.6943.16
-   Mozilla Firefox 134.0
-   WebKit 18.2

This version was also tested against the following stable channels:

-   Google Chrome 132
-   Microsoft Edge 132

###
[`v1.49.1`](https://redirect.github.com/microsoft/playwright/releases/tag/v1.49.1)

[Compare
Source](https://redirect.github.com/microsoft/playwright/compare/v1.49.0...v1.49.1)

##### Highlights


[https://github.com/microsoft/playwright/issues/33802](https://redirect.github.com/microsoft/playwright/issues/33802)
- \[Bug]: Codegen's Clear button doesn't work if not
recording[https://github.com/microsoft/playwright/issues/33806](https://redirect.github.com/microsoft/playwright/issues/33806)6
- \[Bug]: playwright hangs while waiting for pending
navigation[https://github.com/microsoft/playwright/issues/33787](https://redirect.github.com/microsoft/playwright/issues/33787)87
- \[Bug]: VSC extension isn't capturing all entered
te[https://github.com/microsoft/playwright/issues/33788](https://redirect.github.com/microsoft/playwright/issues/33788)788
- \[Regression]: Double clicking the steps in trace viewer doesn't
filter
acti[https://github.com/microsoft/playwright/issues/33772](https://redirect.github.com/microsoft/playwright/issues/33772)3772
- \[Bug]: aria_snapshot generates invalid yaml when combined with an
aria-label
attr[https://github.com/microsoft/playwright/issues/33791](https://redirect.github.com/microsoft/playwright/issues/33791)33791
- \[Bug]: text input with number value raises "container is not
iterable" with
to_match_aria_sna[https://github.com/microsoft/playwright/issues/33644](https://redirect.github.com/microsoft/playwright/issues/33644)/33644
- \[Bug]: getByRole can't find element with the accessible name from
label element when aria-labelledby is
not[https://github.com/microsoft/playwright/issues/33660](https://redirect.github.com/microsoft/playwright/issues/33660)s/33660
- \[Regression]: Unable to open Playwright UI in Dark Mode

#### Browser Versions

-   Chromium 131.0.6778.33
-   Mozilla Firefox 132.0
-   WebKit 18.2

This version was also tested against the following stable channels:

-   Google Chrome 130
-   Microsoft Edge 130

###
[`v1.49.0`](https://redirect.github.com/microsoft/playwright/releases/tag/v1.49.0)

[Compare
Source](https://redirect.github.com/microsoft/playwright/compare/v1.48.2...v1.49.0)

#### Aria snapshots

New assertion
[expect(locator).toMatchAriaSnapshot()](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-match-aria-snapshot)
verifies page structure by comparing to an expected accessibility tree,
represented as YAML.

```js
await page.goto('https://playwright.dev');
await expect(page.locator('body')).toMatchAriaSnapshot(`
  - banner:
    - heading /Playwright enables reliable/ [level=1]
    - link "Get started"
    - link "Star microsoft/playwright on GitHub"
  - main:
    - img "Browsers (Chromium, Firefox, WebKit)"
    - heading "Any browser • Any platform • One API"
`);
```

You can generate this assertion with [Test
Generator](https://playwright.dev/docs/codegen) and update the expected
snapshot with `--update-snapshots` command line flag.

Learn more in the [aria snapshots
guide](https://playwright.dev/docs/aria-snapshots).

#### Test runner

- New option
[testConfig.tsconfig](https://playwright.dev/docs/api/class-testconfig#test-config-tsconfig)
allows to specify a single `tsconfig` to be used for all tests.
- New method
[test.fail.only()](https://playwright.dev/docs/api/class-test#test-fail-only)
to focus on a failing test.
- Options
[testConfig.globalSetup](https://playwright.dev/docs/api/class-testconfig#test-config-global-setup)
and
[testConfig.globalTeardown](https://playwright.dev/docs/api/class-testconfig#test-config-global-teardown)
now support multiple setups/teardowns.
- New value `'on-first-failure'` for
[testOptions.screenshot](https://playwright.dev/docs/api/class-testoptions#test-options-screenshot).
- Added "previous" and "next" buttons to the HTML report to quickly
switch between test cases.
- New properties
[testInfoError.cause](https://playwright.dev/docs/api/class-testinfoerror#test-info-error-cause)
and
[testError.cause](https://playwright.dev/docs/api/class-testerror#test-error-cause)
mirroring
[`Error.cause`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause).

#### Breaking: channels `chrome`, `msedge` and similar switch to new
headless

This change affects you if you're using one of the following channels in
your `playwright.config.ts`:

-   `chrome`, `chrome-dev`, `chrome-beta`, or `chrome-canary`
-   `msedge`, `msedge-dev`, `msedge-beta`, or `msedge-canary`

##### What do I need to do?

After updating to Playwright v1.49, run your test suite. If it still
passes, you're good to go. If not, you will probably need to update your
snapshots, and adapt some of your test code around PDF viewers and
extensions. See [issue
#&#8203;33566](https://redirect.github.com/microsoft/playwright/issues/33566)
for more details.

#### Other breaking changes

- There will be no more updates for WebKit on Ubuntu 20.04 and Debian
11. We recommend updating your OS to a later version.
- Package `@playwright/experimental-ct-vue2` will no longer be updated.
- Package `@playwright/experimental-ct-solid` will no longer be updated.

#### Try new Chromium headless

You can opt into the new headless mode by using `'chromium'` channel. As
[official Chrome documentation puts
it](https://developer.chrome.com/blog/chrome-headless-shell):

> New Headless on the other hand is the real Chrome browser, and is thus
more authentic, reliable, and offers more features. This makes it more
suitable for high-accuracy end-to-end web app testing or browser
extension testing.

See [issue
#&#8203;33566](https://redirect.github.com/microsoft/playwright/issues/33566)
for the list of possible breakages you could encounter and more details
on Chromium headless. Please file an issue if you see any problems after
opting in.

```js
import { defineConfig, devices } from '@&#8203;playwright/test';

export default defineConfig({
  projects: [
    {
      name: 'chromium',
      use: { ...devices['Desktop Chrome'], channel: 'chromium' },
    },
  ],
});
```

#### Miscellaneous

-   `<canvas>` elements inside a snapshot now draw a preview.
- New method
[tracing.group()](https://playwright.dev/docs/api/class-tracing#tracing-group)
to visually group actions in the trace.
- Playwright docker images switched from Node.js v20 to Node.js v22 LTS.

#### Browser Versions

-   Chromium 131.0.6778.33
-   Mozilla Firefox 132.0
-   WebKit 18.2

This version was also tested against the following stable channels:

-   Google Chrome 130
-   Microsoft Edge 130

###
[`v1.48.2`](https://redirect.github.com/microsoft/playwright/releases/tag/v1.48.2)

[Compare
Source](https://redirect.github.com/microsoft/playwright/compare/v1.48.1...v1.48.2)

##### Highlights


[https://github.com/microsoft/playwright/issues/33141](https://redirect.github.com/microsoft/playwright/issues/33141)
- \[Bug]: UI Mode
crashed[https://github.com/microsoft/playwright/issues/33219](https://redirect.github.com/microsoft/playwright/issues/33219)9
- \[BUG] Trace Viewer PWA crashes with "Aw,
Snap![https://github.com/microsoft/playwright/issues/33086](https://redirect.github.com/microsoft/playwright/issues/33086)86
- \[Bug]: UI Mode Memory
probl[https://github.com/microsoft/playwright/issues/33000](https://redirect.github.com/microsoft/playwright/issues/33000)000
- \[Regression]: Inspector and Browser doesn't close on
CTR[https://github.com/microsoft/playwright/issues/33204](https://redirect.github.com/microsoft/playwright/issues/33204)3204
- \[Bug]: Chrome tab and inspector not closing after terminating session
in terminal

#### Browser Versions

-   Chromium 130.0.6723.19
-   Mozilla Firefox 130.0
-   WebKit 18.0

This version was also tested against the following stable channels:

-   Google Chrome 129
-   Microsoft Edge 129

###
[`v1.48.1`](https://redirect.github.com/microsoft/playwright/releases/tag/v1.48.1)

[Compare
Source](https://redirect.github.com/microsoft/playwright/compare/v1.48.0...v1.48.1)

##### Highlights


[https://github.com/microsoft/playwright/issues/33023](https://redirect.github.com/microsoft/playwright/issues/33023)
- \[Bug]: command line flag --headed has no effect in ui
mode[https://github.com/microsoft/playwright/issues/33107](https://redirect.github.com/microsoft/playwright/issues/33107)7
- \[REGRESSION]: page.waitForRequest does not get resolved since
1.48.[https://github.com/microsoft/playwright/issues/33085](https://redirect.github.com/microsoft/playwright/issues/33085)85
- \[Bug]: WebSocket route does not handle full URLs in
Playwrig[https://github.com/microsoft/playwright/issues/33052](https://redirect.github.com/microsoft/playwright/issues/33052)052
- \[Regression]: Inspector not showing recorded
st[https://github.com/microsoft/playwright/issues/33132](https://redirect.github.com/microsoft/playwright/issues/33132)3132
- \[Bug]: Wrong Ubuntu release name in
Dockerfile.n[https://github.com/microsoft/playwright/pull/32996](https://redirect.github.com/microsoft/playwright/pull/32996)32996
- \[BUG] Trace attachments have small unusable height

#### Browser Versions

-   Chromium 130.0.6723.19
-   Mozilla Firefox 130.0
-   WebKit 18.0

This version was also tested against the following stable channels:

-   Google Chrome 129
-   Microsoft Edge 129

###
[`v1.48.0`](https://redirect.github.com/microsoft/playwright/releases/tag/v1.48.0)

[Compare
Source](https://redirect.github.com/microsoft/playwright/compare/v1.47.2...v1.48.0)

#### WebSocket routing

New methods
[page.routeWebSocket()](https://playwright.dev/docs/api/class-page#page-route-web-socket)
and
[browserContext.routeWebSocket()](https://playwright.dev/docs/api/class-browsercontext#browser-context-route-web-socket)
allow to intercept, modify and mock WebSocket connections initiated in
the page. Below is a simple example that mocks WebSocket communication
by responding to a `"request"` with a `"response"`.

```js
await page.routeWebSocket('/ws', ws => {
  ws.onMessage(message => {
    if (message === 'request')
      ws.send('response');
  });
});
```

See
[WebSocketRoute](https://playwright.dev/docs/api/class-websocketroute)
for more details.

#### UI updates

- New "copy" buttons for annotations and test location in the HTML
report.
- Route method calls like
[route.fulfill()](https://playwright.dev/docs/api/class-route#route-fulfill)
are not shown in the report and trace viewer anymore. You can see which
network requests were routed in the network tab instead.
- New "Copy as cURL" and "Copy as fetch" buttons for requests in the
network tab.

#### Miscellaneous

- Option
[`form`](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-fetch-option-form)
and similar ones now accept
[FormData](https://playwright.dev/docs/api/class-formdata).
- New method
[page.requestGC()](https://playwright.dev/docs/api/class-page#page-request-gc)
may help detect memory leaks.
- New option
[`location`](https://playwright.dev/docs/api/class-test#test-step-option-location)
to pass custom step location.
- Requests made by
[APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext)
now record detailed timing and security information in the HAR.

#### Browser Versions

-   Chromium 130.0.6723.19
-   Mozilla Firefox 130.0
-   WebKit 18.0

This version was also tested against the following stable channels:

-   Google Chrome 129
-   Microsoft Edge 129

###
[`v1.47.2`](https://redirect.github.com/microsoft/playwright/releases/tag/v1.47.2)

[Compare
Source](https://redirect.github.com/microsoft/playwright/compare/v1.47.1...v1.47.2)

##### Highlights


[https://github.com/microsoft/playwright/pull/32699](https://redirect.github.com/microsoft/playwright/pull/32699)-
\[REGRESSION]: fix(codegen): use content_frame property in
python/.NET[https://github.com/microsoft/playwright/issues/32706](https://redirect.github.com/microsoft/playwright/issues/32706)6-
\[REGRESSION]: page.pause() does not pause test timeout after
1.4[https://github.com/microsoft/playwright/pull/32661](https://redirect.github.com/microsoft/playwright/pull/32661)61
- fix(trace-viewer): time delta between local and remote actions

#### Browser Versions

-   Chromium 129.0.6668.29
-   Mozilla Firefox 130.0
-   WebKit 18.0

This version was also tested against the following stable channels:

-   Google Chrome 128
-   Microsoft Edge 128

###
[`v1.47.1`](https://redirect.github.com/microsoft/playwright/releases/tag/v1.47.1)

[Compare
Source](https://redirect.github.com/microsoft/playwright/compare/v1.47.0...v1.47.1)

##### Highlights


[https://github.com/microsoft/playwright/issues/32480](https://redirect.github.com/microsoft/playwright/issues/32480)
- \[REGRESSION]: tsconfig.json's compilerOptions.paths no longer working
in
1.47[https://github.com/microsoft/playwright/issues/32552](https://redirect.github.com/microsoft/playwright/issues/32552)2
- \[REGRESSION]: broken UI in Trace Viewer while showing network
response body

#### Browser Versions

-   Chromium 129.0.6668.29
-   Mozilla Firefox 130.0
-   WebKit 18.0

This version was also tested against the following stable channels:

-   Google Chrome 128
-   Microsoft Edge 128

###
[`v1.47.0`](https://redirect.github.com/microsoft/playwright/releases/tag/v1.47.0)

[Compare
Source](https://redirect.github.com/microsoft/playwright/compare/v1.46.1...v1.47.0)

#### Network Tab improvements

The Network tab in the UI mode and trace viewer has several nice
improvements:

-   filtering by asset type and URL
-   better display of query string parameters
-   preview of font assets

![Network tab now has
filters](https://redirect.github.com/user-attachments/assets/4bd1b67d-90bd-438b-a227-00b9e86872e2)

Credit to [@&#8203;kubajanik](https://redirect.github.com/kubajanik) for
these wonderful improvements!

#### `--tsconfig` CLI option

By default, Playwright will look up the closest tsconfig for each
imported file using a heuristic. You can now specify a single tsconfig
file in the command line, and Playwright will use it for all imported
files, not only test files:

```sh

### Pass a specific tsconfig
npx playwright test --tsconfig tsconfig.test.json
```

####
[APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext)
now accepts
[`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)
and `string` as query parameters

You can now pass
[`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)
and `string` as query parameters to
[APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext):

```ts
test('query params', async ({ request }) => {
  const searchParams = new URLSearchParams();
  searchParams.set('userId', 1);
  const response = await request.get(
      'https://jsonplaceholder.typicode.com/posts',
      {
        params: searchParams // or as a string: 'userId=1'
      }
  );
  // ...
});
```

#### Miscellaneous

- The `mcr.microsoft.com/playwright:v1.47.0` now serves a Playwright
image based on Ubuntu 24.04 Noble.
To use the 22.04 jammy-based image, please use
`mcr.microsoft.com/playwright:v1.47.0-jammy` instead.
- The `:latest`/`:focal`/`:jammy` tag for Playwright Docker images is no
longer being published. Pin to a specific version for better stability
and reproducibility.
- New option `behavior` in
[page.removeAllListeners()](https://playwright.dev/docs/api/class-page#page-remove-all-listeners),
[browser.removeAllListeners()](https://playwright.dev/docs/api/class-browser#browser-remove-all-listeners)
and
[browserContext.removeAllListeners()](https://playwright.dev/docs/api/class-browsercontext#browser-context-remove-all-listeners)
to wait for ongoing listeners to complete.
- TLS client certificates can now be passed from memory by passing
`cert` and `key` as buffers instead of file paths.
- Attachments with a `text/html` content type can now be opened in a new
tab in the HTML report. This is useful for including third-party reports
or other HTML content in the Playwright test report and distributing it
to your team.
- `noWaitAfter` in
[locator.selectOption()](https://playwright.dev/docs/api/class-locator#locator-select-option)
was deprecated.
- We've seen reports of WebGL in Webkit misbehaving on GitHub Actions
`macos-13`. We recommend upgrading GitHub Actions to `macos-14`.

#### Browser Versions

-   Chromium 129.0.6668.29
-   Mozilla Firefox 130.0
-   WebKit 18.0

This version was also tested against the following stable channels:

-   Google Chrome 128
-   Microsoft Edge 128

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekday before 11am" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/ionic-team/ionic-framework).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41OS4yIiwidXBkYXRlZEluVmVyIjoiMzkuMjAwLjAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: ionitron <hi@ionicframework.com>
2025-03-14 16:54:45 +00:00
526f2b4a63 Merge branch 'main' into chore-sync-next-main 2024-08-30 13:35:59 -04:00
253465a8be test(refresher): update test page fullscreen title (#29614)
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 test page has the wrong title text.

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

- Updated the text to reflect the purpose of the page.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## 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
2024-06-26 20:30:58 +00:00
1f66f4a24e Merge remote-tracking branch 'origin/main' into chore-sync-next-with-main 2024-06-17 16:57:57 -07:00
5cdfac89f5 fix(refresher): show when content is fullscreen (#29608)
Issue number: resolves #18714

---------

<!-- 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 `ion-content` has the fullscreen attribute, the `ion-refresher`
will be hidden while refreshing. This can be seen by dragging far enough
to trigger it to snap back and refresh.

The refresher ends up being hidden behind the background content
element.


https://github.com/ionic-team/ionic-framework/assets/13530427/27b5393b-dd31-44a5-b872-97709e3a0980


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

- Set the `--offset-top` to `0px` for the background content element.
This reflects the same behavior of when the content is not fullscreen.
By setting this to `0px`, the refresher is visible while refreshing.
- Added a private prop within refresher to keep track of whether
`ion-content` is `fullscreen` or not.
- Added test.

Originally, I was going to update the `pullMin` and `pullMax` as agreed
on from the investigation ticket. However, it ended up adding too much
space between the refresher and the content. This is the reason why I
decided to modify the background background instead. Otherwise, it
wouldn't mimic the behavior when content doesn't have the `fullscreen`
attribute.

Example of what the spacing looked like:


https://github.com/ionic-team/ionic-framework/assets/13530427/389cea62-48c1-4464-be47-44bc3b6c0315


## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

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


[Preview](https://ionic-framework-git-rou-4950-ionic1.vercel.app/src/components/refresher/test/fullscreen)

How to test:
1. Navigate to the preview page
2. Use the browser's simulator to chose an iOS device (might need to
refresh the page)
3. Drag the screen down
4. Verify that the refreshing text is shown
5. Use the browser's simulator to chose an Android device (might need to
refresh the page)
6. Drag the screen down
7. Verify that the refreshing text is shown
2024-06-12 17:48:11 +00:00
ef9b823dcd style: run build, lint, and remove !default Sass variables 2024-05-02 17:30:30 -04:00
8b834387d4 Merge branch 'main' into chore-update-next-from-main 2024-05-02 16:43:54 -04:00
6e8bf4914f chore(theming): remove Sass default flags (#29401)
Issue number: N/A

---------

## What is the current behavior?
Currently, every Sass variable in Ionic has the `!default` flag added to
the end.

From the [Sass variables
documentation](https://sass-lang.com/documentation/variables/):

> Normally when you assign a value to a variable, if that variable
already had a value, its old value is overwritten. But if you’re writing
a Sass library, you might want to allow your users to configure your
library’s variables before you use them to generate CSS.
> 
> To make this possible, Sass provides the `!default` flag. This assigns
a value to a variable only if that variable isn’t defined or its value
is [null](https://sass-lang.com/documentation/values/null). Otherwise,
the existing value will be used.

In past versions of Ionic Framework, developers wrote Sass variables to
rebuild Ionic Framework using their own values. In the latest versions
of Ionic Framework, this is not possible.

## What is the new behavior?
Removes the `!default` flag from all Sass variables.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

-------

Co-authored-by: brandyscarney <brandyscarney@users.noreply.github.com>
2024-04-25 19:59:10 +00:00
1e757513ce feat(ionic-theme): improve scss architecture for ionic theme (#29345)
Issue number: None

---------

<!-- 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 new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

This PR follows the architectural changes defined on the _SCSS
Architecture Design Doc_. Due to some of the developments done in the
meantime, not everything that was defined on that document was followed
and some sections were simplified.

Overall, there were two guidelines that supported the work on this PR:
- Have no impact on the current scss partials & CSS architecture for the
`md/iOS` themes.
- Make everything related to the new `Ionic` Theme separated.

Based on these, here're the changes made:

**On Themes folder (private):**
- Renamed current internal scss partials on src/themes, related to
md/iOS, to `native.*.scss` and move them to a new folder, called
`native`. Updated imports on all framework.
- Removed the ionic prefix from the name of the mixins and function
partials on src/themes. Updated imports on all framework.
- Created new folder, named ionic, inside src/themes. This holds the
`ionic.globals.scss`, with all the mixins and functions forwarded, to be
used on other scopes.
- Replaced on already created Ionic theme files, the usage of tokens and
mixins with @use, to instead _@use
"../../themes/ionic/ionic.globals.scss" as globals;_. This ensures an
equal approach is followed everywhere and also makes it easier to change
the files imported or paths, in the future, as its all in the same
global file.
- Updated the foundations `readMe` file, with the new process for using
globals.


![themes](https://github.com/ionic-team/ionic-framework/assets/32780808/1455523c-3ccd-4310-a974-522f9f8ade02)


**On css folder (public):**
- Created new folder, named `ionic`, inside src/css. This holds all the
files related exclusively to Ionic Theme, following the same structure
as exists now for md/iOS, with a core, a bundle, utils, etc. Some files
were a bit duplicated, to eliminate imports from ios or md theme
partials. The only file common to both Themes is the `normalize.scss`.
- No folder structure or renamings were done on the existing output, to
prevent breaking-changes for developers already making imports from this
folder.
- Updated typography and link partials to use globals instead of tokens.
- Changed `font-size` styles on typography to be on `body`, instead of
`html`, to enable correct support of accessibility features on browsers
and devices, related to `font-size`.


![css](https://github.com/ionic-team/ionic-framework/assets/32780808/10bedddc-23c1-4c50-a4e4-77fb7f6c6430)


**Other changes related to global styles new architecture:**
- Updated margin & padding utility-classed generated by token, to
include css variables and padding/margin mixins.
- Updated link test to use new global Ionic bundle, correct
utility-class on ion-content and updated snapshots. The font-size
changed to 16, as its now the default on the body.
- Updated typography snapshots.
- Updated prettier format on all scss files. Later on we should make
sure this is equal for all team members.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

---------

Co-authored-by: Sean Perkins <sean@ionic.io>
2024-04-18 17:22:24 +01:00
284eb8ecaf feat: add ionic theme architecture (#29132)
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. -->

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

Adds the base architecture to add a new theme configuration to Ionic
Framework components.
- Components can now specify an additional stylesheet for the `ionic`
theme.
- Developers can specify the `theme` and `mode` independently to control
look and feel of a component.

Test infrastructure has been updated to add support for testing the
theme configuration with Playwright.
- Existing `themes` test configuration has been renamed to `palettes`

This PR is just the initial effort to decouple Ionic's architecture to
separate look and feel and allow our dev team to start introducing the
new component appearance to the UI. There will be additional changes
required to completely add support for the Ionic theme. These changes
are targeted against the `next` branch and are not expected to be used
in a production environment at this time.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## 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: Maria Hutt <thetaPC@users.noreply.github.com>
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-03-18 15:45:01 -04:00
b148b3225b chore(playwright): migrate themes to palettes (#29148)
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. -->

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

- Migrates the test infrastructure to use `palettes` instead of `themes`

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## Other information

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

This **does not** change where the light/dark/high contrast styles live
or how they are consumed in the test infra. That work is done here:
https://github.com/ionic-team/ionic-framework/pull/29149

Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2024-03-14 10:29:09 -04:00
ca61e5061b feat: add high contrast themes (#29010)
⚠️ This is a combination of previously approved PRs with the
exception of
fe9dca513c.
This change was made as a result of
https://github.com/ionic-team/ionic-framework-design-documents/pull/248.

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

Users do not have a way of increasing the contrast in Ionic apps. This
is valuable for people with low vision as increasing the contrast
between foreground and background content helps improve readability.

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

- Adds a high contrast light and high contrast dark theme. As with our
other themes, developers can choose between system, class, and always
stylesheets.

While we aim to improve contrast for text and UI components, this
feature prioritizes text in the event that both text and UI component
cannot be improved without one negatively impacting the other.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## 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.6.7-dev.11706894781.1cd59fde`

Testing instructions:

1. Open `src/themes/test/css-variables`. Activate the high contrast
light and dark themes to verify that contrast does increase.
2. Use the dev build to integrate the theme into a test app (conference
app, starter app, etc).

I'd recommend using these imports:

```css
@import "@ionic/angular/css/themes/high-contrast.system.css";
@import "@ionic/angular/css/themes/high-contrast-dark.system.css";
```
Note: Make sure this is imported **after** `core.scss`

---------

Co-authored-by: Shawn Taylor <shawn@ionic.io>
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
Co-authored-by: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com>
2024-02-13 12:20:04 -05:00
1091534397 chore: sync with main 2024-02-07 11:48:46 -05:00
b43b9ecfe0 refactor(refresher-content): remove the aria-label (#28968)
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2024-02-05 08:19:49 -08:00
2a3c26e44d test(many): replace waitForSelector with waitFor (#28888)
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 some tests that use Playwright's `waitForSelector`
[function](https://playwright.dev/docs/api/class-page#page-wait-for-selector).
However, Playwright has informed the community to not use this function
by labeling it as
[discouraged](https://playwright.dev/docs/api/class-page#page-wait-for-selector).

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

- Replaced `waitForSelector` with the
[recommended](https://playwright.dev/docs/api/class-page#page-wait-for-selector)
`waitFor`
[function](https://playwright.dev/docs/api/class-locator#locator-wait-for).

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## 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
2024-01-26 16:32:40 +00:00
74de16f862 chore(): sync 2024-01-25 12:35:32 -05:00
15e368c378 feat(theme): improved color contrast with color palette (#28791)
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 team would like to ensure that Ionic Framework components that use
an Ionic color (primary, secondary, etc) on top of a contrast color pass
minimum contrast ratios as defined in the WCAG.

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

- Introduces a revised set of Ionic colors that pass AA color contrast
guidelines when with the appropriate contrast.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## 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: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
Co-authored-by: Brandy Carney <brandy@ionic.io>
Co-authored-by: Sean Perkins <sean@ionic.io>
Co-authored-by: Shawn Taylor <shawn@ionic.io>
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
Co-authored-by: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
Co-authored-by: ionitron <hi@ionicframework.com>
2024-01-08 15:30:35 -05:00
e5226016a0 fix(refresher): native ios refresher works on iPadOS (#28620)
Issue number: resolves #28617

---------

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

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

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

We currently check to see if `webkitOverflowScrolling` is supported on
the refresher's style object in order to enable to native iOS refresher.
This works well for iOS, but it does not work for iPadOS. This is
because this property was removed in iPadOS 13:
https://developer.apple.com/documentation/safari-release-notes/safari-13-release-notes

> Disabled -webkit-overflow-scrolling: touch on iPad. All frames and
scrollable overflow areas now use accelerated one-finger scrolling
without changing stacking.

As a result, the native iOS refresher does not activate on iPadOS.


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

- I think it's safe to assume that `webkitOverflowScrolling` may be
removed on iOS in the future too since it was already removed on iPadOS.
As a result, I implemented a solution that avoids checking this.
- The `CSS.supports` check is required because otherwise the native iOS
refresher would be activated in an emulated environment such as Chrome
dev tools because the user agent is spoofed. The `apple-pay-logo-black`
named image is only supported on Apple devices.

Risks:

- Apple could remove the `apple-pay-logo-black` named image in the
future. However, we currently use this check elsewhere in Ionic too and
it has worked well:
60303aad23/core/src/components/datetime/datetime.ios.scss (L177).
- Apple could add touch emulation to desktop Safari which could cause
the native refresher to activate when using responsive design mode for
testing. However, this would only impact app developer and would not
impact production use cases.

## 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.5.8-dev.11703088210.14a72b83`

Co-authored-by: Sean Perkins <sean-perkins@users.noreply.github.com>

---------

Co-authored-by: Sean Perkins <sean-perkins@user.noreply.github.com>
2023-12-20 17:28:27 +00:00
7ce1031c17 fix(refresher): mode property can be used in typescript (#28717)
Issue number: resolves #28716

---------

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

All components that have per-mode stylesheets can have their mode
adjusted by setting `mode` on the component. We use the `setMode`
function to determine which mode to use on the component:
516b84475e/core/src/global/ionic-global.ts (L75)

While this works on refresher, it is missing the `virtualProp` jsdoc
comment which causes it to not have the appropriate type information. As
a result, when developers try to use a JS binding for `mode`, they will
get compilation errors.

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

- Adds virtualProp for mode to refresher

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## Other information

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


I am considering this a bug fix instead of a feature. In non-TypeScript
environments you can set `mode` on `ion-refresher` and it does change
the mode. What's missing here is the type information associated with
it.

Dev build: `7.6.2-dev.11702914017.1ae72da5`
2023-12-18 18:09:25 +00:00
15a02253d3 chore: add stronger types to several files (#28347)
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. -->

As part of FW-2832, the team would like to swap out usages of the any
type for stronger types.

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


c529bc23f1
- `scrollToTop` doesn't return anything, so I added the `void` return
type


a96971ad28
- `animation.effect` is a type of
[AnimationEffect](https://developer.mozilla.org/en-US/docs/Web/API/Animation/effect).
One of the more common types of effects is a `KeyframeEffect`. However,
TypeScript doesn't know which specific type of AnimationEffect we are
using, so I cast `animation.effect` as KeyframeEffect where appropriate.
- I also added `!` to places where we know the effect and other
properties are always defined (since they run after the web animation
has been constructed)
- Added stronger types to the internal to/from/fromTo functions (the
public facing type improvements are in
https://github.com/ionic-team/ionic-framework/pull/28334)


fdaf550059
- `getRootNode` can return multiple types of objects, so I cast it to
the specific types that we work with in `isFocused`.


46a6efa510
- Added the "Animation" type and resolved related errors once we had
stronger types


a7cb9a5685
- Made heavier use of the `T` generic
- Once we know `node` is an Element (`nodeType === 1`) we manually cast
the element as `T`


6a9d1f095d
- The focus visible utility is an internal utility, but it was lacking
an interface, so I added one.


90b64c2de5
- Removed unneeded HTMLElement casting
- Added `!` since we can assume the selected elements are defined with
the refresher
- Added documentation as to why casting `referencEl.style` as `any` is
something we need to keep.


3a084caf83
- Avoided the Event naming collision by using globalThis

## 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 contains only type changes. Changes the required updates
to the implementation of Ionic are pulled out into separate PRs and
target a minor release branch to minimize risk.

---------

Co-authored-by: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com>
2023-10-23 16:46:42 +00:00
eafa7b5dc6 test(many): gestures flakiness (#27808)
Issue number: multiple internals

---------

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

Multiple tests that use gestures are flaky on GitHub. Due to that those
tests are being skipped.

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

- `page.mouse.move` will not work as expected if it the mouse moves
outside of the viewport. This may lead to events to not fire every time.
There's now a check to determine if the coordinates are valid. If they
are not, then it will update the coordinates to be as close to the
viewport's edge instead of being outside.
- Safari doesn't repaint the frame as often as the other browsers. This
causes the tests on GitHub to appear to be lagging. Now the frame is
forced to repaint only for Safari.
- Most tests are no longer being skipped.
- Range is still having issues on GitHub. It is no longer flaky locally
with the changes in this PR. I've had to revert them back to skip until
further notice.

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

If this PR is merged, then:
- FW-3006, FW-2795, and FW-3079 can be closed
- FW-4556 still needs to remain open since range is still flaky on
GitHub

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com>
2023-08-14 20:12:04 +00:00
16c77ccdc8 refactor: use capacitor types for native plugins (#27755)
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. -->

Ionic currently detects and uses Capacitor APIs for different plugins
(haptics, status bar and keyboard). This implementation does not have
type safety and can result in unexpected behaviors.

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

- Adds `@capacitor/core`, `@capacitor/keyboard`, `@capacitor/haptics`
and `@capacitor/status-bar` as dev dependencies. These should _only_ be
used with `import type { }`.
- Refactors the plugin usages to be typed against the plugin packages,
while using a duplicate enum when needing a value. This allows us to not
bundle the capacitor plugins with Ionic Framework.
- Introduces a `getCapacitor()` function for interacting with the
`window.Capacitor` object through a typed object.

**How does it work?**

The idea is we want the type safety from the Capacitor packages, without
directly bundling that source code within Ionic Framework. This means we
use the Capacitor deps where a type is needed, but clone any enums where
a value is referenced. If a Capacitor dep changes the supported values,
Typescript will fail to compile and that will signal to use to update
our enum values to match any changes.

## 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.1.2-dev.11688696027.1c4d4ad1`

Tested against a demo app for some of the core behavior:
https://github.com/sean-perkins/capacitor-ionic-plugins-demo
2023-07-14 15:27:28 +00:00
6fab2a98b3 chore(): sync with main 2023-06-20 10:05:00 -04:00
92c55452fd fix(refresher): scroll styles are reset when using non-native refresher (#27602)
Issue number: resolves #27601 

---------

## What is the current behavior?
The current behavior restores overflow styles while moving (within the
setCSS function).

## What is the new behavior?
Overflow styles are restored when refresher gesture ends.

## 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. -->
Honestly, I don't know exactly. From code perspective I would say 'Yes',
but I can't get the impact of the change.

Ionic Team edit: There are no changes to the public API, and this is
fixing a behavior that used to work so there are no breaking changes.

## 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: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2023-06-07 20:37:25 +00:00
6c68c56a7f Merge remote-tracking branch 'origin/main' into chore/sync-with-main-6 2023-05-05 13:30:21 -05:00
141683a4a2 test(refresher): migrate to generators (#27370)
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. -->

Refresher tests are using legacy syntax

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

- Refresher tests are using modern syntax


299b562d52

- These tests check the pull to refresh behavior which does not vary
across directions, so I removed the extra checks.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-05-03 23:57:54 +00:00
10d2c75f8d Merge remote-tracking branch 'origin/main' into chore/sync-with-main-5-3 2023-05-03 13:38:03 -04:00
4826a3d9f5 test(config): introduce legacy and modern playwright projects (#27228)
Issue number: N/A

---------

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

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

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

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

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


1e5012cea1

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


4fe8de7df7

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


e8bcfaf926

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


5bf196c36d
(warning: lots of files!)

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

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-04-26 18:27:17 +00:00
0a0345a84a refactor(many): use utils import (#27160) 2023-04-12 13:25:14 -07:00
adbb50ca5b fix(refresher): set overflow styles when using custom scroll target (#27058)
* bug(refresher): set overflow styles when using custom scroll target

* bug(refresher): set overflow styles when using custom scroll target

* Apply suggestions from code review

Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>

* Add comment

---------

Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2023-04-04 16:04:50 +00:00
c85b5308a1 chore(): sync with main 2023-02-08 09:44:42 -05:00
9d6ec2925c fix(refresher): prevent clearing virtual scroll overflow styling (#26613)
Resolves #26553
2023-02-02 13:20:03 -05:00
1a8bd6d8c6 chore(deps): update to stencil v3 (#26663) 2023-01-31 18:07:22 -05:00
b78b454e08 revert(): revert base components feature (#26692)
The Ionic Framework team would like to re-evaluate our approach to improving customization options when building mobile applications. We are looking at other solutions that a) make customizing an app UI easier and b) are applicable to a broader set of developers.
2023-01-30 11:52:36 -05:00
18f109c7da feat(base-components): add ability to remove ios and md theme (#26669) 2023-01-24 16:18:35 -05:00
c2e1ad385d chore(many): replace any types and add tech debt tickets (#26293)
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2023-01-06 09:34:55 -06:00
e3ef932ae1 chore(many): add tech debt tickets and remove unnecessary todos (#26266) 2022-11-14 14:49:08 -06:00
c0f287e525 chore(): sync with main 2022-09-16 15:24:24 -04:00
2969169f50 test(refresher): disable pull to refresher tests (#25887) 2022-09-08 11:56:44 -04:00
ae6aa0cb8e chore(eslint): add strict-boolean-expressions rule (#25768) 2022-08-23 11:50:02 -05:00
bd715a5256 fix(refresher): use componentOnReady utility for CE build (#25783)
Resolves #25782
2022-08-22 12:52:47 -04:00
e750e33616 fix(refresher): refresher is visible with multiple custom scroll targets (#25750)
Resolves #25495
2022-08-15 14:58:38 -04:00
3abfa780cc fix(refresher): quickly swiping down no longer causes duplicate refresh (#25476)
resolves #25418
2022-06-15 14:33:25 -04:00
982909017b chore(playwright): dragElementByYAxis util (#25346) 2022-05-31 09:27:49 -04:00