Compare commits

...

128 Commits

Author SHA1 Message Date
Sean Perkins
16639f1849 chore: update lockfiles 2024-02-01 23:20:40 -05:00
Sean Perkins
282ef4cd48 chore: upgrade ng-packagr to 15.2.0
Prior to this version, ng-packgr had a bad glob pattern that would process all readme files, even those in the node_modules directory. Combine this with hoisted dependencies with pnpm and you have a very bad time.
2024-02-01 23:00:55 -05:00
Sean Perkins
bacc15b2ff chore: workspace configuration 2024-02-01 22:55:36 -05:00
Sean Perkins
cec43e5f46 chore(angular): pnpm 2024-02-01 22:53:04 -05:00
Sean Perkins
124771ae75 fix: react test app packages resolution 2024-02-01 20:45:36 -05:00
Sean Perkins
ce8b8fa426 fix: package resolution at root 2024-02-01 20:37:07 -05:00
Sean Perkins
ce73d3ced9 fix: react-router package resolution 2024-02-01 20:34:50 -05:00
Sean Perkins
c43d1b6e19 chore: add core to test app workspace 2024-02-01 20:19:41 -05:00
Sean Perkins
8caddbcbc0 chore: remove override 2024-02-01 20:16:48 -05:00
Sean Perkins
079467eff4 fix: package resolution 2024-02-01 20:07:56 -05:00
Sean Perkins
cd2ff30b56 chore: try shamefully hoisting test app deps 2024-02-01 19:24:39 -05:00
Sean Perkins
b69edcf1a2 revert: rollup options to externalize stencil/core 2024-02-01 19:02:23 -05:00
Sean Perkins
180de3d23b chore: externalize @stencil/core/internal/client 2024-02-01 19:01:17 -05:00
Sean Perkins
884a6ddea0 chore: try rollup options 2024-02-01 19:01:17 -05:00
Sean Perkins
5f80919cfe chore: try using link 2024-02-01 19:01:17 -05:00
Sean Perkins
6841046163 revert: excluding stencil/core had no effect 2024-02-01 19:01:17 -05:00
Sean Perkins
331e44cdcb chore: attempt to exclude stencil/core from optimization 2024-02-01 19:01:17 -05:00
Sean Perkins
8143c2935a chore: type issues with react components 2024-02-01 19:01:17 -05:00
Sean Perkins
386f893053 revert: run tsc for type checking on build 2024-02-01 19:01:17 -05:00
Sean Perkins
0e9b3b7547 chore: we do not need to run tsc with vite 2024-02-01 19:01:17 -05:00
Sean Perkins
a480089b1f chore: dependency resolution for @ionic/core 2024-02-01 19:01:17 -05:00
Sean Perkins
a75e6dd8d9 chore(react): pnpm developer workflow for live reload 2024-02-01 19:01:17 -05:00
Sean Perkins
fb48489803 chore(test-apps): improve developer message with test apps (#28917)
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. -->

- Improves the developer message when generating a test app to include
the next steps to running the test app.

## 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. -->
2024-01-31 11:34:57 -05:00
Sean Perkins
4ed6c60a69 chore(angular,react,vue): copy css with build.watch (#28934)
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. -->

CSS is not copied from the `core/` package when running each respective
framework package in watch mode.

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

- Copies the global styles from the `core/` package to each respective
framework package when running the build in watch mode.

Note: This does not register a file watcher to copy CSS updates after
the initial command is ran. This just avoids a scenario of the global
styles being updated and the developer _not_ running a `pnpm build`
prior to running `pnpm build.watch` and the global styles not being
reflected in the framework package.

## 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. -->
2024-01-31 11:34:40 -05:00
Liam DeBeasi
ac251c75fb Merge remote-tracking branch 'origin/main' into workspace-test 2024-01-29 14:06:08 -05:00
Liam DeBeasi
b1c4c72474 refactor(react, react-router): build works on windows (#28904)
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. -->

React and React Router packages do not build correctly on Windows
because certain dependencies were not marked as external.
## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- 3rd party packages are correctly marked as external


## 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. -->
2024-01-29 18:15:50 +00:00
Sean Perkins
589c24a4fe chore: update pnpm lock 2024-01-29 10:57:28 -05:00
Sean Perkins
c0875573be Merge remote-tracking branch 'origin/main' into workspace-test 2024-01-29 10:55:53 -05:00
Liam DeBeasi
9448783bb1 fix(item): only default slot content wraps (#28773)
Issue number: resolves #28769

---------

<!-- 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 https://github.com/ionic-team/ionic-framework/pull/28146, we
allowed text wrapping inside of `ion-item` for accessibility purposes.
One of the behaviors we added was to allow start, default, and end
slotted containers to wrap to the next line to align with the iOS spec.
However, this decision was based on an incorrect assumption.

The following screenshot shows the Settings app on iOS:

| default scale | 310% scale |
| - | - |
| <img width="1170" alt="Frame 4"
src="https://github.com/ionic-team/ionic-framework/assets/2721089/462ef153-a060-41c8-9a00-f0aad17839be">
| <img width="1170" alt="Frame 5"
src="https://github.com/ionic-team/ionic-framework/assets/2721089/f047f880-7b80-4710-939b-96da075fbbf9">
|

At the default scale, the blue icon is in the iOS equivalent of the
"start" slot, "Bluetooth" is in the default slot, and "On" is in the
"end" slot. We incorrectly assumed the same markup was true when scaling
the text up. However, at 310% scale the icon, "Bluetooth" text, and "On"
text all become part of the default slot in a single container that
wraps. You can tell because the bottom border runs underneath the blue
icon at 310% whereas it does not at the default scale. This allows the
text to wrap underneath the blue icon. When we originally implemented
#28146 we thought that this meant the start, default, and end slot
containers should wrap to the next line.

I further validated this behavior by creating an app with Swift UI. I
created a list of items where each item has the native equivalent of a
checkbox in the `start` slot and multiple `ion-labels` in the default
slot of the item:

| Default Scale | 310% Scale |
| - | - |
|
![IMG_3133](https://github.com/ionic-team/ionic-framework/assets/2721089/8b55bd1d-f7a8-4fec-bda4-d1bb12f50d34)
|
![IMG_3134](https://github.com/ionic-team/ionic-framework/assets/2721089/92e8a196-36e4-47d6-a4e5-a0e991c78d0d)
|

The content within each label wraps within the container, but the
containers themselves never wrap to the next line.

Demo code:

```swift
import SwiftUI

struct ContentView: View {
    struct Item: Identifiable, Hashable {
        let id = UUID()
    }

    private var items = [
        Item(),
        Item(),
        Item(),
        Item(),
        Item()
    ]

    @State private var multiSelection = Set<UUID>()

    var body: some View {
        NavigationView {
            List(items, selection: $multiSelection) {_ in
                HStack {
                    Text("Column 1 with really long text")
                    Text("Column 2 with really long text")
                    Text("Column 3 with really long text")
                    Text("Column 4 with really long text")
                }
            }
            .toolbar { EditButton() }
        }
        Text("\(multiSelection.count) selections")
    }
}

#Preview {
    ContentView()
}
```

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

- This PR removes the ability for the start, default, and end slot
containers to wrap to the next line. This behavior aligns with
pre-v7.6.0 behaviors. The containers inside of the default slot will not
wrap to the next line. However, content within each container (such as
text within an `ion-label`) will continue to wrap to meet the team's
accessibility requirements.

## 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.5-dev.11704916749.1e64a3a7`

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2024-01-26 22:14:48 +00:00
Amanda Johnston
720a3cea99 test(react): re-enable picker tests (#28885)
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 `IonPicker` tests in the React app were skipped due to a Stencil bug
that has since been resolved.

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

Tests re-enabled.

## 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. -->
2024-01-26 21:16:14 +00:00
dependabot[bot]
b81d85a401 chore(deps-dev): Bump @axe-core/playwright from 4.8.3 to 4.8.4 in /core (#28887)
Bumps [@axe-core/playwright](https://github.com/dequelabs/axe-core-npm)
from 4.8.3 to 4.8.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dequelabs/axe-core-npm/releases"><code>@​axe-core/playwright</code>'s
releases</a>.</em></p>
<blockquote>
<h2>Release 4.8.4</h2>
<h2>What's Changed</h2>
<ul>
<li>chore: RC v4.8.3 by <a
href="https://github.com/github-actions"><code>@​github-actions</code></a>
in <a
href="https://redirect.github.com/dequelabs/axe-core-npm/pull/983">dequelabs/axe-core-npm#983</a></li>
<li>chore: bump puppeteer from 19.7.3 to 21.7.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/dequelabs/axe-core-npm/pull/979">dequelabs/axe-core-npm#979</a></li>
<li>Release v4.8.3 by <a
href="https://github.com/dequejenn"><code>@​dequejenn</code></a> in <a
href="https://redirect.github.com/dequelabs/axe-core-npm/pull/986">dequelabs/axe-core-npm#986</a></li>
<li>chore: bump the npm-low-risk group with 11 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/dequelabs/axe-core-npm/pull/982">dequelabs/axe-core-npm#982</a></li>
<li>chore: bump follow-redirects from 1.15.2 to 1.15.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/dequelabs/axe-core-npm/pull/988">dequelabs/axe-core-npm#988</a></li>
<li>chore: merge master into develop by <a
href="https://github.com/github-actions"><code>@​github-actions</code></a>
in <a
href="https://redirect.github.com/dequelabs/axe-core-npm/pull/987">dequelabs/axe-core-npm#987</a></li>
<li>ci: add env var required for creating gh releases by <a
href="https://github.com/michael-siek"><code>@​michael-siek</code></a>
in <a
href="https://redirect.github.com/dequelabs/axe-core-npm/pull/989">dequelabs/axe-core-npm#989</a></li>
<li>ci: remove deprecated release candidate action by <a
href="https://github.com/michael-siek"><code>@​michael-siek</code></a>
in <a
href="https://redirect.github.com/dequelabs/axe-core-npm/pull/990">dequelabs/axe-core-npm#990</a></li>
<li>fix(webdriverjs): use new headless argument to fix
selenium-webdriver@4.17.0 breaking release by <a
href="https://github.com/straker"><code>@​straker</code></a> in <a
href="https://redirect.github.com/dequelabs/axe-core-npm/pull/992">dequelabs/axe-core-npm#992</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/dequelabs/axe-core-npm/compare/v4.8.3...4.8.4">https://github.com/dequelabs/axe-core-npm/compare/v4.8.3...4.8.4</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/dequelabs/axe-core-npm/blob/develop/CHANGELOG.md"><code>@​axe-core/playwright</code>'s
changelog</a>.</em></p>
<blockquote>
<h1>Change Log</h1>
<p>All notable changes to this project will be documented in this file.
See <a href="https://conventionalcommits.org">Conventional Commits</a>
for commit guidelines.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0daba98684"><code>0daba98</code></a>
fix(webdriverjs): use new headless argument to fix
selenium-webdriver@4.17.0 ...</li>
<li><a
href="2220400acd"><code>2220400</code></a>
ci: remove deprecated release candidate action (<a
href="https://redirect.github.com/dequelabs/axe-core-npm/issues/990">#990</a>)</li>
<li><a
href="4f295d393a"><code>4f295d3</code></a>
ci: add env var required for creating gh releases (<a
href="https://redirect.github.com/dequelabs/axe-core-npm/issues/989">#989</a>)</li>
<li><a
href="81aefd5646"><code>81aefd5</code></a>
Merge pull request <a
href="https://redirect.github.com/dequelabs/axe-core-npm/issues/987">#987</a>
from dequelabs/master</li>
<li><a
href="7d49d53bbb"><code>7d49d53</code></a>
Merge branch 'develop' into master</li>
<li><a
href="92669c1ea1"><code>92669c1</code></a>
chore: bump follow-redirects from 1.15.2 to 1.15.5 (<a
href="https://redirect.github.com/dequelabs/axe-core-npm/issues/988">#988</a>)</li>
<li><a
href="dc380aa885"><code>dc380aa</code></a>
chore: bump the npm-low-risk group with 11 updates (<a
href="https://redirect.github.com/dequelabs/axe-core-npm/issues/982">#982</a>)</li>
<li><a
href="3ceecac297"><code>3ceecac</code></a>
Merge pull request <a
href="https://redirect.github.com/dequelabs/axe-core-npm/issues/986">#986</a>
from dequelabs/release</li>
<li><a
href="6b60442cbd"><code>6b60442</code></a>
chore: bump puppeteer from 19.7.3 to 21.7.0 (<a
href="https://redirect.github.com/dequelabs/axe-core-npm/issues/979">#979</a>)</li>
<li><a
href="54b75d095a"><code>54b75d0</code></a>
Merge pull request <a
href="https://redirect.github.com/dequelabs/axe-core-npm/issues/983">#983</a>
from dequelabs/release-2024-01-09</li>
<li>See full diff in <a
href="https://github.com/dequelabs/axe-core-npm/compare/v4.8.3...4.8.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@axe-core/playwright&package-manager=npm_and_yarn&previous-version=4.8.3&new-version=4.8.4)](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>
2024-01-26 21:16:03 +00:00
Maria Hutt
aecbc92e30 refactor(ga-screenshots): option to test single component (#27841)
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. -->

All the E2E tests are run when performing the "Update Reference
Screenshots" GitHub actions.

![Screenshot 2024-01-25 at 1 31
15 PM](https://github.com/ionic-team/ionic-framework/assets/13530427/bc27156b-bd91-446a-8878-0a3d8676b103)


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

- All E2E tests still run as default.
- The GH action has the option to run a specific component instead of
all tests.
- A specified component has the option to run all tests that include the
component's name in the file path
- A specified component has the option to run all tests that are in the
component's folder
- If a single component is selected, then the default is to only run
tests inside it's folder.

![Screenshot 2024-01-25 at 1 30
34 PM](https://github.com/ionic-team/ionic-framework/assets/13530427/0143fc0b-c7e7-4312-b7ea-e42a79dc7e09)


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

How to test:

1. Create a new branch based off this one
2. Make a style change
3. Push it to the new branch
4. Update the reference images using the new branch
5. This will show you all the options

Recommended to test:
- a component with the ion prefix (`ion-button`)
- a component without the prefix (`button`)
- a component that doesn't exist (`random-component`)
- no provided component, leave the first input blank
- the checkbox

---------

Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2024-01-26 19:26:22 +00:00
Bernardo Cardoso
bf7922c8b3 fix(item): ensure button focus state on property change (#28892)
Issue number: resolves #28525

---------

<!-- 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 navigated via tab-key, the ion-item is not highlighted correctly
after switching from button=false to button=true.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
Now, when dynamically changing the the `button` option to `True`,
there's a `@watch` callback that will make sure the internal
`isFocusable` `@state` will be updated.

- A new unit test was added to item/test. As there was still any unit
test for the `ion-item`, a new files was created - `item.spec.tsx`

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

New behavior in runtime:


![focusable](https://github.com/BenOsodrac/ionic-framework/assets/32780808/5c2179cb-c121-4529-92cc-4fb3d764b027)

---------

Co-authored-by: Sean Perkins <sean@ionic.io>
2024-01-26 17:08:47 +00:00
Maria Hutt
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
Liam DeBeasi
ddd8b92235 chore: remove old link scripts (#28886)
This script was used to aid in the test of local version of
`@ionic/angular`. However, these instructions have been replaced by the
instructions in `packages/angular/test/README.md`. This PR removes the
old script.
2024-01-25 20:15:28 +00:00
Liam DeBeasi
e35fe27803 chore: update e2e app lockfiles 2024-01-25 13:28:34 -05:00
Liam DeBeasi
b8464e1938 chore: update lockfile 2024-01-25 13:16:50 -05:00
Liam DeBeasi
14c8e826c2 chore: fix package.json merge conflict 2024-01-25 13:16:22 -05:00
Liam DeBeasi
594925ea78 chore: sync 2024-01-25 13:15:39 -05:00
Sean Perkins
55f9cba9fc fix: react-router test app package resolution 2023-12-28 16:22:25 -05:00
Sean Perkins
529ae0c80d fix: react test app package resolution
The file:../ resolution was causing each navigation to result in a reload of the entire app.
2023-12-28 16:05:08 -05:00
Sean Perkins
43777d18cd chore: update react test app lock file 2023-12-28 14:40:48 -05:00
Sean Perkins
f12335114d chore: update lock file 2023-12-28 14:32:35 -05:00
Sean Perkins
8156a00144 Merge remote-tracking branch 'origin/main' into workspace-test 2023-12-28 14:32:10 -05:00
Sean Perkins
7862856213 fix: exclude optimization in react, but include cjs dep 2023-12-28 14:14:16 -05:00
Sean Perkins
5226bbd5d2 fix: vite dep optimization issue with react test app and pnpm 2023-12-28 13:58:49 -05:00
Sean Perkins
7bb19b83bf chore: update contributing guide for pnpm 2023-12-26 16:06:24 -05:00
Liam DeBeasi
3a7f8b65fe add type package 2023-12-19 12:29:24 -05:00
Liam DeBeasi
29f5ba0535 test(react-router): add history types 2023-12-19 12:08:49 -05:00
Liam DeBeasi
ff34ff0274 test(react): add correct jest types 2023-12-19 12:07:01 -05:00
Liam DeBeasi
ae39ce8682 chore: sync with main 2023-12-19 11:58:49 -05:00
Liam DeBeasi
c0bc9739e0 test(react): fix e2e test apps 2023-12-19 11:57:25 -05:00
Liam DeBeasi
75bf909f58 add missing file 2023-12-19 11:53:28 -05:00
Liam DeBeasi
8174bc6325 test(angular): fix test apps 2023-12-19 11:53:16 -05:00
Liam DeBeasi
9e901309f2 history is a dependency 2023-12-19 11:50:05 -05:00
Liam DeBeasi
5053e53749 fix dep install 2023-12-19 11:43:05 -05:00
Liam DeBeasi
3ce7dcedb8 Remove file 2023-12-19 11:41:19 -05:00
Liam DeBeasi
f6ef93c777 test(angular): use file protocol for deps 2023-12-19 11:41:02 -05:00
Liam DeBeasi
3f49f16e06 test(vue): vue3 test app uses file 2023-12-19 11:37:57 -05:00
Liam DeBeasi
40122929bc chore: update 2023-12-19 11:34:34 -05:00
Liam DeBeasi
c44bfa07dd test(react-router): use file protocol for test app 2023-12-19 11:26:17 -05:00
Liam DeBeasi
252c91f492 refactor: remove test apps from workspace 2023-12-19 11:19:14 -05:00
Liam DeBeasi
d9e5b4aafb remove sync commands 2023-12-18 22:49:06 -05:00
Liam DeBeasi
622fcc0093 add history dep to react router 2023-12-18 22:41:03 -05:00
Liam DeBeasi
75fe3f4280 update react router tests to use workspace deps 2023-12-18 22:29:55 -05:00
Liam DeBeasi
e4e6d4525a react router test apps use pnpm 2023-12-18 22:29:11 -05:00
Liam DeBeasi
effc3f2fea remove extra — 2023-12-18 22:26:50 -05:00
Liam DeBeasi
1dfa61a9b8 install deps before creating test app 2023-12-18 22:19:53 -05:00
Liam DeBeasi
cd7563119b use pnpm commands 2023-12-18 22:09:10 -05:00
Liam DeBeasi
1a85f0e6c5 add react-router test app to pnpm workspace 2023-12-18 22:00:35 -05:00
Liam DeBeasi
8e9677ed46 run tests with pnpm 2023-12-18 22:00:09 -05:00
Liam DeBeasi
e7a573682c update pnpm lock 2023-12-18 21:58:08 -05:00
Liam DeBeasi
f9f0dc0ecb Revert "Revert "temporarily revert jest 29 change""
This reverts commit 129c424531.
2023-12-18 21:57:43 -05:00
Liam DeBeasi
7da50be0b9 stable lock file 2023-12-18 20:19:25 -05:00
Liam DeBeasi
5f3b88dbf7 angular test app live reload 2023-12-18 20:16:15 -05:00
Liam DeBeasi
05a535433c live reload with vue and react 2023-12-18 20:12:21 -05:00
Liam DeBeasi
2980a37463 try new way of setting token 2023-12-18 19:41:14 -05:00
Liam DeBeasi
129c424531 Revert "temporarily revert jest 29 change"
This reverts commit c84c0ce5cd.
2023-12-18 19:33:08 -05:00
Liam DeBeasi
c0a3301994 remove dist path for angular-server 2023-12-18 19:26:46 -05:00
Liam DeBeasi
1a0ee06fe0 add angular cli as dev dep 2023-12-18 18:40:02 -05:00
Liam DeBeasi
1fb4841468 revert old change 2023-12-18 18:37:19 -05:00
Liam DeBeasi
dc6c7d029e update testing library 2023-12-18 18:29:05 -05:00
Liam DeBeasi
00aa03764d remove unused file 2023-12-18 18:25:38 -05:00
Liam DeBeasi
e064babfbd update pnpm lock 2023-12-18 18:14:59 -05:00
Liam DeBeasi
c84c0ce5cd temporarily revert jest 29 change 2023-12-18 18:11:53 -05:00
Liam DeBeasi
091eaa0c1a try another fix 2023-12-18 18:09:40 -05:00
Liam DeBeasi
0c9472ad17 fix react tests 2023-12-18 17:42:33 -05:00
Liam DeBeasi
9bad82a0c4 use pnpm exec for playwright 2023-12-18 17:31:05 -05:00
Liam DeBeasi
4e94176b34 chore: sync 2023-12-18 17:05:43 -05:00
Liam DeBeasi
1a4baba30d skip git checks 2023-11-03 13:15:58 -04:00
Liam DeBeasi
eb5a489ee4 git diff test 2023-11-03 13:11:45 -04:00
Liam DeBeasi
4129444b2f chore: install pnpm 2023-11-03 13:07:04 -04:00
Liam DeBeasi
c07b1cf924 update public script 2023-11-03 13:04:48 -04:00
Liam DeBeasi
fcd633f7a3 chore: update release process to use pnpm 2023-11-03 13:02:10 -04:00
Liam DeBeasi
91000ddcec chore: remove — — 2023-11-03 12:26:38 -04:00
Liam DeBeasi
670849088e chore: fix screenshot tests maybe 2023-11-03 12:17:36 -04:00
Liam DeBeasi
cc3dd4984f chore(angular-server): restore core build on CI 2023-11-03 12:09:03 -04:00
Liam DeBeasi
57661355f4 chore(angular): fix eslint pattern 2023-11-03 12:07:45 -04:00
Liam DeBeasi
d852ee5b72 chore: pass flags correctly 2023-11-03 11:53:44 -04:00
Liam DeBeasi
647320dd4b chore: update scripts to use pnpm 2023-11-03 11:45:21 -04:00
Liam DeBeasi
f4c3ee8673 chore(react): update testing library dep 2023-11-03 11:37:07 -04:00
Liam DeBeasi
02ad14d837 chore(react): install jest-environment-jsdom as dev dep 2023-11-03 11:01:01 -04:00
Liam DeBeasi
ea3c544bcb chore(ci): core prerelease builds with pnpm 2023-11-03 10:48:51 -04:00
Liam DeBeasi
ed28f1a86e chore(angular): remove sync script 2023-11-03 10:46:34 -04:00
Liam DeBeasi
83c2ea2616 chore(ci): build angular and angular-server with pnpm 2023-11-03 10:46:07 -04:00
Liam DeBeasi
f9ca2f2f77 chore(react, react-router): remove sync script 2023-11-03 10:44:04 -04:00
Liam DeBeasi
e53be3946a chore(ci): build react and react router with pnpm 2023-11-03 10:43:34 -04:00
Liam DeBeasi
9427951e80 chore(vue, vue-router): remove sync scripts 2023-11-03 10:42:16 -04:00
Liam DeBeasi
be1c9421dd chore(ci): build vue and vue router 2023-11-03 10:41:18 -04:00
Liam DeBeasi
0fa25899f0 chore(ci): build core with pnpm 2023-11-02 17:52:46 -04:00
Liam DeBeasi
054e03beb6 chore(core): add fast-deep-equal devdep 2023-11-02 17:51:21 -04:00
Liam DeBeasi
fcf536ae87 Merge remote-tracking branch 'origin/rollup-watch' into workspace-test 2023-11-02 17:22:37 -04:00
Liam DeBeasi
4492d985f5 clean up commands 2023-11-02 17:21:23 -04:00
Liam DeBeasi
8dffb5fc3b refactor(angular, angular-server): add watch commands 2023-11-02 17:20:47 -04:00
Liam DeBeasi
1218eada08 prevent accidental npm installs 2023-11-02 17:11:09 -04:00
Liam DeBeasi
3fbdd8d47e refactor(vue): extend type from correct package 2023-11-02 17:08:01 -04:00
Liam DeBeasi
d264042d6d refactor(angular): add correct dependencies 2023-11-02 16:42:57 -04:00
Liam DeBeasi
0c88cb00f9 refactor(angular): update devdeps to 14.3.0 2023-11-02 16:38:25 -04:00
Liam DeBeasi
b2b9ff6712 remove package lock 2023-11-02 16:38:19 -04:00
Liam DeBeasi
14b94f4269 refactor: add pnpm and workspace 2023-11-02 16:37:57 -04:00
Liam DeBeasi
6e3fd70bf0 refactor: add watch command 2023-11-01 17:23:30 -04:00
Liam DeBeasi
d1507fbfdb Merge branch 'main' into rollup-ts 2023-11-01 17:00:59 -04:00
Liam DeBeasi
36aed8c90d typo 2023-11-01 14:34:30 -04:00
Liam DeBeasi
1175b258e7 remove line 2023-11-01 14:33:34 -04:00
Liam DeBeasi
5ac163e4bd refactor(react-router): use ts rollup plugin 2023-11-01 13:20:10 -04:00
Liam DeBeasi
9721d3d877 refactor(react): use ts rollup plugin 2023-11-01 13:18:42 -04:00
Liam DeBeasi
266cebdff6 refactor(vue-router): use ts rollup plugin 2023-11-01 13:16:09 -04:00
Liam DeBeasi
4dd069282b refactor(vue): use ts rollup plugin 2023-11-01 13:16:00 -04:00
194 changed files with 130689 additions and 302085 deletions

View File

@@ -4,56 +4,53 @@ Thanks for your interest in contributing to the Ionic Framework! :tada:
- [Contributing Etiquette](#contributing-etiquette)
- [Creating an Issue](#creating-an-issue)
* [Creating a Good Code Reproduction](#creating-a-good-code-reproduction)
- [Creating a Good Code Reproduction](#creating-a-good-code-reproduction)
- [Creating a Pull Request](#creating-a-pull-request)
* [Requirements](#requirements)
* [Setup](#setup)
* [Core](#core)
+ [Modifying Components](#modifying-components)
+ [Preview Changes](#preview-changes)
+ [Lint Changes](#lint-changes)
+ [Modifying Documentation](#modifying-documentation)
+ [Modifying Tests](#modifying-tests)
- [Requirements](#requirements)
- [Setup](#setup)
- [Core](#core)
- [Modifying Components](#modifying-components)
- [Preview Changes](#preview-changes)
- [Lint Changes](#lint-changes)
- [Modifying Documentation](#modifying-documentation)
- [Modifying Tests](#modifying-tests)
- [Screenshot Tests](#screenshot-tests)
+ [Building Changes](#building-changes)
* [Angular, React, and Vue](#angular-react-and-vue)
+ [Modifying Files](#modifying-files)
+ [Preview Changes](#preview-changes-1)
+ [Lint Changes](#lint-changes-1)
+ [Modifying Tests](#modifying-tests-1)
+ [Building Changes](#building-changes-1)
* [Submit Pull Request](#submit-pull-request)
- [Building Changes](#building-changes)
- [Angular, React, and Vue](#angular-react-and-vue)
- [Modifying Files](#modifying-files)
- [Preview Changes](#preview-changes-1)
- [Lint Changes](#lint-changes-1)
- [Modifying Tests](#modifying-tests-1)
- [Building Changes](#building-changes-1)
- [Submit Pull Request](#submit-pull-request)
- [Commit Message Guidelines](#commit-message-guidelines)
* [Commit Message Format](#commit-message-format)
* [Revert](#revert)
* [Type](#type)
* [Scope](#scope)
* [Subject](#subject)
* [Body](#body)
* [Footer](#footer)
* [Examples](#examples)
- [Commit Message Format](#commit-message-format)
- [Revert](#revert)
- [Type](#type)
- [Scope](#scope)
- [Subject](#subject)
- [Body](#body)
- [Footer](#footer)
- [Examples](#examples)
- [License](#license)
## Contributing Etiquette
Please see our [Contributor Code of Conduct](https://github.com/ionic-team/ionic-framework/blob/main/CODE_OF_CONDUCT.md) for information on our rules of conduct.
## Creating an Issue
* If you have a question about using the framework, please ask on the [Ionic Forum](http://forum.ionicframework.com/) or in the [Ionic Discord](https://ionic.link/discord).
- If you have a question about using the framework, please ask on the [Ionic Forum](http://forum.ionicframework.com/) or in the [Ionic Discord](https://ionic.link/discord).
* It is required that you clearly describe the steps necessary to reproduce the issue you are running into. Although we would love to help our users as much as possible, diagnosing issues without clear reproduction steps is extremely time-consuming and simply not sustainable.
- It is required that you clearly describe the steps necessary to reproduce the issue you are running into. Although we would love to help our users as much as possible, diagnosing issues without clear reproduction steps is extremely time-consuming and simply not sustainable.
* The issue list of this repository is exclusively for bug reports and feature requests. Non-conforming issues will be closed immediately.
- The issue list of this repository is exclusively for bug reports and feature requests. Non-conforming issues will be closed immediately.
* Issues with no clear steps to reproduce will not be triaged. If an issue is labeled with "needs: reply" and receives no further replies from the author of the issue for more than 14 days, it will be closed.
- Issues with no clear steps to reproduce will not be triaged. If an issue is labeled with "needs: reply" and receives no further replies from the author of the issue for more than 14 days, it will be closed.
* If you think you have found a bug, or have a new feature idea, please start by making sure it hasn't already been [reported](https://github.com/ionic-team/ionic-framework/issues?utf8=%E2%9C%93&q=is%3Aissue). You can search through existing issues to see if there is a similar one reported. Include closed issues as it may have been closed with a solution.
* Next, [create a new issue](https://github.com/ionic-team/ionic-framework/issues/new/choose) that thoroughly explains the problem. Please fill out the populated issue form before submitting the issue.
- If you think you have found a bug, or have a new feature idea, please start by making sure it hasn't already been [reported](https://github.com/ionic-team/ionic-framework/issues?utf8=%E2%9C%93&q=is%3Aissue). You can search through existing issues to see if there is a similar one reported. Include closed issues as it may have been closed with a solution.
- Next, [create a new issue](https://github.com/ionic-team/ionic-framework/issues/new/choose) that thoroughly explains the problem. Please fill out the populated issue form before submitting the issue.
## Creating a Good Code Reproduction
@@ -69,42 +66,42 @@ Without a reliable code reproduction, it is unlikely we will be able to resolve
### How to Create a Reproduction
* Create a new Ionic application using one of our starter templates. The `blank` starter application is a great choice for this. You can create one using the following Ionic CLI command: `ionic start myApp blank`
* Add the minimum amount of code needed to recreate the issue you are experiencing. Do not include anything that is not required to reproduce the issue. This includes any 3rd party plugins you have installed.
* Publish the application on GitHub and include a link to it when [creating an issue](#creating-an-issue).
* Be sure to include steps to reproduce the issue. These steps should be clear and easy to follow.
- Create a new Ionic application using one of our starter templates. The `blank` starter application is a great choice for this. You can create one using the following Ionic CLI command: `ionic start myApp blank`
- Add the minimum amount of code needed to recreate the issue you are experiencing. Do not include anything that is not required to reproduce the issue. This includes any 3rd party plugins you have installed.
- Publish the application on GitHub and include a link to it when [creating an issue](#creating-an-issue).
- Be sure to include steps to reproduce the issue. These steps should be clear and easy to follow.
### Benefits of Creating a Reproduction
* **Uses the latest version of Ionic:** By creating a new Ionic application, you are ensuring that you are testing against the latest version of the framework. Sometimes the issues you are experiencing have already been resolved in a newer version of the framework!
* **Minimal surface area:** By removing code that is not needed in order to reproduce the issue, it makes it easier to identify the cause of the issue.
* **No secret code needed:** Creating a minimal reproduction of the issue prevents you from having to publish any proprietary code used in your project.
* **Get help fixing the issue:** If we can reliably reproduce an issue, there is a good chance we will be able to address it.
- **Uses the latest version of Ionic:** By creating a new Ionic application, you are ensuring that you are testing against the latest version of the framework. Sometimes the issues you are experiencing have already been resolved in a newer version of the framework!
- **Minimal surface area:** By removing code that is not needed in order to reproduce the issue, it makes it easier to identify the cause of the issue.
- **No secret code needed:** Creating a minimal reproduction of the issue prevents you from having to publish any proprietary code used in your project.
- **Get help fixing the issue:** If we can reliably reproduce an issue, there is a good chance we will be able to address it.
## Creating a Pull Request
Before creating a pull request, please read our requirements that explains the minimal details to have your PR considered and merged into the codebase.
### Requirements
1. PRs must reference an existing issue that describes the issue or feature being submitted.
2. PRs must have a reproduction app or the issue must include a reproduction app to verify changes against.
3. PRs must include tests covering the changed behavior or a description of why tests cannot be written.
> Note: We appreciate you taking the time to contribute! Before submitting a pull request, please take the time to comment on the issue you are wanting to resolve. This helps us prevent duplicate effort or advise if the team is already addressing the issue.
* Looking for an issue to fix? Look through our issues with the [help wanted](https://github.com/ionic-team/ionic-framework/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) label!
- Looking for an issue to fix? Look through our issues with the [help wanted](https://github.com/ionic-team/ionic-framework/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) label!
### Setup
1. [Download the installer](https://nodejs.org/) for the LTS version of Node.js. This is the best way to also [install npm](https://blog.npmjs.org/post/85484771375/how-to-install-npm#_=_).
2. Fork this repository.
3. Clone your fork.
4. Create a new branch from main for your change.
5. Navigate into the directory of the package you wish to modify (core, angular, etc.).
6. Run `npm install` to install dependencies for this package.
7. Follow the steps for the specific package below.
1. [Download the installer](https://nodejs.org/) for the LTS version of Node.js.
2. Install pnpm following the [installation instructions](https://pnpm.io/installation).
3. Fork this repository.
4. Clone your fork.
5. Create a new branch from main for your change.
6. Navigate into the directory of the package you wish to modify (core, angular, etc.).
7. Run `pnpm install` to install dependencies for this package.
8. Follow the steps for the specific package below.
### Core
@@ -120,12 +117,11 @@ Before creating a pull request, please read our requirements that explains the m
8. After the build is finished, commit the changes. Please follow the [commit message format](#commit-message-format) for every commit.
9. [Submit a Pull Request](#submit-pull-request) of your changes.
#### Preview Changes
##### Previewing in this repository
1. Run `npm start` from within the `core` directory.
1. Run `pnpm start` from within the `core` directory.
2. A browser should open at `http://localhost:3333/`.
3. From here, navigate to one of the component's tests to preview your changes.
4. If a test showing your change doesn't exist, [add a new test or update an existing one](#modifying-tests).
@@ -133,7 +129,7 @@ Before creating a pull request, please read our requirements that explains the m
##### Previewing in an external app
We can use `npm pack` to test Ionic Framework changes in an external app outside of this repository. Follow the below steps based on your framework.
We can use `pnpm pack` to test Ionic Framework changes in an external app outside of this repository. Follow the below steps based on your framework.
###### JavaScript
@@ -141,128 +137,112 @@ Run the following commands to build the core directory and pack the changes:
```bash
cd core
npm i
npm run build
npm pack --pack-destination ~
pnpm install
pnpm build
pnpm pack --pack-destination ~
```
Then, in your Ionic Framework JavaScript app, run the following command to use the built package with the `.tgz` file that was created:
```bash
npm install file:/~/ionic-core-7.0.1.tgz
pnpm install file:/~/ionic-core-7.0.1.tgz
```
###### Angular
Run the following commands to build the core & angular directories and pack the changes:
```bash
cd core
npm i
npm run build
npm pack --pack-destination ~
pnpm install
pnpm build
pnpm pack --pack-destination ~
cd ../packages/angular
npm i
npm run sync
npm run build
pnpm build
cd dist/
npm pack --pack-destination ~
pnpm pack --pack-destination ~
```
Then, in your Ionic Framework Angular app, run the following commands to use the built packages with the `.tgz` files that were created:
```bash
rm -rf .angular/
npm install file:/~/ionic-core-7.0.1.tgz
npm install file:/~/ionic-angular-7.0.1.tgz
pnpm install file:/~/ionic-core-7.0.1.tgz
pnpm install file:/~/ionic-angular-7.0.1.tgz
```
###### React
Run the following commands to build the core & react directories and pack the changes:
```bash
cd core
npm i
npm run build
npm pack --pack-destination ~
pnpm install
pnpm build
pnpm pack --pack-destination ~
cd ../packages/react
npm i
npm run sync
npm run build
npm pack --pack-destination ~
pnpm build
pnpm pack --pack-destination ~
cd ../react-router
npm i
npm run sync
npm run build
npm pack --pack-destination ~
pnpm build
pnpm pack --pack-destination ~
```
Then, in your Ionic Framework React app, run the following commands to use the built packages with the `.tgz` files that were created:
```bash
npm install file:/~/ionic-core-7.0.1.tgz
npm install file:/~/ionic-react-7.0.1.tgz
npm install file:/~/ionic-react-router-7.0.1.tgz
pnpm install file:/~/ionic-core-7.0.1.tgz
pnpm install file:/~/ionic-react-7.0.1.tgz
pnpm install file:/~/ionic-react-router-7.0.1.tgz
```
##### Vue
Run the following commands to build the core & vue directories and pack the changes:
```bash
cd core
npm i
npm run build
npm pack --pack-destination ~
pnpm install
pnpm build
pnpm pack --pack-destination ~
cd ../packages/vue
npm i
npm run sync
npm run build
npm pack --pack-destination ~
pnpm build
pnpm pack --pack-destination ~
cd ../vue-router
npm i
npm run sync
npm run build
npm pack --pack-destination ~
pnpm build
pnpm pack --pack-destination ~
```
Then, in your Ionic Framework Vue app, run the following commands to use the built packages with the `.tgz` files that were created:
```bash
npm install file:/~/ionic-core-7.0.1.tgz
npm install file:/~/ionic-vue-7.0.1.tgz
npm install file:/~/ionic-vue-router-7.0.1.tgz
pnpm install file:/~/ionic-core-7.0.1.tgz
pnpm install file:/~/ionic-vue-7.0.1.tgz
pnpm install file:/~/ionic-vue-router-7.0.1.tgz
```
#### Lint Changes
1. Run `npm run lint` to lint the TypeScript and Sass.
2. If there are lint errors, run `npm run lint.fix` to automatically fix any errors. Repeat step 1 to ensure the errors have been fixed, and manually fix them if not.
3. To lint and fix only TypeScript errors, run `npm run lint.ts` and `npm run lint.ts.fix`, respectively.
4. To lint and fix only Sass errors, run `npm run lint.sass` and `npm run lint.sass.fix`, respectively.
1. Run `pnpm lint` to lint the TypeScript and Sass.
2. If there are lint errors, run `pnpm lint.fix` to automatically fix any errors. Repeat step 1 to ensure the errors have been fixed, and manually fix them if not.
3. To lint and fix only TypeScript errors, run `pnpm lint.ts` and `pnpm lint.ts.fix`, respectively.
4. To lint and fix only Sass errors, run `pnpm lint.sass` and `pnpm lint.sass.fix`, respectively.
#### Modifying Documentation
- Changes to manually written documentation should be made in the `ionic-docs` repo: https://github.com/ionic-team/ionic-docs/tree/main/docs
- In your `ionic-docs` PR, please add a link back to the related `ionic-framework` PR.
- Changes to auto generated documentation should be made in the `ionic-framework` repo. These can be done in the same PR as your fix or feature.
- Run `npm run build` and commit all updates to ensure your changes make it into the generated documentation.
- Run `pnpm build` and commit all updates to ensure your changes make it into the generated documentation.
- `Usage`: update the component's usage examples in the component's `usage/` directory.
- `Properties`, `Events`, or `Methods`: update the component's TypeScript file (`*.tsx`).
- `CSS Custom Properties`: update the component's main Sass file (`*.scss`).
#### Modifying Tests
1. Locate the test to modify inside the `test/` folder in the component's directory.
@@ -277,15 +257,14 @@ See [Ionic's E2E testing guide](../core/src/utils/test/playwright/docs/README.md
1. If the test exists in screenshot, there will be a file named `e2e.ts` in the directory of the test.
2. A screenshot test can be added by including this file and adding one or more `test()` calls that include a call to `page.compareScreenshot()`. See [Stencil end-to-end testing](https://stenciljs.com/docs/end-to-end-testing) and existing tests in `core/` for examples.
3. **Important:** each `test()` should have only one screenshot (`page.compareScreenshot()`) call **or** it should check the expect at the end of each test. If there is a mismatch it will fail the test which will prevent the rest of the test from running, i.e. if the first screenshot fails the remaining screenshot calls would not be called _unless_ they are in a separate test or all of the expects are called at the end.
4. To run screenshot locally, use the following command: `npm run test.screenshot`.
- To run screenshot for a specific test, pass the path to the test or a string to search for.
- For example, running all `alert` tests: `npm run test.screenshot alert`.
- Or, running the basic `alert` tests: `npm run test.screenshot src/components/alert/test/basic/e2e.ts`.
4. To run screenshot locally, use the following command: `pnpm test.screenshot`.
- To run screenshot for a specific test, pass the path to the test or a string to search for.
- For example, running all `alert` tests: `pnpm test.screenshot alert`.
- Or, running the basic `alert` tests: `pnpm test.screenshot src/components/alert/test/basic/e2e.ts`.
#### Building Changes
1. Once all changes have been made and the documentation has been updated, run `npm run build` inside of the `core` directory. This will add your changes to any auto-generated files, if necessary.
1. Once all changes have been made and the documentation has been updated, run `pnpm build` inside of the `core` directory. This will add your changes to any auto-generated files, if necessary.
2. Review the changes and, if everything looks correct, [commit](#commit-message-format) the changes.
3. Make sure the build has finished before committing. If you made changes to the documentation, properties, methods, or anything else that requires an update to a generate file, this needs to be committed.
4. After the changes have been pushed, publish the branch and [create a pull request](#creating-a-pull-request).
@@ -295,25 +274,26 @@ See [Ionic's E2E testing guide](../core/src/utils/test/playwright/docs/README.md
#### Modifying Files
1. Locate the files inside the relevant root directory:
- Angular: [`/packages/angular/src`](/packages/angular/src)
- React: [`/packages/react/src`](/packages/react/src)
- Vue: [`/packages/vue/src`](/packages/vue/src)
- Angular: [`/packages/angular/src`](/packages/angular/src)
- React: [`/packages/react/src`](/packages/react/src)
- Vue: [`/packages/vue/src`](/packages/vue/src)
2. Make your changes to the files. If the change is overly complex or out of the ordinary, add comments so we can understand the changes.
3. Run lint on the directory and make sure there are no errors.
4. Build the project.
5. After the build is finished, commit the changes. Please follow the [commit message format](#commit-message-format) for every commit.
6. [Submit a Pull Request](#submit-pull-request) of your changes.
#### Preview Changes
##### Previewing in this repository
Follow the steps in the test directory for each framework:
- Angular: [`/packages/angular/test`](/packages/angular/test/README.md)
- React: [`/packages/react/test`](/packages/react/test/README.md)
- Vue: [`/packages/vue/test`](/packages/vue/test/README.md)
- Angular: [`/packages/angular/test`](/packages/angular/test/README.md)
- React: [`/packages/react/test`](/packages/react/test/README.md)
- Vue: [`/packages/vue/test`](/packages/vue/test/README.md)
##### Previewing in an external app
@@ -321,25 +301,29 @@ Follow the steps to [preview changes in core](#preview-changes).
#### Lint Changes
1. Run `npm run lint` to lint the TypeScript in the relevant directory:
- Angular: [`/packages/angular/src`](/packages/angular/src)
- React: [`/packages/react/src`](/packages/react/src)
- Vue: [`/packages/vue/src`](/packages/vue/src)
2. If there are lint errors, run `npm run lint.fix` to automatically fix any errors. Repeat step 1 to ensure the errors have been fixed, and manually fix them if not.
1. Run `pnpm lint` to lint the TypeScript in the relevant directory:
- Angular: [`/packages/angular/src`](/packages/angular/src)
- React: [`/packages/react/src`](/packages/react/src)
- Vue: [`/packages/vue/src`](/packages/vue/src)
2. If there are lint errors, run `pnpm lint.fix` to automatically fix any errors. Repeat step 1 to ensure the errors have been fixed, and manually fix them if not.
#### Modifying Tests
1. Locate the e2e test to modify inside the relevant test app directory:
- Angular: [`/packages/angular/test/base/e2e/src`](/packages/angular/test/base/e2e/src)
- React: [`/packages/react/test/base/tests/e2e/specs`](/packages/react/test/base/tests/e2e/specs)
- Vue: [`/packages/vue/test/base/tests/e2e/specs`](/packages/vue/test/base/tests/e2e/specs)
- Angular: [`/packages/angular/test/base/e2e/src`](/packages/angular/test/base/e2e/src)
- React: [`/packages/react/test/base/tests/e2e/specs`](/packages/react/test/base/tests/e2e/specs)
- Vue: [`/packages/vue/test/base/tests/e2e/specs`](/packages/vue/test/base/tests/e2e/specs)
2. If a test exists, modify the test by adding an example to reproduce the problem fixed or feature added.
3. If a new test is needed, copy an existing test, rename it, and edit the content in the test file.
4. Run `npm run test` to run your tests.
4. Run `pnpm test` to run your tests.
#### Building Changes
1. Once all changes have been made, run `npm run build` inside of the package's root directory. This will add your changes to any auto-generated files, if necessary.
1. Once all changes have been made, run `pnpm build` inside of the package's root directory. This will add your changes to any auto-generated files, if necessary.
2. Review the changes and, if everything looks correct, [commit](#commit-message-format) the changes.
3. Make sure the build has finished before committing. If you made changes to the documentation, properties, methods, or anything else that requires an update to a generate file, this needs to be committed.
4. After the changes have been pushed, publish the branch and [create a pull request](#creating-a-pull-request).
@@ -356,14 +340,13 @@ The team has an internal design process for new Ionic features, which must be co
To expedite the process, please ensure that all feature PRs have an associated issue created, with a clear use case for why the feature should be added to Ionic.
## Commit Message Guidelines
We have very precise rules over how our git commit messages should be formatted. This leads to readable messages that are easy to follow when looking through the project history. We also use the git commit messages to generate our [changelog](https://github.com/ionic-team/ionic-framework/blob/main/CHANGELOG.md). Our format closely resembles Angular's [commit message guidelines](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit).
### Commit Message Format
We follow the [Conventional Commits specification](https://www.conventionalcommits.org/). A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
We follow the [Conventional Commits specification](https://www.conventionalcommits.org/). A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
```
<type>(<scope>): <subject>
@@ -385,14 +368,14 @@ If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. Howev
Must be one of the following:
* **feat**: A new feature
* **fix**: A bug fix
* **docs**: Documentation only changes
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
* **refactor**: A code change that neither fixes a bug nor adds a feature
* **perf**: A code change that improves performance
* **test**: Adding missing tests
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation
- **feat**: A new feature
- **fix**: A bug fix
- **docs**: Documentation only changes
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **perf**: A code change that improves performance
- **test**: Adding missing tests
- **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation
### Scope
@@ -402,12 +385,12 @@ The scope can be anything specifying place of the commit change. Usually it will
The subject contains succinct description of the change:
* use the imperative, present tense: "change" not "changed" nor "changes"
* do not capitalize first letter
* do not place a period `.` at the end
* entire length of the commit message must not go over 50 characters
* describe what the commit does, not what issue it relates to or fixes
* **be brief, yet descriptive** - we should have a good understanding of what the commit does by reading the subject
- use the imperative, present tense: "change" not "changed" nor "changes"
- do not capitalize first letter
- do not place a period `.` at the end
- entire length of the commit message must not go over 50 characters
- describe what the commit does, not what issue it relates to or fixes
- **be brief, yet descriptive** - we should have a good understanding of what the commit does by reading the subject
### Body
@@ -469,7 +452,6 @@ revert: feat(skeleton-text): add animated property
This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
```
## License
By contributing your code to the ionic-team/ionic GitHub Repository, you agree to license your contribution under the MIT license.

View File

@@ -6,13 +6,20 @@ runs:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core
path: ./core
filename: CoreBuild.zip
- name: Install Angular Server Dependencies
run: npm ci
run: pnpm install
shell: bash
working-directory: ./packages/angular-server
- name: Build
run: npm run build.prod
run: pnpm run build.prod
shell: bash
working-directory: ./packages/angular-server
- uses: ./.github/workflows/actions/upload-archive

View File

@@ -6,25 +6,24 @@ runs:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core
path: ./core
filename: CoreBuild.zip
- name: Install Angular Dependencies
run: npm ci
shell: bash
working-directory: ./packages/angular
- name: Sync
run: npm run sync
run: pnpm install
shell: bash
working-directory: ./packages/angular
- name: Lint
run: npm run lint
run: pnpm run lint
shell: bash
working-directory: ./packages/angular
- name: Build
run: npm run build
run: pnpm run build
shell: bash
working-directory: ./packages/angular
- name: Check Diff

View File

@@ -12,17 +12,19 @@ runs:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Dependencies
run: npm ci
run: pnpm install
working-directory: ./core
shell: bash
- name: Install Stencil ${{ inputs.stencil-version }}
working-directory: ./core
run: npm i @stencil/core@${{ inputs.stencil-version }}
run: pnpm i @stencil/core@${{ inputs.stencil-version }}
shell: bash
- name: Build Core
run: npm run build -- --ci
run: pnpm run build --ci
working-directory: ./core
shell: bash
- uses: ./.github/workflows/actions/upload-archive

View File

@@ -12,19 +12,22 @@ runs:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Dependencies
run: npm install
run: pnpm install
working-directory: ./core
shell: bash
# If an Ionicons version was specified install that.
# Otherwise just use the version defined in the package.json.
- name: Install Ionicons Version
if: inputs.ionicons-version != ''
run: npm install ionicons@${{ inputs.ionicons-version }}
run: pnpm install ionicons@${{ inputs.ionicons-version }}
working-directory: ./core
shell: bash
- name: Build Core
run: npm run build -- --ci
run: pnpm run build --ci
working-directory: ./core
shell: bash
- uses: ./.github/workflows/actions/upload-archive

View File

@@ -6,6 +6,9 @@ runs:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core
@@ -17,19 +20,15 @@ runs:
path: ./packages/react
filename: ReactBuild.zip
- name: Install Dependencies
run: npm ci
shell: bash
working-directory: ./packages/react-router
- name: Sync
run: npm run sync
run: pnpm install
shell: bash
working-directory: ./packages/react-router
- name: Lint
run: npm run lint
run: pnpm run lint
shell: bash
working-directory: ./packages/react-router
- name: Build
run: npm run build
run: pnpm run build
shell: bash
working-directory: ./packages/react-router
- uses: ./.github/workflows/actions/upload-archive

View File

@@ -6,29 +6,28 @@ runs:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core
path: ./core
filename: CoreBuild.zip
- name: Install React Dependencies
run: npm ci
shell: bash
working-directory: ./packages/react
- name: Sync
run: npm run sync
run: pnpm install
shell: bash
working-directory: ./packages/react
- name: Lint
run: npm run lint
run: pnpm run lint
shell: bash
working-directory: ./packages/react
- name: Build
run: npm run build
run: pnpm run build
shell: bash
working-directory: ./packages/react
- name: Test Spec
run: npm run test.spec
run: pnpm run test.spec
shell: bash
working-directory: ./packages/react
- name: Check Diff

View File

@@ -6,6 +6,9 @@ runs:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core
@@ -17,23 +20,19 @@ runs:
path: ./packages/vue
filename: VueBuild.zip
- name: Install Vue Router Dependencies
run: npm ci
shell: bash
working-directory: ./packages/vue-router
- name: Sync
run: npm run sync
run: pnpm install
shell: bash
working-directory: ./packages/vue-router
- name: Lint
run: npm run lint
run: pnpm run lint
shell: bash
working-directory: ./packages/vue-router
- name: Build
run: npm run build
run: pnpm run build
shell: bash
working-directory: ./packages/vue-router
- name: Test Spec
run: npm run test.spec
run: pnpm run test.spec
shell: bash
working-directory: ./packages/vue-router
- uses: ./.github/workflows/actions/upload-archive

View File

@@ -6,25 +6,24 @@ runs:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core
path: ./core
filename: CoreBuild.zip
- name: Install Vue Dependencies
run: npm ci
shell: bash
working-directory: ./packages/vue
- name: Sync
run: npm run sync
run: pnpm install
shell: bash
working-directory: ./packages/vue
- name: Lint
run: npm run lint
run: pnpm run lint
shell: bash
working-directory: ./packages/vue
- name: Build
run: npm run build
run: pnpm run build
shell: bash
working-directory: ./packages/vue
- name: Check Diff

View File

@@ -22,6 +22,9 @@ runs:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v2
with:
version: 8
# Provenance requires npm 9.5.0+
- name: Install latest npm
run: npm install -g npm@latest
@@ -29,27 +32,26 @@ runs:
# This ensures the local version of Lerna is installed
# and that we do not use the global Lerna version
- name: Install root dependencies
run: npm ci
run: pnpm install
shell: bash
- name: Install Dependencies
run: npx lerna bootstrap --include-dependencies --scope ${{ inputs.scope }} --ignore-scripts -- --legacy-peer-deps
- name: Install project dependencies
run: pnpm install
shell: bash
working-directory: ${{ inputs.working-directory }}
- name: Update Version
run: npx lerna version ${{ inputs.version }} --yes --exact --no-changelog --no-push --no-git-tag-version --preid=${{ inputs.preid }}
run: pnpm exec lerna version ${{ inputs.version }} --yes --exact --no-changelog --no-push --no-git-tag-version --preid=${{ inputs.preid }}
shell: bash
working-directory: ${{ inputs.working-directory }}
- name: Run Build
run: npm run build
run: pnpm run build
shell: bash
working-directory: ${{ inputs.working-directory }}
- name: Prepare NPM Token
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
working-directory: ${{ inputs.working-directory }}
run: pnpm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
shell: bash
env:
NPM_TOKEN: ${{ inputs.token }}
- name: Publish to NPM
run: npm publish ${{ inputs.folder }} --tag ${{ inputs.tag }} --provenance
run: pnpm publish ${{ inputs.folder }} --tag ${{ inputs.tag }} --provenance --no-git-checks
shell: bash
working-directory: ${{ inputs.working-directory }}

View File

@@ -9,6 +9,9 @@ runs:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core
@@ -29,14 +32,10 @@ runs:
shell: bash
working-directory: ./packages/angular/test
- name: Install Dependencies
run: npm install
shell: bash
working-directory: ./packages/angular/test/build/${{ inputs.app }}
- name: Sync Built Changes
run: npm run sync
run: pnpm install
shell: bash
working-directory: ./packages/angular/test/build/${{ inputs.app }}
- name: Run Tests
run: npm run test
run: pnpm run test
shell: bash
working-directory: ./packages/angular/test/build/${{ inputs.app }}

View File

@@ -6,12 +6,15 @@ runs:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Dependencies
run: npm ci
run: pnpm install
working-directory: ./core
shell: bash
- name: Lint
run: npm run lint
run: pnpm run lint
shell: bash
working-directory: ./core
# Lint changes should be pushed

View File

@@ -7,6 +7,8 @@ inputs:
description: 'Playwright total number of test shards (ex: 4)'
update:
description: 'Whether or not to update the reference snapshots'
component:
description: 'The component to update the reference snapshots'
runs:
using: 'composite'
@@ -14,18 +16,41 @@ runs:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core
path: ./core
filename: CoreBuild.zip
- name: Install Playwright Dependencies
run: npm install && npx playwright install && npx playwright install-deps
run: pnpm install && pnpm exec playwright install && pnpm exec playwright install-deps
shell: bash
working-directory: ./core
- id: clean-component-name
name: Clean Component Name
# Remove `ion-` prefix from the `component` variable if it exists.
run: |
echo "component=$(echo ${{ inputs.component }} | sed 's/ion-//g')" >> $GITHUB_OUTPUT
shell: bash
- id: set-test-file
name: Set Test File
# Screenshots can be updated for all components or specified component(s).
# If the `component` variable is set, then the test has the option to
# - run all the file paths that are in a component folder.
# -- For example: if the `component` value is "item", then the test will run all the file paths that are in the "src/components/item" folder.
# -- For example: if the `component` value is "item chip", then the test will run all the file paths that are in the "src/components/item" and "src/components/chip" folders.
run: |
if [ -n "${{ steps.clean-component-name.outputs.component }}" ]; then
echo "testFile=\$(echo '${{ steps.clean-component-name.outputs.component }}' | awk '{for(i=1;i<=NF;i++) \$i=\"src/components/\"\$i}1')" >> $GITHUB_OUTPUT
else
echo "testFile=$(echo '')" >> $GITHUB_OUTPUT
fi
shell: bash
- name: Test
if: inputs.update != 'true'
run: npm run test.e2e -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }}
run: pnpm run test.e2e ${{ steps.set-test-file.outputs.testFile }} --shard=${{ inputs.shard }}/${{ inputs.totalShards }}
shell: bash
working-directory: ./core
- name: Test and Update
@@ -47,7 +72,7 @@ runs:
# which is why we not using the upload-archive
# composite step here.
run: |
npm run test.e2e -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }} --update-snapshots
pnpm run test.e2e ${{ steps.set-test-file.outputs.testFile }} --shard=${{ inputs.shard }}/${{ inputs.totalShards }} --update-snapshots
git add src/\*.png --force
mkdir updated-screenshots
cd ../ && rsync -R --progress $(git diff --name-only --cached) core/updated-screenshots

View File

@@ -9,12 +9,15 @@ runs:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Dependencies
run: npm ci
run: pnpm install
working-directory: ./core
shell: bash
- name: Install Stencil ${{ inputs.stencil-version }}
run: npm install @stencil/core@${{ inputs.stencil-version }}
run: pnpm install @stencil/core@${{ inputs.stencil-version }}
shell: bash
working-directory: ./core
if: ${{ inputs.stencil-version != '' }}
@@ -24,6 +27,6 @@ runs:
path: ./core
filename: CoreBuild.zip
- name: Test
run: npm run test.spec -- --ci
run: pnpm run test.spec --ci
shell: bash
working-directory: ./core

View File

@@ -9,6 +9,9 @@ runs:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core
@@ -29,19 +32,15 @@ runs:
shell: bash
working-directory: ./packages/react/test
- name: Install Dependencies
run: npm install
shell: bash
working-directory: ./packages/react/test/build/${{ inputs.app }}
- name: Sync Built Changes
run: npm run sync
run: pnpm install
shell: bash
working-directory: ./packages/react/test/build/${{ inputs.app }}
- name: Build
run: npm run build
run: pnpm run build
shell: bash
working-directory: ./packages/react/test/build/${{ inputs.app }}
- name: Run Tests
run: npm run e2e
run: pnpm run e2e
shell: bash
working-directory: ./packages/react/test/build/${{ inputs.app }}

View File

@@ -9,6 +9,9 @@ runs:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core
@@ -29,18 +32,14 @@ runs:
shell: bash
working-directory: ./packages/react-router/test
- name: Install Dependencies
run: npm install
shell: bash
working-directory: ./packages/react-router/test/build/${{ inputs.app }}
- name: Sync Built Changes
run: npm run sync
run: pnpm install
shell: bash
working-directory: ./packages/react-router/test/build/${{ inputs.app }}
- name: Build
run: npm run build
run: pnpm run build
shell: bash
working-directory: ./packages/react-router/test/build/${{ inputs.app }}
- name: Run Tests
run: npm run e2e
run: pnpm run e2e
shell: bash
working-directory: ./packages/react-router/test/build/${{ inputs.app }}

View File

@@ -9,6 +9,9 @@ runs:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core
@@ -29,18 +32,14 @@ runs:
shell: bash
working-directory: ./packages/vue/test
- name: Install Dependencies
run: npm install
shell: bash
working-directory: ./packages/vue/test/build/${{ inputs.app }}
- name: Sync
run: npm run sync
run: pnpm install
shell: bash
working-directory: ./packages/vue/test/build/${{ inputs.app }}
- name: Run Spec Tests
run: npm run test:unit
run: pnpm run test:unit
shell: bash
working-directory: ./packages/vue/test/build/${{ inputs.app }}
- name: Run E2E Tests
run: npm run test:e2e
run: pnpm run test:e2e
shell: bash
working-directory: ./packages/vue/test/build/${{ inputs.app }}

View File

@@ -10,11 +10,14 @@ jobs:
dev-hash: ${{ steps.create-dev-hash.outputs.DEV_HASH }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
# A 1 is required before the timestamp
# as lerna will fail when there is a leading 0
# See https://github.com/lerna/lerna/issues/2840
- name: Install Dependencies
run: npm ci
run: pnpm install
shell: bash
- id: create-dev-hash
name: Create Dev Hash

View File

@@ -13,11 +13,14 @@ jobs:
nightly-hash: ${{ steps.create-nightly-hash.outputs.NIGHTLY_HASH }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
# A 1 is required before the timestamp
# as lerna will fail when there is a leading 0
# See https://github.com/lerna/lerna/issues/2840
- name: Install Dependencies
run: npm ci
run: pnpm install
shell: bash
- id: create-nightly-hash
name: Create Nightly Hash

View File

@@ -161,7 +161,6 @@ jobs:
version: ${{ inputs.version }}
preid: ${{ inputs.preid }}
working-directory: 'packages/angular-server'
folder: './dist'
token: ${{ secrets.NPM_TOKEN }}
release-react-router:

View File

@@ -54,6 +54,9 @@ jobs:
with:
token: ${{ secrets.IONITRON_TOKEN }}
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Configure Identity
# Commits from github-actions do not
# trigger other GitHub Actions. As a result,
@@ -101,7 +104,7 @@ jobs:
# so we do that here.
- name: Bump Package Lock
run: |
lerna exec "npm install --package-lock-only"
pnpm install --lockfile-only
git add .
git commit -m "chore(): update package lock files"
git push

View File

@@ -2,6 +2,11 @@ name: 'Update Reference Screenshots'
on:
workflow_dispatch:
inputs:
component:
description: 'What component(s) should be updated? (leave blank to update all or use a space-separated list for multiple components)'
required: false
default: ''
jobs:
build-core:
@@ -34,6 +39,7 @@ jobs:
shard: ${{ matrix.shard }}
totalShards: ${{ matrix.totalShards }}
update: true
component: ${{ inputs.component }}
update-reference-screenshots:
runs-on: ubuntu-latest

18826
core/package-lock.json generated
View File

File diff suppressed because it is too large Load Diff

View File

@@ -36,13 +36,14 @@
"tslib": "^2.1.0"
},
"devDependencies": {
"@axe-core/playwright": "^4.8.3",
"@axe-core/playwright": "^4.8.4",
"@capacitor/core": "^5.6.0",
"@capacitor/haptics": "^5.0.6",
"@capacitor/keyboard": "^5.0.7",
"@capacitor/status-bar": "^5.0.6",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "^2.0.0",
"@jest/core": "^27.5.1",
"@playwright/test": "^1.39.0",
"@rollup/plugin-node-resolve": "^8.4.0",
"@rollup/plugin-virtual": "^2.0.3",
@@ -50,7 +51,7 @@
"@stencil/react-output-target": "^0.5.3",
"@stencil/sass": "^3.0.8",
"@stencil/vue-output-target": "^0.8.7",
"@types/jest": "^29.5.6",
"@types/jest": "^27.5.2",
"@types/node": "^14.6.0",
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@typescript-eslint/parser": "^6.7.2",
@@ -60,9 +61,10 @@
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-custom-rules": "file:custom-rules",
"execa": "^5.0.0",
"fast-deep-equal": "^3.1.3",
"fs-extra": "^9.0.1",
"jest": "^29.7.0",
"jest-cli": "^29.7.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"prettier": "^2.6.1",
"puppeteer": "21.1.1",
"rollup": "^2.26.4",
@@ -72,30 +74,30 @@
"stylelint-order": "^4.1.0"
},
"scripts": {
"build": "npm run clean && npm run build.css && stencil build --es5 --docs-json dist/docs.json",
"build.css": "npm run css.sass && npm run css.minify",
"build.debug": "npm run clean && stencil build --debug",
"build": "pnpm run clean && pnpm run build.css && stencil build --es5 --docs-json dist/docs.json",
"build.css": "pnpm run css.sass && pnpm run css.minify",
"build.debug": "pnpm run clean && stencil build --debug",
"build.docs.json": "stencil build --docs-json dist/docs.json",
"clean": "node scripts/clean.js",
"css.minify": "cleancss -O2 -o ./css/ionic.bundle.css ./css/ionic.bundle.css",
"css.sass": "sass --embed-sources src/css:./css",
"eslint": "eslint src",
"lint": "npm run lint.ts && npm run lint.sass && npm run prettier -- --write --cache",
"lint.fix": "npm run lint.ts.fix && npm run lint.sass.fix && npm run prettier -- --write --cache",
"lint": "pnpm run lint.ts && pnpm run lint.sass && pnpm run prettier --write --cache",
"lint.fix": "pnpm run lint.ts.fix && pnpm run lint.sass.fix && pnpm run prettier --write --cache",
"lint.sass": "stylelint \"src/**/*.scss\"",
"lint.sass.fix": "npm run lint.sass -- --fix",
"lint.ts": "npm run eslint",
"lint.ts.fix": "npm run eslint -- --fix",
"lint.sass.fix": "pnpm run lint.sass --fix",
"lint.ts": "pnpm run eslint",
"lint.ts.fix": "pnpm run eslint --fix",
"prerender.e2e": "node scripts/testing/prerender.js",
"prettier": "prettier \"./src/**/*.{html,ts,tsx,js,jsx}\"",
"start": "npm run build.css && stencil build --dev --watch --serve",
"test": "npm run test.spec && npm run test.e2e",
"start": "pnpm run build.css && stencil build --dev --watch --serve",
"test": "pnpm run test.spec && pnpm run test.e2e",
"test.spec": "stencil test --spec --max-workers=2",
"test.e2e": "npx playwright test",
"test.e2e.update-snapshots": "npm run test.e2e -- --update-snapshots",
"test.e2e": "pnpm exec playwright test",
"test.e2e.update-snapshots": "pnpm run test.e2e --update-snapshots",
"test.watch": "jest --watch --no-cache",
"test.treeshake": "node scripts/treeshaking.js dist/index.js",
"validate": "npm run lint && npm run test && npm run build && npm run test.treeshake"
"validate": "pnpm run lint && pnpm run test && pnpm run build && pnpm run test.treeshake"
},
"author": "Ionic Team",
"license": "MIT",

View File

@@ -57,7 +57,7 @@ configs({ modes: ['md'] }).forEach(({ config, screenshot, title }) => {
await page.mouse.down();
}
await page.waitForSelector('#default.ion-activated');
await page.locator('#default.ion-activated').waitFor();
await expect(button).toHaveScreenshot(screenshot(`button-ripple-effect`));
});

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@@ -15,7 +15,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
});
test('should switch to a date-only view when the date button is clicked', async ({ page }) => {
const datetime = page.locator('ion-datetime');
@@ -45,7 +45,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toContainText('Jan 1, 2022');
await expect(page.locator('#time-button')).toContainText('6:30 AM');
@@ -58,7 +58,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toContainText('January 2022');
await expect(page.locator('#time-button')).toBeHidden();
@@ -71,7 +71,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toContainText('2022');
await expect(page.locator('#time-button')).toBeHidden();
@@ -84,7 +84,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toContainText('January');
await expect(page.locator('#time-button')).toBeHidden();
@@ -97,7 +97,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#time-button')).toContainText('6:30 AM');
await expect(page.locator('#date-button')).toBeHidden();
@@ -110,7 +110,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
const dateTarget = page.locator('#date-button');
@@ -135,7 +135,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toContainText('January 2022');
await expect(page.locator('#time-button')).toBeHidden();
@@ -153,7 +153,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toContainText('2022');
await expect(page.locator('#time-button')).toBeHidden();
@@ -169,7 +169,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
/**
* The entire text reads 1 ene 2022, but some browsers will add
@@ -187,7 +187,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#time-button')).toContainText('16:30');
});
@@ -199,7 +199,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const timeTarget = page.locator('#time-button');
await expect(timeTarget).toContainText('6:30');
@@ -223,7 +223,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toContainText('Jan 1, 2022 6:30 AM');
await expect(page.locator('#time-button')).not.toBeVisible();
@@ -238,7 +238,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toContainText('Jan 1, 2022 6:30 AM');
await expect(page.locator('#time-button')).not.toBeVisible();

View File

@@ -11,7 +11,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toBeDisabled();
await expect(page.locator('#time-button')).toBeDisabled();
@@ -24,7 +24,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetimeButton = page.locator('ion-datetime-button');
await expect(datetimeButton).toHaveScreenshot(screenshot(`datetime-button-disabled`));

View File

@@ -20,7 +20,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toContainText('3 days');
});
@@ -32,7 +32,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toHaveText('0 days');
});
@@ -49,7 +49,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toHaveText('Jun 1, 2022');
});
@@ -69,7 +69,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toHaveText('Selected: 3');
});
@@ -86,7 +86,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
const ionValueChange = await page.spyOnEvent('ionValueChange');
@@ -111,7 +111,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toHaveText('Jun 1, 2022');
await expect(page.locator('#time-button')).toHaveText('4:30 PM');

View File

@@ -24,7 +24,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
const container = page.locator('#container');
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(container).toHaveScreenshot(screenshot(`datetime-scale`));
});
@@ -87,7 +87,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const clearButton = page.locator('#clear-button button');
const selectedDay = page.locator('.calendar-day-active');
@@ -114,7 +114,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const calendarMonthYear = page.locator('ion-datetime .calendar-month-year');
const calendarBody = page.locator('.calendar-body');
await expect(calendarMonthYear).toHaveText('February 2022');

View File

@@ -110,7 +110,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
const ionChange = await page.spyOnEvent('ionChange');
@@ -255,7 +255,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const calendarBody = page.locator('ion-datetime .calendar-body');
const calendarHeader = page.locator('ion-datetime .calendar-month-year');
@@ -275,7 +275,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const calendarBody = page.locator('ion-datetime .calendar-body');
const calendarHeader = page.locator('ion-datetime .calendar-month-year');
@@ -297,7 +297,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const calendarBody = page.locator('ion-datetime .calendar-body');
const calendarHeader = page.locator('ion-datetime .calendar-month-year');
@@ -331,7 +331,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const monthYearButton = page.locator('ion-datetime .calendar-month-year');
const monthYearInterface = page.locator('ion-datetime .datetime-year');
@@ -349,7 +349,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
await datetime.evaluate((el: HTMLIonDatetimeElement) => el.style.removeProperty('display'));
await expect(datetime).toBeVisible();
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
// month/year interface should be reset
await expect(monthYearInterface).toBeHidden();
@@ -399,7 +399,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const selectedDay = page.locator('ion-datetime .calendar-day-active');
@@ -428,7 +428,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const ionChange = await page.spyOnEvent('ionChange');
const calendarButtons = page.locator('.calendar-day:not([disabled])');
@@ -447,7 +447,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const ionChange = await page.spyOnEvent('ionChange');
const datetime = page.locator('ion-datetime');
@@ -487,7 +487,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
const datetime = page.locator('ion-datetime');
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(datetime.locator('.calendar-day-today')).toHaveScreenshot(
screenshot(`datetime-today-calendar-button`)
@@ -517,7 +517,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
const datetime = page.locator('ion-datetime');
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(datetime).toHaveScreenshot(screenshot(`date-highlight-start-of-month`));
@@ -543,7 +543,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');

View File

@@ -11,7 +11,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
});
test('should switch the calendar header when moving to a month with a different number of days', async ({

View File

@@ -113,7 +113,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
test.describe('check example usages', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/src/components/datetime/test/disable-dates', config);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').first().waitFor();
});
test('should disable a specific date', async ({ page }) => {

View File

@@ -27,7 +27,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const febFirstButton = page.locator(`.calendar-day[data-day='1'][data-month='2']`);
@@ -42,7 +42,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const calendarMonthYear = page.locator('ion-datetime .calendar-month-year');
await expect(calendarMonthYear.locator('button')).toBeDisabled();
});
@@ -71,7 +71,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const clearButton = page.locator('#clear-button button');
@@ -86,7 +86,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const calendarMonthYear = page.locator('ion-datetime .calendar-month-year');
const calendarBody = page.locator('.calendar-body');
await expect(calendarMonthYear).toHaveText('February 2022');

View File

@@ -15,7 +15,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
await expect(datetime).toHaveScreenshot(screenshot(`datetime-display-date-time`));
});
@@ -26,7 +26,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
await expect(datetime).toHaveScreenshot(screenshot(`datetime-display-time-date`));
});
@@ -37,7 +37,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
await expect(datetime).toHaveScreenshot(screenshot(`datetime-display-time`));
});
@@ -48,7 +48,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
await expect(datetime).toHaveScreenshot(screenshot(`datetime-display-date`));
});
@@ -69,7 +69,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
await expect(datetime).toHaveScreenshot(screenshot(`datetime-display-cover-date-time`));
});
@@ -80,7 +80,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
await expect(datetime).toHaveScreenshot(screenshot(`datetime-display-cover-time-date`));
});
@@ -91,7 +91,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
await expect(datetime).toHaveScreenshot(screenshot(`datetime-display-cover-time`));
});
@@ -102,7 +102,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
await expect(datetime).toHaveScreenshot(screenshot(`datetime-display-cover-date`));
});
@@ -119,7 +119,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
test('month selection should work after changing presentation', async ({ page }) => {
await page.goto('/src/components/datetime/test/display', config);
const ionWorkingPartsDidChange = await page.spyOnEvent('ionWorkingPartsDidChange');
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const select = page.locator('select#presentation');

View File

@@ -95,7 +95,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetimeButtons = page.locator('ion-datetime .calendar-day:not([disabled])');
@@ -111,7 +111,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetimeYear = page.locator('ion-datetime .year-column .picker-item[data-value="2022"]');
@@ -147,7 +147,7 @@ class DatetimeLocaleFixture {
this.datetime = this.page.locator('ion-datetime');
await this.page.waitForSelector('.datetime-ready');
await this.page.locator('.datetime-ready').waitFor();
}
async expectLocalizedDatePicker(screenshot: ScreenshotFn) {

View File

@@ -36,7 +36,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const prevButton = page.locator('ion-datetime .calendar-next-prev ion-button:nth-child(1)');
const nextButton = page.locator('ion-datetime .calendar-next-prev ion-button:nth-child(2)');
@@ -61,7 +61,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
await page.goto('/src/components/datetime/test/minmax', config);
const calendarMonths = page.locator('ion-datetime#inside .calendar-month');
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').first().waitFor();
await expect(calendarMonths.nth(0)).not.toHaveClass(/calendar-month-disabled/);
await expect(calendarMonths.nth(1)).not.toHaveClass(/calendar-month-disabled/);
@@ -70,7 +70,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
test('datetime: minmax navigation disabled', async ({ page }) => {
await page.goto('/src/components/datetime/test/minmax', config);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').first().waitFor();
const navButtons = page.locator('ion-datetime#outside .calendar-next-prev ion-button');
@@ -80,7 +80,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
test('datetime: min including day should not disable month', async ({ page }) => {
await page.goto('/src/components/datetime/test/minmax', config);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').first().waitFor();
const calendarMonths = page.locator('ion-datetime#min-with-day .calendar-month');
@@ -102,7 +102,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const ionPopoverDidPresent = await page.spyOnEvent('ionPopoverDidPresent');
@@ -124,7 +124,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
test.describe('setting value outside bounds should show in-bounds month', () => {
const testDisplayedMonth = async (page: E2EPage, content: string, expectedString = /June 2021/) => {
await page.setContent(content, config);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const calendarMonthYear = page.locator('ion-datetime .calendar-month-year');
await expect(calendarMonthYear).toHaveText(expectedString);
@@ -174,7 +174,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetimeMonthDidChange = await page.spyOnEvent('datetimeMonthDidChange');
const eventButton = page.locator('button#bind');
@@ -260,7 +260,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
const ionChange = await page.spyOnEvent('ionChange');
@@ -283,7 +283,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
const ionChange = await page.spyOnEvent('ionChange');
@@ -311,7 +311,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
const monthColumnItems = page.locator('ion-datetime .month-column .picker-item:not(.picker-item-empty)');
const ionChange = await page.spyOnEvent('ionChange');
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await monthColumnItems.nth(0).click(); // switch to January
await ionChange.next();
@@ -346,7 +346,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
// Select Jan 10, 2022
const maxDate = page.locator('ion-datetime .calendar-day[data-day="10"][data-month="1"][data-year="2022"]');

View File

@@ -8,7 +8,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
test.describe(title('datetime: month-year picker'), () => {
test.beforeEach(async ({ page }) => {
await page.goto('/src/components/datetime/test/month-year-picker', config);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').first().waitFor();
});
test('should hide the footer when picker is open', async ({ page }) => {

View File

@@ -62,7 +62,7 @@ class DatetimeMultipleFixture {
);
this.datetime = this.page.locator('ion-datetime');
await this.page.waitForSelector('.datetime-ready');
await this.page.locator('.datetime-ready').waitFor();
return this.datetime;
}
@@ -304,7 +304,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector(`.datetime-ready`);
await page.locator(`.datetime-ready`).waitFor();
const datetime = page.locator('ion-datetime');
const header = datetime.locator('.datetime-selected-date');

View File

@@ -11,7 +11,7 @@ configs().forEach(({ title, screenshot, config }) => {
await openDateTimeBtn.click();
await ionPopoverDidPresent.next();
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page).toHaveScreenshot(screenshot(`datetime-position-base`));

View File

@@ -23,7 +23,7 @@ configs().forEach(({ title, screenshot, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page).toHaveScreenshot(screenshot(`datetime-wheel-date-diff`));
});
@@ -34,7 +34,7 @@ configs().forEach(({ title, screenshot, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page).toHaveScreenshot(screenshot(`datetime-wheel-date-time-diff`));
});
@@ -45,7 +45,7 @@ configs().forEach(({ title, screenshot, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page).toHaveScreenshot(screenshot(`datetime-wheel-time-date-diff`));
});
@@ -56,7 +56,7 @@ configs().forEach(({ title, screenshot, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
@@ -80,7 +80,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const dayValues = page.locator('ion-datetime .day-column .picker-item[data-value]');
expect(await dayValues.count()).toEqual(27);
@@ -93,7 +93,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const dayValues = page.locator('ion-datetime .day-column .picker-item[data-value]');
expect(await dayValues.count()).toEqual(1);
@@ -116,7 +116,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const disabledMonths = page.locator('.month-column .picker-item[disabled]');
const disabledYears = page.locator('.year-column .picker-item[disabled]');
@@ -141,7 +141,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const monthValues = page.locator('.month-column .picker-item:not(.picker-item-empty)');
const yearValues = page.locator('.year-column .picker-item:not(.picker-item-empty)');
@@ -175,7 +175,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const ionChange = await page.spyOnEvent('ionChange');
const monthValues = page.locator('.month-column .picker-item:not(.picker-item-empty)');
@@ -209,7 +209,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const ionChange = await page.spyOnEvent('ionChange');
const dayValues = page.locator('.day-column .picker-item:not(.picker-item-empty)');
@@ -230,7 +230,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const ionChange = await page.spyOnEvent('ionChange');
const yearValues = page.locator('.year-column .picker-item:not(.picker-item-empty)');
@@ -253,7 +253,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
await datetime.evaluate((el: HTMLIonDatetimeElement) => (el.value = '2021-05-25T12:40:00.000Z'));
@@ -285,7 +285,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const monthValues = page.locator('.month-column .picker-item:not(.picker-item-empty)');
const dayValues = page.locator('.day-column .picker-item:not(.picker-item-empty)');
@@ -306,7 +306,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const columns = page.locator('ion-picker-column-internal');
@@ -327,7 +327,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const columns = page.locator('ion-picker-column-internal');
@@ -346,7 +346,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const dayValues = page.locator('ion-datetime .date-column .picker-item[data-value]');
expect(await dayValues.count()).toEqual(57);
@@ -359,7 +359,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const dayValues = page.locator('ion-datetime .date-column .picker-item[data-value]');
expect(await dayValues.count()).toEqual(41);
@@ -382,7 +382,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const disabledDates = page.locator('.date-column .picker-item[disabled]');
@@ -403,7 +403,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const dateValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');
@@ -424,7 +424,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const dateValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');
@@ -444,7 +444,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const dateColumn = page.locator('.date-column');
const dateValues = dateColumn.locator('.picker-item:not(.picker-item-empty)');
@@ -474,7 +474,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');
@@ -494,7 +494,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');
@@ -511,7 +511,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const ionChange = await page.spyOnEvent('ionChange');
const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');
@@ -531,7 +531,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const dayValues = page.locator('ion-datetime .date-column .picker-item[data-value]');
expect(await dayValues.count()).toEqual(57);
@@ -544,7 +544,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const dayValues = page.locator('ion-datetime .date-column .picker-item[data-value]');
expect(await dayValues.count()).toEqual(41);
@@ -567,7 +567,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const disabledDates = page.locator('.date-column .picker-item[disabled]');
@@ -588,7 +588,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const dateValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');
@@ -609,7 +609,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const dateValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');
@@ -629,7 +629,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const dateColumn = page.locator('.date-column');
const dateValues = dateColumn.locator('.picker-item:not(.picker-item-empty)');
@@ -659,7 +659,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');
@@ -679,7 +679,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');

View File

@@ -117,7 +117,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
const monthYearButton = page.locator('ion-datetime .calendar-month-year');
@@ -189,7 +189,7 @@ class DatetimePresentationFixture {
`,
config
);
await this.page.waitForSelector('.datetime-ready');
await this.page.locator('.datetime-ready').waitFor();
this.datetime = this.page.locator('ion-datetime');
}
@@ -214,7 +214,7 @@ class TimePickerFixture {
`,
config
);
await this.page.waitForSelector('.datetime-ready');
await this.page.locator('.datetime-ready').waitFor();
this.timePicker = this.page.locator('ion-datetime');
}

View File

@@ -27,7 +27,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const febFirstButton = page.locator(`.calendar-day[data-day='1'][data-month='2']`);
@@ -43,7 +43,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree
);
const ionChange = await page.spyOnEvent('ionChange');
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const calendarMonthYear = page.locator('ion-datetime .calendar-month-year');
await expect(calendarMonthYear).toHaveText('February 2022');
@@ -66,7 +66,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree
const tabKey = browserName === 'webkit' ? 'Alt+Tab' : 'Tab';
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const calendarMonthYear = page.locator('ion-datetime .calendar-month-year');
const monthYearButton = page.locator('.calendar-month-year ion-item');
await expect(calendarMonthYear).toHaveText('February 2022');
@@ -157,7 +157,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const clearButton = page.locator('#clear-button button');

View File

@@ -5,7 +5,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
test.describe(title('datetime: set-value'), () => {
test('should update the active date when value is initially set', async ({ page }) => {
await page.goto('/src/components/datetime/test/set-value', config);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
await datetime.evaluate((el: HTMLIonDatetimeElement) => (el.value = '2021-11-25T12:40:00.000Z'));
@@ -18,7 +18,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
test('should update the active time when value is initially set', async ({ page }) => {
await page.goto('/src/components/datetime/test/set-value', config);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
await datetime.evaluate((el: HTMLIonDatetimeElement) => (el.value = '2021-11-25T12:40:00.000Z'));
@@ -37,7 +37,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
const activeDayButton = page.locator('.calendar-day-active');
@@ -53,7 +53,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
test('should scroll to new month when value is initially set and then updated', async ({ page }) => {
await page.goto('/src/components/datetime/test/set-value', config);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
await datetime.evaluate((el: HTMLIonDatetimeElement) => (el.value = '2021-05-25T12:40:00.000Z'));

View File

@@ -10,7 +10,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const timeLabel = page.locator('ion-datetime .time-header');
await expect(timeLabel).toHaveText('Time');
@@ -22,7 +22,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const timeLabel = page.locator('ion-datetime .time-header');
await expect(timeLabel).toHaveText('');

View File

@@ -10,7 +10,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const items = page.locator('.calendar-day:not([disabled])');
@@ -91,7 +91,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const minuteItems = page.locator(
'ion-picker-column-internal:nth-of-type(2) .picker-item:not(.picker-item-empty)'
@@ -137,7 +137,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const monthItems = page.locator('.month-column .picker-item:not(.picker-item-empty)');
await expect(monthItems).toHaveText(['January']);
@@ -169,7 +169,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const todayButton = page.locator('.calendar-day[data-day="10"][data-month="10"][data-year="2022"]');

View File

@@ -16,7 +16,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, c
await content.evaluate(async (el: HTMLIonContentElement) => {
await el.scrollToBottom();
});
await page.waitForSelector('#largeTitleHeader.header-collapse-condense-inactive');
await page.locator('#largeTitleHeader.header-collapse-condense-inactive').waitFor();
await expect(smallTitleHeader).toHaveScreenshot(screenshot(`header-condense-large-title-collapsed-diff`));
@@ -30,7 +30,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, c
await content.evaluate(async (el: HTMLIonContentElement) => {
await el.scrollToTop();
});
await page.waitForSelector('#smallTitleHeader.header-collapse-condense-inactive');
await page.locator('#smallTitleHeader.header-collapse-condense-inactive').waitFor();
await expect(smallTitleHeader).toHaveAttribute('aria-hidden', 'true');
});

View File

@@ -51,15 +51,6 @@
* @prop --highlight-color-valid: The color of the highlight on the item when valid. Only applies to inputs and textareas using the legacy form syntax. DEPRECATED: Highlights can be styled on `ion-input` or `ion-textarea` when using the modern form syntax.
* @prop --highlight-color-invalid: The color of the highlight on the item when invalid. Only applies to inputs and textareas using the legacy form syntax. DEPRECATED: Highlights can be styled on `ion-input` or `ion-textarea` when using the modern form syntax.
*/
/**
* We change the minimum width as the
* font size changes. Using a fixed minimum
* width means that fewer and fewer characters
* can be displayed in the same space as the
* text grows.
*/
--inner-min-width: 4rem;
--border-radius: 0px;
--border-width: 0px;
--border-style: solid;
@@ -230,11 +221,6 @@
display: flex;
position: relative;
// Flex wrap is required here in order to wrap
// the start slot + .item-inner content that
// doesn't fit on the same line
flex-wrap: wrap;
align-items: inherit;
justify-content: inherit;
@@ -258,11 +244,6 @@
box-sizing: border-box;
}
// TODO(FW-5289): remove
:host(.item-legacy) .item-native {
flex-wrap: unset;
}
.item-native::-moz-focus-inner {
border: 0;
}
@@ -307,34 +288,13 @@ button, a {
// This is required to work with an inset highlight
position: relative;
// This flex property is required in order to make
// the elements wrap when there is a slotted start
// element and a label
flex: 1 0 0;
flex: 1;
flex-direction: inherit;
// Flex wrap is required here in order to wrap
// .input-wrapper content + the end slot that
// doesn't fit on the same line
flex-wrap: wrap;
align-items: inherit;
align-self: stretch;
/**
* The min-width defines when the
* content in the default slot should
* stop wrapping/truncating within its own
* container. At this point the entire
* container will wrap to the next line.
*/
min-width: var(--inner-min-width);
// Max width must be set to 100%, otherwise the
// elements will overflow this container instead
// of wrapping
max-width: 100%;
min-height: inherit;
border-width: var(--inner-border-width);
@@ -346,15 +306,6 @@ button, a {
box-sizing: border-box;
}
// TODO(FW-5289): remove
:host(.item-legacy) .item-inner {
flex: 1;
flex-wrap: unset;
max-width: unset;
}
// Item Bottom
// --------------------------------------------------
@@ -448,38 +399,19 @@ button, a {
// This flex property is required in order to keep
// the label from shrinking when there are wide
// elements next to it
flex: 1 0 auto;
flex: 1;
flex-direction: inherit;
// Flex wrap is required here in order to wrap
// content in the default slot (such as a label
// and a button) that doesn't fit on the same line
flex-wrap: wrap;
align-items: inherit;
align-self: stretch;
// Max width must be set to 100%, otherwise the
// elements will overflow this container instead
// of wrapping
max-width: 100%;
text-overflow: ellipsis;
overflow: inherit;
box-sizing: border-box;
}
// TODO(FW-5289): remove
:host(.item-legacy) .input-wrapper {
flex: 1;
flex-wrap: unset;
max-width: unset;
}
:host(.item-label-stacked),
:host(.item-label-floating) {
align-items: start;

View File

@@ -150,6 +150,12 @@ export class Item implements ComponentInterface, AnchorInterface, ButtonInterfac
@State() counterString: string | null | undefined;
@Watch('button')
buttonChanged() {
// Update the focusable option when the button option is changed
this.focusable = this.isFocusable();
}
@Watch('counterFormatter')
counterFormatterChanged() {
this.updateCounterOutput(this.getFirstInput());

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 47 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

@@ -0,0 +1,22 @@
import { h } from '@stencil/core';
import { newSpecPage } from '@stencil/core/testing';
import { Item } from '../item';
describe('item', () => {
it('should change focusable option after switching button option status', async () => {
const page = await newSpecPage({
components: [Item],
template: () => <ion-item button={false}></ion-item>,
});
const item = page.body.querySelector('ion-item')!;
// Change button attribute to true
item.setAttribute('button', 'true');
await page.waitForChanges();
// Check if it has the expected class that gives the highlight style to .item-highlight element
expect(item).toHaveClass('ion-focusable');
});
});

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 KiB

After

Width:  |  Height:  |  Size: 196 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 KiB

After

Width:  |  Height:  |  Size: 238 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 KiB

After

Width:  |  Height:  |  Size: 170 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

After

Width:  |  Height:  |  Size: 198 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 KiB

After

Width:  |  Height:  |  Size: 239 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 KiB

After

Width:  |  Height:  |  Size: 171 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -15,7 +15,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
await ionModalDidDismiss.next();
await page.waitForSelector('ion-modal', { state: 'detached' });
await page.locator('ion-modal').waitFor({ state: 'detached' });
});
});
});

View File

@@ -72,33 +72,33 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
<ion-list>
<ion-item>
<ion-note slot="start">Really really long note</ion-note>
<ion-note slot="start">123</ion-note>
<ion-label>Label</ion-label>
</ion-item>
<ion-item>
<ion-label>Label</ion-label>
<ion-note slot="end">Really really long note</ion-note>
<ion-note slot="end">123</ion-note>
</ion-item>
<ion-item>
<ion-note slot="start">Note</ion-note>
<ion-note slot="start">123</ion-note>
<ion-label>Really really long label</ion-label>
</ion-item>
<ion-item>
<ion-label>Really really long label</ion-label>
<ion-note slot="end">Note</ion-note>
<ion-note slot="end">123</ion-note>
</ion-item>
<ion-item>
<ion-note slot="start">Really really long note</ion-note>
<ion-note slot="start">123</ion-note>
<ion-label>Really really long label</ion-label>
</ion-item>
<ion-item>
<ion-label>Really really long label</ion-label>
<ion-note slot="end">Really really long note</ion-note>
<ion-note slot="end">123</ion-note>
</ion-item>
</ion-list>
`,

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 65 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 56 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 56 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -14,7 +14,7 @@ import { dragElementByYAxis } from '@utils/test/playwright';
const pullToRefresh = async (page: E2EPage, selector = 'body') => {
const target = page.locator(selector);
await page.waitForSelector('ion-refresher.hydrated', { state: 'attached' });
await page.locator('ion-refresher.hydrated').waitFor({ state: 'attached' });
const ev = await page.spyOnEvent('ionRefreshComplete');

View File

@@ -29,7 +29,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
}
// Waits for the ripple effect to be added
await page.waitForSelector('.ion-activated');
await page.locator('.ion-activated').waitFor();
await expect(el).toHaveClass(/ion-activated/);
});
@@ -56,7 +56,7 @@ const verifyRippleEffect = async (page: E2EPage, config: E2EPageOptions, selecto
await page.mouse.down();
}
await page.waitForSelector('.ion-activated');
await page.locator('.ion-activated').waitFor();
await expect(el).toHaveClass(/ion-activated/);
};

View File

@@ -258,4 +258,13 @@ export const config: Config = {
globalScript: 'src/global/ionic-global.ts',
enableCache: true,
transformAliasedImportPaths: true,
/**
* Creates the `dist` directory and runs the output targets
* when the Stencil dev server rebuilds.
*
* This option adds ~20s to the dev server startup time.
* You can disable it locally if you are not testing the
* custom elements output in the framework projects.
*/
buildDist: true
};

13850
package-lock.json generated
View File

File diff suppressed because it is too large Load Diff

View File

@@ -7,5 +7,9 @@
},
"engines": {
"node": ">= 16"
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"build": "echo noop"
}
}

View File

@@ -0,0 +1,5 @@
{
"lib": {
"entryFile": "src/index.ts"
}
}

View File

@@ -0,0 +1,22 @@
{
"name": "angular-schematics",
"private": true,
"version": "0.0.0",
"description": "Schematics for Angular",
"scripts": {
"copy": "node scripts/copy.js",
"build": "tsc -p tsconfig.json && pnpm copy"
},
"dependencies": {
"@schematics/angular": "^17.0.0",
"jsonc-parser": "^3.0.0"
},
"devDependencies": {
"@angular/cli": "^17.0.7",
"@angular-devkit/core": "^17.0.0",
"@angular-devkit/schematics": "^17.0.0",
"@types/node": "^18.0.0",
"fs-extra": "^7.0.0",
"typescript": "~4.7.2"
}
}

View File

@@ -0,0 +1,19 @@
const fs = require("fs-extra");
const path = require("path");
function copySchematicsJson() {
const src = path.join(__dirname, "..", "src", "collection.json");
const fileSrc = path.join(__dirname, "..", "src", "add", "files");
const dst = path.join(__dirname, "..", "dist", "collection.json");
const fileDst = path.join(__dirname, "..", "dist", "add", "files");
const schemaSrc = path.join(__dirname, "..", "src", "add", "schema.json");
const schemaDst = path.join(__dirname, "..", "dist", "add", "schema.json");
fs.removeSync(dst);
fs.removeSync(fileDst);
fs.copySync(src, dst);
fs.copySync(fileSrc, fileDst);
fs.copySync(schemaSrc, schemaDst);
}
copySchematicsJson();

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