Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(router-plugin): prevent router overriding valid navigation #1907

Merged
merged 3 commits into from
Aug 8, 2022

Conversation

arturovt
Copy link
Member

@arturovt arturovt commented Aug 7, 2022

Issue: #1898

We initially added this check when trying to fix router + storage plugins integration.

We had an open issue related to this (#1204), but I've closed it since I verified the issue is not reproducible anymore with the latest NGXS version. The issue was reproducible with the 3.5.0 version (which was used in the reproducible example). I have upgraded NGXS and removed the checkInitialNavigationOnce method, and the behavior was the same as expected (the issue still wasn't reproducible).

@arturovt arturovt force-pushed the fix/remove-initial-navigation-check branch from 79515ad to f453a06 Compare August 7, 2022 14:43
@codeclimate
Copy link

codeclimate bot commented Aug 7, 2022

Code Climate has analyzed commit f453a06 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 96.7% (0.2% change).

View more on Code Climate.

@bundlemon
Copy link

bundlemon bot commented Aug 7, 2022

BundleMon

Files updated (2)
Status Path Size Limits
fesm2015/ngxs-store.js
114.1KB (-908B -0.77%) 125KB / +0.5%
fesm5/ngxs-store.js
133.05KB (-915B -0.67%) 145KB / +0.5%
Unchanged files (4)
Status Path Size Limits
fesm5/ngxs-store-operators.js
10.07KB 15KB / +0.5%
fesm2015/ngxs-store-operators.js
9.94KB 15KB / +0.5%
fesm5/ngxs-store-internals.js
6.58KB 20KB / +0.5%
fesm2015/ngxs-store-internals.js
5.65KB 20KB / +0.5%

Total files change -1.78KB -0.63%

Groups updated (6)
Status Path Size Limits
@ngxs/store(umd.min)[gzip]
./bundles/*.umd.min.js
13.42KB (-302B -2.15%) +1%
@ngxs/store(fesm2015)[gzip]
./fesm2015/*.js
26.32KB (-357B -1.31%) +1%
@ngxs/store(fesm5)[gzip]
./fesm5/*.js
28.69KB (-357B -1.2%) +1%
@ngxs/store(umd)[gzip]
./bundles/*.umd.js
39.31KB (-362B -0.89%) +1%
@ngxs/store(esm5)[gzip]
./esm5/**/*.js
174.15KB (-1.17KB -0.67%) +1%
@ngxs/store(esm2015)[gzip]
./esm2015/**/*.js
167.63KB (-1.18KB -0.7%) +1%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@bundlemon
Copy link

bundlemon bot commented Aug 7, 2022

BundleMon (NGXS Plugins)

Files updated (4)
Status Path Size Limits
Plugins(umd.min)[gzip]
router-plugin/bundles/ngxs-router-plugin.umd.
min.js
2.48KB (-240B -8.63%) +1%
Plugins(fesm2015)[gzip]
router-plugin/fesm2015/ngxs-router-plugin.js
2.89KB (-1.13KB -28.16%) +1%
Plugins(fesm5)[gzip]
router-plugin/fesm5/ngxs-router-plugin.js
3.15KB (-1.16KB -26.87%) +1%
Plugins(umd)[gzip]
router-plugin/bundles/ngxs-router-plugin.umd.
js
6.5KB (-1.21KB -15.71%) +1%
Unchanged files (24)
Status Path Size Limits
Plugins(umd)[gzip]
storage-plugin/bundles/ngxs-storage-plugin.um
d.js
7.24KB +1%
Plugins(umd)[gzip]
hmr-plugin/bundles/ngxs-hmr-plugin.umd.js
6.96KB +1%
Plugins(umd)[gzip]
websocket-plugin/bundles/ngxs-websocket-plugi
n.umd.js
6.87KB +1%
Plugins(umd)[gzip]
form-plugin/bundles/ngxs-form-plugin.umd.js
6.44KB +1%
Plugins(umd)[gzip]
devtools-plugin/bundles/ngxs-devtools-plugin.
umd.js
6.16KB +1%
Plugins(umd)[gzip]
logger-plugin/bundles/ngxs-logger-plugin.umd.
js
5.77KB +1%
Plugins(fesm5)[gzip]
storage-plugin/fesm5/ngxs-storage-plugin.js
3.95KB +1%
Plugins(fesm2015)[gzip]
storage-plugin/fesm2015/ngxs-storage-plugin.j
s
3.64KB +1%
Plugins(fesm5)[gzip]
hmr-plugin/fesm5/ngxs-hmr-plugin.js
3.62KB +1%
Plugins(fesm5)[gzip]
websocket-plugin/fesm5/ngxs-websocket-plugin.
js
3.53KB +1%
Plugins(fesm2015)[gzip]
hmr-plugin/fesm2015/ngxs-hmr-plugin.js
3.25KB +1%
Plugins(fesm2015)[gzip]
websocket-plugin/fesm2015/ngxs-websocket-plug
in.js
3.15KB +1%
Plugins(umd.min)[gzip]
hmr-plugin/bundles/ngxs-hmr-plugin.umd.min.js
3.1KB +1%
Plugins(fesm5)[gzip]
form-plugin/fesm5/ngxs-form-plugin.js
3.07KB +1%
Plugins(fesm5)[gzip]
devtools-plugin/fesm5/ngxs-devtools-plugin.js
2.83KB +1%
Plugins(fesm2015)[gzip]
form-plugin/fesm2015/ngxs-form-plugin.js
2.74KB +1%
Plugins(fesm2015)[gzip]
devtools-plugin/fesm2015/ngxs-devtools-plugin
.js
2.65KB +1%
Plugins(fesm5)[gzip]
logger-plugin/fesm5/ngxs-logger-plugin.js
2.48KB +1%
Plugins(umd.min)[gzip]
form-plugin/bundles/ngxs-form-plugin.umd.min.
js
2.43KB +1%
Plugins(fesm2015)[gzip]
logger-plugin/fesm2015/ngxs-logger-plugin.js
2.37KB +1%
Plugins(umd.min)[gzip]
storage-plugin/bundles/ngxs-storage-plugin.um
d.min.js
2.32KB +1%
Plugins(umd.min)[gzip]
websocket-plugin/bundles/ngxs-websocket-plugi
n.umd.min.js
2.18KB +1%
Plugins(umd.min)[gzip]
logger-plugin/bundles/ngxs-logger-plugin.umd.
min.js
1.95KB +1%
Plugins(umd.min)[gzip]
devtools-plugin/bundles/ngxs-devtools-plugin.
umd.min.js
1.86KB +1%

Total files change -3.74KB -3.42%

Groups updated (6)
Status Path Size Limits
All Plugins(umd.min)[gzip]
./-plugin/bundles/.umd.min.js
16.32KB (-240B -1.42%) +1%
All Plugins(fesm2015)[gzip]
./-plugin/fesm2015/.js
20.69KB (-1.13KB -5.19%) +1%
All Plugins(fesm5)[gzip]
./-plugin/fesm5/.js
22.63KB (-1.16KB -4.87%) +1%
All Plugins(umd)[gzip]
./-plugin/bundles/.umd.js
45.94KB (-1.21KB -2.57%) +1%
All Plugins(esm2015)[gzip]
./-plugin/esm2015/**/.js
112.62KB (-3.41KB -2.94%) +1%
All Plugins(esm5)[gzip]
./-plugin/esm5/**/.js
117.87KB (-3.48KB -2.87%) +1%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@bundlemon
Copy link

bundlemon bot commented Aug 7, 2022

BundleMon (Integration Projects)

Files updated (4)
Status Path Size Limits
Main bundles(Gzip)
hello-world-ng13-ivy/dist-integration/main.(h
ash).js
69.33KB (-114B -0.16%) +1%
Main bundles(Gzip)
hello-world-ng12-ivy/dist-integration/main.(h
ash).js
67.41KB (-117B -0.17%) +1%
Main bundles(Gzip)
hello-world-ng14-ivy/dist-integration/main.(h
ash).js
65KB (-122B -0.18%) +1%
Main bundles(Gzip)
hello-world-ng11-ivy/dist-integration/main.(h
ash).js
70.69KB (-130B -0.18%) +1%

Total files change -483B -0.17%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Copy link
Member

@markwhitfeld markwhitfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! I love the smell of deleted code in the morning!
Bundlemon is your biggest fan.

@markwhitfeld
Copy link
Member

@arturovt Could you update the change log?

@markwhitfeld markwhitfeld changed the title fix(router-plugin): remove initial navigation check fix(router-plugin): rrevent router overriding valid navigation Aug 8, 2022
@markwhitfeld markwhitfeld changed the title fix(router-plugin): rrevent router overriding valid navigation fix(router-plugin): prevent router overriding valid navigation Aug 8, 2022
@markwhitfeld markwhitfeld merged commit 79cbc2a into master Aug 8, 2022
@markwhitfeld markwhitfeld deleted the fix/remove-initial-navigation-check branch August 8, 2022 18:17
@arturovt arturovt added this to the v3.7.5 milestone Aug 8, 2022
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Aug 12, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@ngxs/form-plugin](https://github.com/ngxs/store) | dependencies | patch | [`3.7.4` -> `3.7.5`](https://renovatebot.com/diffs/npm/@ngxs%2fform-plugin/3.7.4/3.7.5) |
| [@ngxs/storage-plugin](https://github.com/ngxs/store) | dependencies | patch | [`3.7.4` -> `3.7.5`](https://renovatebot.com/diffs/npm/@ngxs%2fstorage-plugin/3.7.4/3.7.5) |
| [@ngxs/store](https://github.com/ngxs/store) | dependencies | patch | [`3.7.4` -> `3.7.5`](https://renovatebot.com/diffs/npm/@ngxs%2fstore/3.7.4/3.7.5) |

---

### Release Notes

<details>
<summary>ngxs/store</summary>

### [`v3.7.5`](https://github.com/ngxs/store/blob/HEAD/CHANGELOG.md#&#8203;375-2022-08-08)

[Compare Source](ngxs/store@v3.7.4...v3.7.5)

-   Performance: Tree-shake no type on the action error [#&#8203;1858](ngxs/store#1858)
-   Fix: Give back control to `developmentMode` config property [#&#8203;1878](ngxs/store#1878)
-   Fix: Do not use `refCount()` since it makes selectable stream cold [#&#8203;1883](ngxs/store#1883)
-   Fix: Remove `?` from `ctx` parameter of lifecycle hooks since they are never undefined [#&#8203;1889](ngxs/store#1889)
-   Fix: Avoid incorrectly ordered state observable events [#&#8203;1908](ngxs/store#1908)
-   Fix: Router Plugin - Prevent router overriding valid navigation [#&#8203;1907](ngxs/store#1907)
-   Fix: Storage Plugin - Provide more meaningful error message when the storage quota exceeds [#&#8203;1863](ngxs/store#1863)
-   Fix: Storage Plugin - Ensure the deserialization is not skipped for master key [#&#8203;1887](ngxs/store#1887)
-   Fix: Storage Plugin - Do not re-hydrate the whole state when the feature state is added [#&#8203;1887](ngxs/store#1887)
-   Fix: Devtools Plugin - Enable time-traveling for navigation actions [#&#8203;1868](ngxs/store#1868)
-   Fix: Form Plugin - Prevent actions infinite loop with multiple `ngxsForm` directives [#&#8203;1890](ngxs/store#1890)
-   Fix: Do not check if the state class is injectable within the decorator since the `ɵprov` will not exist in JIT mode [#&#8203;1867](ngxs/store#1867)
-   Revert: revert select decorator changes and add deprecation note [#&#8203;1871](ngxs/store#1871)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

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

♻ **Rebasing**: Whenever PR becomes conflicted, 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, click this checkbox.

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xNTEuMiIsInVwZGF0ZWRJblZlciI6IjMyLjE1Mi4wIn0=-->

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1497
Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants