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): properly handle false in conditional router hooks #1900

Merged
merged 12 commits into from
Feb 27, 2024

Conversation

jwx
Copy link
Member

@jwx jwx commented Feb 5, 2024

Pull Request

📖 Description

This PR fixes issues that could occur when several denying async router hooks were applied to the same component.

📑 Test Plan

  • Make sure existing tests pass
  • Add tests for denying async router hooks

@jwx jwx requested a review from bigopon February 5, 2024 02:38
Copy link

codecov bot commented Feb 5, 2024

Codecov Report

Attention: Patch coverage is 87.27273% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 88.47%. Comparing base (06aa113) to head (a39523c).

Files Patch % Lines
packages/router/src/endpoints/viewport-content.ts 86.66% 6 Missing ⚠️
packages/router/src/navigation-coordinator.ts 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1900      +/-   ##
==========================================
+ Coverage   88.37%   88.47%   +0.10%     
==========================================
  Files         260      260              
  Lines       22847    22842       -5     
  Branches     5300     5296       -4     
==========================================
+ Hits        20190    20209      +19     
+ Misses       2657     2633      -24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@bigopon bigopon left a comment

Choose a reason for hiding this comment

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

Looking good @jwx I have a few small comments for now.

packages/router/src/endpoints/viewport-content.ts Outdated Show resolved Hide resolved
@bigopon bigopon merged commit a671463 into master Feb 27, 2024
25 of 26 checks passed
@bigopon bigopon deleted the jwx-router-hooks-issue branch February 27, 2024 22:23
AureliaEffect pushed a commit that referenced this pull request Mar 2, 2024
2.0.0-beta.12 (2024-03-02)

**BREAKING CHANGE:**

* **enhance:** call app tasks with `.enhance` API, return app root instead of controller (#1916) ([4d522b2](4d522b2))
* **au-compose:** always create host for non custom element composition (#1906) ([8a28e0a](8a28e0a))

**Features:**

* **au-compose:** ability to compose string as element name (#1913) ([06aa113](06aa113))

**Bug Fixes:**

* **router:** prevent multiple navigation at the same time (#1895) ([deed11e](deed11e))
* **router:** properly handle false in conditional router hooks (#1900) ([a671463](a671463))
* **di:** dont jit register resources ([8ffde34](8ffde34))
* **di:** new instance resolver (#1909) ([efe208c](efe208c))
* **runtime:** tweak typings of injectable token ([89f76eb](89f76eb))

**Refactorings:**

* **runtime:** delay overriding array prototypes (#1914) ([d8be144](d8be144))
* **router:** use resolve ([89f76eb](89f76eb))
* **runtime:** better type inferrence for injectable token ([89f76eb](89f76eb))
* **di:** simplify container has, cleanup router ([89f76eb](89f76eb))

**Docs:**

* **docs:** add JS examples using resolve for IHttpClient (#1907) ([d57c1f1](d57c1f1))
* **doc:** remove define hook from documentation (#1903) ([f684141](f684141))
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.

None yet

2 participants