octicon-git-branch(16/) Commit Graph

575 Commits

Author SHA1 Message Date
Sean Perkins
1705d064cc fix(react): router creates new view instances of parameterized routes (#28616)
Issue number: Resolves #26524 

---------

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

## Definitions

**Parameterized routes**: A route that includes one or more variables in
the path segments, such as `/form/:index`.

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

When an application routes from a parameterized route, to an
intermediary route, to the same parameterized route, but with a
different value/url, Ionic's routing logic is incorrectly reusing the
view item from the first instance of the parameterized route instead of
calculating that the matched path is different. This results in the
wrong view item being recycled and rendered.

Another way of representing it:
- User navigates to `/form/0` which resolves `FormPage`
- User enters `0` into the form and submits the form
- User navigates to `/link`, which resolves `LinkPage`
- User navigates to `/form/1`, which resolves `FormPage`
- However, instead of creating a new instance of `FormPage` it is
reusing the instance of `FormPage` from `/form/0` which includes the
form having `0` in the input.
  - The user now sees a "new view", but with cached data in the form.

This is not expected or desired. 


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

- Ionic's routing logic will validate if the entering view item matches
the match route data before reusing it. This results in new instances of
the view item being constructed when using parameterized routes.


https://github.com/ionic-team/ionic-framework/assets/13732623/e7e3d03f-2848-4429-9f60-9074d0761e45


## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

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

Dev-build: `7.5.8-dev.11701383555.17254408`
2023-12-01 22:11:41 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
2e1261a52c chore(): update package lock files 2023-11-29 15:05:23 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
3a35fdd2f5 v7.5.7 2023-11-29 15:05:12 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
93ed25693c chore(): update package lock files 2023-11-21 14:31:53 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
f6a740dce5 v7.5.6 2023-11-21 14:31:40 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
9bb45b3772 chore(): update package lock files 2023-11-15 15:27:39 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
78ce39f8c6 v7.5.5 2023-11-15 15:27:28 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
aeeb84b77d refactor: introduce watch command (#28453)
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. -->

This is part of my work for hack day, but I wanted to tackle the
following problems:

1. There is no easy way to have angular, angular-server, vue,
vue-router, react, and react-router automatically recompile when you
make a change. Right now you have to manually run `npm run build` every
time you make a change.

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

- Adds `npm run build.watch` to let developers easily watch for changes
in each project.
## 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-09 16:50:19 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
95b52ac8ba chore(): update package lock files 2023-11-08 14:49:04 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
5bd4af2c51 v7.5.4 2023-11-08 14:48:46 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
dfaa006a7a refactor: update to rollup 4 (#28459)
Issue number: N/A

---------

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

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

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

The vue, vue-router, react, and react-router packages are bundled with a
version of rollup that are 2 major versions out of date.

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

- Update deps to rollup 4 and made any necessary changes as a result of
breaking changes
- Removed the react projects old treeshaking script. The rollup dep used
was incompatible with Rollup 4, and the script didn't work to begin
with.
- Removed the source maps and resolve plugins. These did not make any
difference in the final result, and source maps are still included in
the final build.
- Removed a PURE annotation from an import. Rollup 4 warns about this,
and this PURE annotation does not seem to be needed since every import
in this file uses "createReactComponent" to begin with.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-11-07 15:21:46 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
dfafb27435 chore: packages do not explicitly run tsc (#28450)
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. -->

Rollup has a plugin to handle TypeScript compilation that we are not
using. As a result, we are maintaining unnecessary infrastructure such
as compiling to `dist-transpiled`(TS to JS) and then compiling the
results to `dist` (JS files to bundled code).

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

- Vue, Vue Router, React, and React Router now make use of the Rollup
Typescript plugin to handle TypeScript compilation for us. This lets us
remove the `dist-transpiled` directory altogether and the manual `tsc`
invocation.

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

Developers should not see any changes in how they consume Ionic. This
just hands the TypeScript compilation step off to the Rollup plugin.

Dev build: `7.5.3-dev.11698859252.15ac163e`
2023-11-06 19:23:48 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
b7d1a5c86b chore: remove release scripts (#28451)
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. -->

These scripts are old and do not do anything (`np` isn't even a
dependency).

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

- Removed the scripts from react and react-router

## 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-01 20:27:25 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
a608a11ad0 chore(): update package lock files 2023-11-01 13:40:57 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
d70c89c0e2 v7.5.3 2023-11-01 13:40:40 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
afa0e3c4d1 chore(): update package lock files 2023-10-25 14:13:03 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
7722ba05eb v7.5.2 2023-10-25 14:12:43 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
da0da54314 chore(): update package lock files 2023-10-18 13:27:01 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
38f2a027f0 v7.5.1 2023-10-18 13:26:44 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
59f23dcc2c chore(): update package lock files 2023-10-11 14:21:37 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
053b7d59d3 v7.5.0 2023-10-11 14:21:18 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
2caaf6a526 chore(): update package lock files 2023-10-11 13:29:45 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
cb47273f26 v7.4.4 2023-10-11 13:29:27 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
2429caa168 chore(): update package lock files 2023-10-04 13:26:49 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
a8517f4fcf v7.4.3 2023-10-04 13:26:30 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
078964447a chore(): update package lock files 2023-09-27 13:32:44 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
45bcd4c22b v7.4.2 2023-09-27 13:32:27 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
de1a4c50bb test: update test apps to cypress 13 (#28212)
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. -->

CI is failing for Cypress apps due to
https://github.com/cypress-io/cypress/issues/27804#issuecomment-1721476731.

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

- All Cypress test apps have been updated to Cypress 13.2.0 which is not
affected by this issue.

## 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-21 20:17:46 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
2e626a909f chore(): update package lock files 2023-09-20 13:21:09 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
d82414d43f v7.4.1 2023-09-20 13:20:51 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
6304645a81 chore(): update package lock files 2023-09-14 13:07:07 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
c28b66a99a v7.4.0 2023-09-14 13:06:52 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
af29857c5f chore(): update package lock files 2023-09-13 13:12:27 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
f9a984e4aa v7.3.4 2023-09-13 13:12:09 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
7dbce4fc09 chore(): update package lock files 2023-09-06 13:24:04 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
3de1dd3c14 v7.3.3 2023-09-06 13:23:50 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
a25c38223c chore(): update package lock files 2023-08-30 12:48:07 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
f9211e5434 v7.3.2 2023-08-30 12:47:53 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
b333bdffe6 chore(): update package lock files 2023-08-23 13:40:28 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
5701f7661e v7.3.1 2023-08-23 13:40:10 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
6877d659d3 chore(): update package lock files 2023-08-16 14:23:51 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
16f7ec2284 v7.3.0 2023-08-16 14:23:33 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
7c24965216 chore(): update package lock files 2023-08-16 13:26:24 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
ffe5307905 v7.2.4 2023-08-16 13:26:09 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
3a263d14c3 chore(): update package lock files 2023-08-09 16:28:15 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
0cb37430d3 v7.2.3 2023-08-09 16:27:57 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
01857dd315 chore(): update package lock files 2023-08-02 15:59:53 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
dbe6f390ef v7.2.2 2023-08-02 15:59:37 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
Liam DeBeasi
824033f1d4 fix(react, vue): custom animations are used when going back (#27895)
Issue number: resolves #27873

---------

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

Custom animations are not always used when the `handleNavigateBack`
method is called. This impacts both Ionic React and Ionic Vue.

While we do set the `incomingRouteParams` with the animation:
a08a5894ba/packages/react-router/src/ReactRouter/IonRouter.tsx (L247-L252)

We do sometimes call `handleNavigate`:
a08a5894ba/packages/react-router/src/ReactRouter/IonRouter.tsx (L273-L279)

This `handleNavigate` method sets `incomingRouteParams` again:
a08a5894ba/packages/react-router/src/ReactRouter/IonRouter.tsx (L225-L230)

Since we do not re-pass `routeAnimation`, that field gets set to
`undefined` and the custom animation does not get used.

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

- Custom animation is now passed to `handleNavigate`

## 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.2.2-dev.11690810887.180000d1`
2023-07-31 17:57:03 +00:00 octicon-file-diff(16/) octicon-file-code(16/)
ionitron
960adbbc5c chore(): update package lock files 2023-07-26 15:54:44 +00:00 octicon-file-diff(16/) octicon-file-code(16/)