341 Commits

Author SHA1 Message Date
73d661a3a2 chore(github-actions): use flexible options to update screenshots (#29044)
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. -->

GitHub actions allow screenshots to be updated either by updating all
the components or providing a component name.

If a component name is given, then the screenshots will only be updated
on `src/components/{component-name}`. This isn't ideal when wanting to
update a specific path.

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

- The script no longer strips out `ion-`. The developer needs to submit
a valid component name or valid path.
- The script no longer appends the value to `src/components/`
- The script will run all instances of a component if only the name is
given
- The script will run tests within a given path

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

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 name (`chip`)
- a path (`src/components/chip/test/a11y`)
- a component that doesn't exist (`random-component`)
- no provided component, leave the first input blank
2024-03-19 17:24:31 +00:00
e98620ee99 test(ci): run tests in docker container (#28893)
Issue number: Internal

---------

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

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

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

The team currently faces two challenges:

1. Verifying visual changes locally is difficult because we cannot use
the existing ground truths as they were generated in Linux environments
and most of our team uses either macOS or Windows. While team members
can generate ground truths in the correct environment, they need to
remember to do that first before making changes.
2. Updating visual diffs is time consuming and can only be done by team
members. Our GitHub Action runs the entire test suite which can take ~10
even if only a handful of screenshots are generated. Additionally, this
job can only be run by team members meaning community contributors
cannot update/add screenshots. This limits them to non-visual tasks when
contributing. In the event that they do want to make visual changes, the
team needs to copy all their code into a branch and manually run
screenshot diffs for them.

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

- This PR introduces the ability to run all Playwright tests inside of a
Docker container using an image with Playwright dependencies. The
container will have access to the local project, so developers can make
changes and then run tests in the container after the changes are
compiled. This enables anyone to propose new screenshot changes.
However, the "update screenshot" job will still be available for folks
who do not want/are unable to use docker.
- There are some typeface differences between GH Actions and the Docker
image which is why there are a handful of screenshots that needed to be
updated.

One risk here is that the Playwright npm and Docker image versions must
be kept in sync. As a result, I also updatRenovate to allow us to auto
update the npm and Docker image versions at the same time.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  3. Update the BREAKING.md file with the breaking change.
4. 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. -->


⚠️ There are still some issues I need to sort out with mounting the
local project on Windows. However, using Ubuntu with the linux subsystem
for windows can be used as a workaround. I'd like to merge this so we
can start testing it in our day-to-day workflow and ironing out any
bugs.

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2024-03-18 14:08:30 +00:00
02f89bbc42 docs(contributing): update component guide with order for states (#29111)
Updates the component guide to use the proper order for the `focused`,
`hover`, and `activated` states. Reorders the sections based on the
recommended order and adds emphasis and blockquotes to call out the
order.

I have created ticket
[FW-6039](https://outsystemsrd.atlassian.net/browse/FW-6039) for
investigating components that don't follow the recommended order here.

---------

Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
2024-03-15 21:47:35 +00:00
fedd0fab80 chore: update bug report template descriptions and required fields (#29135)
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. -->

N/A

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

- Code reproductions are now required for all new issue reports. The
description around a reproduction and how developers can create one has
been adjusted.
- We only support Ionic v7 to LTS at this point in time. Sending
developers to a readonly repository where they cannot file issues
doesn't add any value. I've updated the description and link to the
relevant support page and enterprise offering.

## 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-03-12 03:29:10 +00:00
4152604633 docs(contributing): add more context about focus, hover, and active (#29106)
The team discussed these utilities for some upcoming features work. This
PR reflects some of the things I talked about during the discussion for
future reference.

---------

Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-03-04 15:32:52 +00:00
d16acbe0b4 chore(deps): update github/codeql-action action to v3 (#29050)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github/codeql-action](https://togithub.com/github/codeql-action) |
action | major | `v2` -> `v3` |

---

### Release Notes

<details>
<summary>github/codeql-action (github/codeql-action)</summary>

### [`v3`](https://togithub.com/github/codeql-action/compare/v2...v3)

[Compare
Source](https://togithub.com/github/codeql-action/compare/v2...v3)

</details>

---

### Configuration

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

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

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

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

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

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ionic-team/ionic-framework).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIyMC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-01 19:43:28 +00:00
0314f1cf76 chore(deps): update download + upload artifacts to v4 (major) (#29049)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[actions/download-artifact](https://togithub.com/actions/download-artifact)
| action | major | `v3` -> `v4` |
|
[actions/upload-artifact](https://togithub.com/actions/upload-artifact)
| action | major | `v3` -> `v4` |

---

### Release Notes

<details>
<summary>actions/download-artifact (actions/download-artifact)</summary>

###
[`v4`](https://togithub.com/actions/download-artifact/compare/v3...v4)

[Compare
Source](https://togithub.com/actions/download-artifact/compare/v3...v4)

</details>

<details>
<summary>actions/upload-artifact (actions/upload-artifact)</summary>

### [`v4`](https://togithub.com/actions/upload-artifact/compare/v3...v4)

[Compare
Source](https://togithub.com/actions/upload-artifact/compare/v3...v4)

</details>

---

### Configuration

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

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

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

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

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

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ionic-team/ionic-framework).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE3My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-01 15:07:17 +00:00
975bc43893 chore(deps): update actions/setup-node action to v4 (#29048)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/setup-node](https://togithub.com/actions/setup-node) | action
| major | `v3` -> `v4` |

---

### Release Notes

<details>
<summary>actions/setup-node (actions/setup-node)</summary>

### [`v4`](https://togithub.com/actions/setup-node/compare/v3...v4)

[Compare
Source](https://togithub.com/actions/setup-node/compare/v3...v4)

</details>

---

### Configuration

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

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

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

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

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

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ionic-team/ionic-framework).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIxMi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-01 15:06:06 +00:00
5a5f330705 chore: revert remove liam from auto-assign issues while out of office (#29088)
I'm back!

Reverts ionic-team/ionic-framework#29066
2024-02-26 16:49:38 +00:00
e440051764 chore(ci): add --debug --verbose to stencil nightly build (#29078)
Set the `--debug` and `--verbose` flags on the Stencil Nightly CI build.

## What is the current behavior?

The Stencil nightly build doesn't provide all the information that it
could!

## What is the new behavior?

This sets the `--debug` and `--verbose` flags when calling `npm run
build` in the 'Build Ionic Core with Stencil Prerelease' github action,
which is used by the workflow which installs nightly Stencil builds and
builds framework with it, thereby checking for regressions.

This change will just ensure that this nightly build provides a bit more
information.


## 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.
-->
2024-02-22 18:38:14 +00:00
7ec17af88e chore: remove liam from auto-assign issues while out of office (#29066)
This removes me from being auto-assigned issues while I am out of
office.
2024-02-15 22:37:58 +00:00
6b781fb165 chore(deps): update actions/checkout action to v4 (#29047)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/checkout](https://togithub.com/actions/checkout) | action |
major | `v3` -> `v4` |

---

### Release Notes

<details>
<summary>actions/checkout (actions/checkout)</summary>

###
[`v4`](https://togithub.com/actions/checkout/blob/HEAD/CHANGELOG.md#v400)

[Compare Source](https://togithub.com/actions/checkout/compare/v3...v4)

- [Support fetching without the --progress
option](https://togithub.com/actions/checkout/pull/1067)
-   [Update to node20](https://togithub.com/actions/checkout/pull/1436)

</details>

---

### Configuration

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

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

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

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

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

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ionic-team/ionic-framework).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE3My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-14 16:57:00 +00:00
b7efc38c38 chore: migrate to renovatebot, add support for GitHub actions (#29045)
GitHub Actions is [transitioning from Node 16 to Node
20](https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/).
As a result, we have several GitHub Actions that need to be updated.
Rather than update these actions manually, I decided to have Renovatebot
do it. This PR adds Renovatebot so it can automatically create PRs to
update our GitHub Actions dependencies. I also migrated the Dependabot
config to use Renovatebot so we don't have two dependency management
tools.

Example test run:
https://github.com/liamdebeasi/framework-renovate-test/pulls

Note: You can ignore the Docker update. I am using this fork for
Docker-related work as well.

As a result of this PR, Renovatebot will create several PRs on this repo
to update GitHub Actions dependencies.
2024-02-14 02:32:36 +00:00
e62ec509a3 chore(ci): remove ng12-15 apps, add ng16-17 for stencil nightlies (#28945)
Issue number: Internal

---------

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

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

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

The Stencil nightlies are still attempting to run old Angular test apps
and does not test ng16/17

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

- Removed ng12-15 test apps
- Added ng16-17 test apps

I opted to remove ng14-15 because we are in the process of dropping
support for it in Ionic 8.

## 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 19:11:23 +00:00
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
9a092c03cc chore: assign team members instead of members from team (#28880)
The token I was using didn't have the correct permissions, and I need to
figure out how to generate a new token (I don't think I have access to
the account where these tokens live). For now, I'm going to hard code
the team members until I can figure out the token access out.
2024-01-25 15:53:10 +00:00
a3ebca0f26 chore(ci): auto assign issues (#28873)
To make it easy for the team to quickly triage issues, we'd like to
automatically assign issues to team members at random. This PR use
https://github.com/marketplace/actions/auto-assign-issue to assign 1
member of the `framework` GitHub team to be the person to triage.
2024-01-24 22:49:16 +00:00
e86f4f1cc9 chore(ci): do not publish GitHub releases for nightlies (#28853)
Publishing GitHub releases for each nightly is creating more noise than
the team would like. As a result, we are going to stop publishing the
GitHub release. However, nightly builds will continue to automatically
release. Developers can look at the commits in `main` to determine if a
commit is in a nightly build:
https://github.com/ionic-team/ionic-framework
2024-01-22 15:15:24 +00:00
0860ea0951 chore: workflow pulls correct version of branch 2024-01-17 09:39:57 -05:00
535b8ed724 chore(ci): use correct github credentials for pushing (#28806)
The update-package-lock job did not configure Git credentials correctly.
As a result, the job is unable to push the `package-lock.json` changes
to the repo:
https://github.com/ionic-team/ionic-framework/actions/runs/7476310958/job/20346663176

This PR configures the job with the correct credentials.
2024-01-10 16:47:44 +00:00
28752acebd chore(ci): checkout files when updating package-lock (#28778)
In https://github.com/ionic-team/ionic-framework/pull/28697 I moved the
package-lock work to its own step to lets us re-run that if it fails.
However, I forgot to checkout the project files in that step, so there
was no `package-lock.json` file to update [resulting in an
error](https://github.com/ionic-team/ionic-framework/actions/runs/7398703880/job/20128761433).
2024-01-09 15:58:22 +00:00
86e96f7fce chore: end holiday triage 2023 (#28793)
Reverts ionic-team/ionic-framework#28757
2024-01-08 18:48:44 +00:00
da820b830e chore: start holiday triage 2023 (#28757)
This PR begins holiday triage mode for the Ionic Framework repo.
2023-12-21 21:48:19 +00:00
5d3bf9818d chore(ci): package-lock is updated from separate job (#28697)
After each release, we need to update the local `package-lock.json`
dependencies. We do this via a `npm install --package-lock-only`
command. However, this command can fail for reasons such as a connection
timeout. When this happens, the package-lock files do not get updated.

The problem is this action is also done in the same job as generating
the changelog and creating the GitHub release. This operations cannot be
re-done. As a result, we cannot simply re-run this job and try updating
the package-lock files again.

This PR changes the workflow to split the package-lock update out to its
own job. In the event that this job fails, we can re-run only this job
and leave the other jobs untouched.
2023-12-19 16:43:45 +00:00
ec07e70d99 chore: update PR template for breaking changes (#28698)
The team had feedback during a sprint retro that the breaking change
process documentation was a bit spread out. In particular, some team
members were not clear that you need to a) update the breaking.md file
and b) add the "BREAKING CHANGE" comment to the commit description.

This PR adds both of these things are comments for awareness.
2023-12-13 18:27:12 +00:00
6f9ee6024b chore: add resolves to PR template (#28693)
I've noticed a few instances where the team forgets to add the
"resolves" keyword (or similar "closes"/"fixes" keywords) when linking a
PR to an issue. GitHub will not link the PR with the issue and will not
close the issue on PR merge unless one of these keywords is used.

I've updated the PR template to add the "resolves" keyword so team
members don't need to worry about remembering to add it.
2023-12-12 15:14:21 +00:00
4847488090 chore(ci): update labeler workflow for labeler@v5 (#28627)
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 labeler action is currently failing:
https://github.com/ionic-team/ionic-framework/actions/runs/7090913880/job/19298918578?pr=28622.
This is happening due to a breaking change in v5 of the action.

We currently pull from `main` for this action so we are now receiving v5
of the action:
fe3c3d500a/.github/workflows/label.yml (L16)

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

- This PR updates the action explicitly to v5 so we don't unexpectedly
take on breaking changes
- This PR also updates the labeler yaml file to account for the v5
breaking changes

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-12-04 21:31:12 +00:00
196a22eb74 chore: fallback to framework team with codeowners (#28588)
I noticed that Dependabot PRs never had anyone assigned:
https://github.com/ionic-team/ionic-framework/pull/28586

The reason was that we removed `* @ionic-team/framework` when we
adjusted the codeowners in
https://github.com/ionic-team/ionic-framework/pull/27573.

My original reasoning for why we should remove it was wrong. GitHub only
assigns reviewers within a team if the team itself is assigned. By
removing the team from being reviewed, only people listed in the
codeowners file would be assigned. As an added example, PRs that do not
match codeowners currently have no one assigned:
https://github.com/ionic-team/ionic-framework/pull/28430
2023-11-28 16:44:51 +00:00
04d32b6d68 chore: adds angular test app for v17 (#28513)
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. -->
There is no Angular v17 test app.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
There is an Angular v17 test app.

New overrides:
- angular.json: `browserTarget` was changed to `buildTarget` and to
replace `@nguniversal` with `@angular/ssr` and
`@angular-devkit/build-angular`
- server.ts: Replace uses of `@nguniversal` with `@angular/ssr`

New change to base:
- polyfills.ts: Import
[changed](https://github.com/angular/angular/blob/main/CHANGELOG.md#zonejs)
from `import 'zone.js/dist/zone';` (this change is supported for all
versions of Angular that we support, so should be changed in the base
file)

All other files were duplicated from their v16 counterparts.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-11-13 19:30:36 +00:00
a5c68aa529 chore(repo): update angular path (#28426)
Issue number: #

---------

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

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

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
i found a small typo in the contributing guide

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

update the relative path for updating ionic angular, now that it's code
lives under the `packages/` directory

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-10-27 13:13:05 +00:00
3a3ebcf659 chore(ci): add workflow for testing ionicons dev build (#28345)
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. -->

Testing Ionicons in Ionic is currently difficult. Developers need to a)
create a dev build of Ionicons, b) create a branch in Ionic, c) install
the dev build in Ionic core, d) push the branch, and e) create a draft
PR to watch the CI process run.

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

- Introduces a workflow dispatch option for our CI process. This allows
developers to run the CI process for any branch without creating PR.
- I also added an optional input so devs can specify the ionicons
version if they want to pass a special version.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-10-17 18:06:25 +00:00
dcbf45101f chore: update codeowners (#28332)
Issue number: N/A

"Owning" a test didn't really work out like I expected/hoped. A lot of
changes to the test files were minor, so I ended up just getting
assigned to more-or-less random PRs. It wasn't really hurting anything,
but I might as well just let the bot assign me.

---------

## Does this introduce a breaking change?

- [ ] Yes
- [x] No
2023-10-11 17:33:47 +00:00
00767a02e4 chore(repo): parameterize stencil nightly (#28308)
Issue number: N/A

---------

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

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

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

when the stencil team wants to test a dev build of stencil against the
framework team's ci, they push a branch to this repo that overrides the
stencil nightly job's npm tag (replacing 'nightly' with the dev build
version) and manually kick off the nightly workflow. this commit would
eliminate the need for that first step there

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

update the stencil nightly job to accept any npm release tag, rather
than always default to 'nightly'. doing so allows the stencil team to
reuse this workflow for cases where we'd like to test a _dev_ build of
stencil by running it through the framework's ci process, without
landing the feature in stencil first.

I was able to test that `nightly` gets set by default (and the field is
required) by running the workflow from this branch.

I then also tested this against a dev build of Stencil:
![Screenshot 2023-10-09 at 9 45
41 AM](https://github.com/ionic-team/ionic-framework/assets/1930213/65613327-e5b6-475d-9bcd-b3c0d27019d9)

Interestingly enough, it helped me catch something to consider if we
were to accept the PR this dev build is accepted!


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

I considered making a separate workflow for this (rather than
override/use nightly) - it didn't quite seem worth the maintenance
effort 🤷
<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-10-09 14:21:33 +00:00
fd5a1ac708 chore(ci): account for new screenshots in error logging (#28166)
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. -->

We checked `git diff` to see if new screenshots were generated. If no
new screenshots were generated then we print a user-friendly message
informing the dev what happened. However, `git diff` does not account
for untracked changes (i.e. new screenshots).

As a result, this prevented new screenshots from being committed.

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

- To fix this we use the `-N` flag which is short for `--intent-to-add`.
This adds an entry with no content which causes the new screenshots to
show up when running `git diff`. We later add the contents of the image.

Example test run of this working:
https://github.com/ionic-team/ionic-framework/actions/runs/6174263712/job/16759260534

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-09-13 15:57:17 +00:00
4b4ad75bf0 chore: add error when no new diffs generated (#28132)
Issue number: N/A

---------

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

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

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

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

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

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

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

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

Example:

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


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

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-09-06 16:38:39 +00:00
38c4da3353 chore(ci): use node v18 for github actions (#28103)
Issue number: N/A

---------

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

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

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

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


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

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

- Updates the publish action to use node v18

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

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

Here is a successful run with these changes:
https://github.com/ionic-team/ionic-framework/actions/runs/6044521110
2023-09-01 17:57:10 +00:00
9eef62e4f2 chore(CODEOWNERS): add shawn to CODEOWNERS (#28064) 2023-08-25 17:19:12 +00:00
04b9b31622 chore(CODEOWNERS): add brandy to CODEOWNERS (#28063) 2023-08-25 16:17:31 +00:00
a7ed0a347a chore(CODEOWNERS): add Maria to Angular and Vue (#28061)
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. -->

Maria isn't part of the codeowners.

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

- Maria has been added to the Angular and Vue folders.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

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

N/A
2023-08-25 16:14:06 +00:00
d1ce8e2f8d chore(codeowners): add Amanda to checkbox and radio (#28062)
Issue number: #

---------

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

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

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

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

-
-
-

## Does this introduce a breaking change?

- [ ] Yes
- [ ] No

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


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-08-25 16:00:40 +00:00
2b5da93cdc chore(infra): clean build check will log recommended steps (#28044)
Issue number: N/A

---------

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

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

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

When the CI process detects a diff between the output in CI after
running `npm run build` versus the checked out branch, it will log the
diff and exit. It isn't very clear to developers what they need to do or
why this job step exists.

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

- Logs a prettier error message to the developer to let them know the
steps they can take when a diff is detected in CI

![CleanShot 2023-08-22 at 15 05
03](https://github.com/ionic-team/ionic-framework/assets/13732623/0397523e-5f4d-4ab6-8a2e-d9ecc4d085ba)

Example run:
https://github.com/ionic-team/ionic-framework/actions/runs/5942940488/job/16117074372?pr=28044

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-08-22 20:04:16 +00:00
d3e82c99b8 chore(ci): ensure stencil nightly gets installed for spec tests (#27974)
Issue number: #

---------

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

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

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

Stencil v3.4 is being used in the nightly run of these tests

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

this commit updates the `test-core-spec` action to accept an argument
for the version of stencil that should be installed/used. since we do
not (and arguably, should not) cache `node_modules/`, we need a way to
inform this action that a nightly version of stencil should be installed

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


I fully expect nightly CI to begin to fail as a result of merging this.
We'll fix that next week (in Stencil)
<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-08-15 15:33:22 +00:00
16c77ccdc8 refactor: use capacitor types for native plugins (#27755)
Issue number: Internal

---------

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

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

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

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

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

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

**How does it work?**

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

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

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

Dev-build: `7.1.2-dev.11688696027.1c4d4ad1`

Tested against a demo app for some of the core behavior:
https://github.com/sean-perkins/capacitor-ionic-plugins-demo
2023-07-14 15:27:28 +00:00
32bc33ed28 refactor(angular): move to packages directory (#27719)
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 `angular` directory sits at the root of the project instead of in
`packages` with all the other JS Framework integrations. This does not
cause any functional issues with Ionic, but it is confusing since
integrations are not in a consistent place.

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

- Moves the `angular` directory to `packages/angular`

Note: Most files should remain unchanged. The only files I changed are
the files that had direct paths to the old `angular` directory:

1. Removes the `angular` path in `lerna.json`. This is now covered by
`packages/*`
2. Updated the angular file path in `.gitignore`
3. Updates the path to the angular package in `stencil.config.ts` for
the Angular Output Targets
4. Updates some of Angular's sync scripts to correctly get the core
stylesheets as well as the core package.
5. Updates the test app sync script to correctly sync core and
angular-server

~I'm not entirely sure why GitHub thinks
https://github.com/ionic-team/ionic-framework/pull/27719/files#diff-f5bba7e7c7c75426e2b9c89868310cb03890493b4efe0252adf8d12cc8398962
is a new file since it exists in `main` here:
1f06be4a31/angular/test/base/scripts/build-ionic.sh~
Fixed in
6e7fc49827

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

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

Dev build: `7.1.2-dev.11688052109.13454f5c`
2023-07-05 17:52:35 +00:00
a4197a5c74 chore(ci): fix stencil nightly ci job (#27726)
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. -->

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

this commit updates the name of the dependent job for building the
angular server (`build-angular-server`).

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-06-30 15:34:26 +00:00
cef4691b5d chore: remove angular dep for angular-server (#27720)
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. -->

`@ionic/angular-server` has a dependency on `@ionic/core` not
`@ionic/angular` (see
1f06be4a31/packages/angular-server/package.json).
As a result, once `@ionic/core` is built there is no reason for
`@ionic/angular-server` to also wait for `@ionic/angular` to build
before it can build.

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

- `@ionic/angular-server` now waits for `@ionic/core` to build instead
of `@ionic/angular`

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

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


Dev build sample run:
https://github.com/ionic-team/ionic-framework/actions/runs/5414097033
2023-06-29 19:33:32 +00:00
2af5a141dc chore(ci): fix npm package provenance (#27712)
Issue number: N/A

---------

## What is the current behavior?

Nightly build and release broken in #27711 due to missing shell property
in GitHub Actions workflow.

## What is the new behavior?

- Nightly build and release works.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information
2023-06-28 12:45:04 +00:00
91bb6b57aa chore(ci): restore npm package provenance (#27711)
Issue number: #

---------

## What is the current behavior?

Package provenance was disabled in #27656.

## What is the new behavior?

- Package provenance is enabled.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information
2023-06-27 15:08:33 +00:00
3e5ec5032b chore(ci): remove stencil v4 nightly workflow (#27708)
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. -->
We have a workflow that is no longer needed (that I wrote 🙃) 

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

remove the stencil v4 nightly workflow following the stencil v4 release
on 2023.06.26

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

I'll have to take a look at the Actions tab at GitHub after this is
merged. I may have to do some manual cleanup (deleting workflow runs)
once this file is no longer in the repo.
<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-06-27 14:20:39 +00:00
d915ca6870 chore(ci): use local version of lerna (#27656)
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. -->

[GitHub Actions comes with Lerna 7
preinstalled](https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#project-management)
which has a breaking change for `lerna bootstrap`. This is causing Dev
builds and releases to intermittently fail despite our `package.json`
wanting Lerna 5.

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

- Ensure that the local version of Lerna is used instead of the global
Lerna. Long term we should look to update to Lerna 7 and migrate off
`lerna bootstrap`.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-06-15 16:12:53 +00:00