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(au-slot): properly handle nested projection registration #1881

Merged
merged 9 commits into from
Jan 26, 2024

Conversation

bigopon
Copy link
Member

@bigopon bigopon commented Jan 24, 2024

📖 Description

Currently in nested projection, the container hierarchy does not have all information related to projector and projection context making it unable to resolve the right instances of projectors. This PR fix this.

📑 Test Plan

Added a test based on reported case from related PR with slightly more complicated usage.

@bigopon
Copy link
Member Author

bigopon commented Jan 24, 2024

@Sayan751 thanks for the issues, it's an nice find. Please help review the PR, if you have any use case needed to be covered, pls feel free to add them to the tests.

Copy link
Contributor

@Sayan751 Sayan751 left a comment

Choose a reason for hiding this comment

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

Thanks @bigopon for taking care of it! I have added some suggestions for the tests. Let me know if you want me to add those.

Copy link

codecov bot commented Jan 26, 2024

Codecov Report

Attention: 46 lines in your changes are missing coverage. Please review.

Comparison is base (010a4ad) 88.55% compared to head (964255e) 88.79%.
Report is 78 commits behind head on master.

Files Patch % Lines
packages/runtime-html/src/templating/controller.ts 76.71% 17 Missing ⚠️
packages/runtime/src/binding/ast.visitor.ts 78.12% 7 Missing ⚠️
packages/router-lite/src/route-expression.ts 33.33% 6 Missing ⚠️
packages/runtime/src/binding/ast.eval.ts 90.00% 5 Missing ⚠️
packages/platform/src/index.ts 81.81% 4 Missing ⚠️
.../router/src/instructions/instruction-parameters.ts 81.81% 2 Missing ⚠️
packages/compat-v1/src/compat-delegate.ts 50.00% 1 Missing ⚠️
packages/i18n/src/t/translation-binding.ts 88.88% 1 Missing ⚠️
packages/route-recognizer/src/index.ts 98.07% 1 Missing ⚠️
...ges/runtime-html/src/compiler/template-compiler.ts 95.65% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1881      +/-   ##
==========================================
+ Coverage   88.55%   88.79%   +0.24%     
==========================================
  Files         248      247       -1     
  Lines       22290    22323      +33     
  Branches     5180     5186       +6     
==========================================
+ Hits        19739    19822      +83     
+ Misses       2551     2501      -50     

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

@bigopon bigopon merged commit 00e8dee into master Jan 26, 2024
26 checks passed
@bigopon bigopon deleted the fix/au-slot-injection branch January 26, 2024 03:50
@@ -426,6 +426,13 @@ export class Container implements IContainer {
disposableResolvers.clear();
}

public useResources(container: Container): void {
Copy link
Contributor

Choose a reason for hiding this comment

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

@bigopon Can we mark this as internal? And naturally also in the interface.

Copy link
Member Author

Choose a reason for hiding this comment

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

We cannot mark this as internal, as it'll still need to be public from kernel to be used in other packages. I've marked it as semi private though. Normally apps won't even need to reach to this API.

AureliaEffect pushed a commit that referenced this pull request Jan 26, 2024
2.0.0-beta.10 (2024-01-26)

**BREAKING CHANGE:**

* **enums:** string literal types replace const enums (#1870) ([e21e0c9](e21e0c9))

**Features:**

* **route-recognizer:** support for route parameter constraints (#1862) ([8f29cfd](8f29cfd))

**Bug Fixes:**

* **docs:** various doc fix
* **au-slot:** properly handle nested projection registration (#1881) ([00e8dee](00e8dee))
* **kernel:** stack preserving error logging for console (#1884) ([030bfa1](030bfa1))
* **portal:** remove target marker when deactivated (#1883) ([3db4c17](3db4c17))
* **validation:** evaluation of tagged rules from bindings (#1878) ([43d12f6](43d12f6))
* **validation:** property parsing with lambda and istanbul (#1877) ([71f82cf](71f82cf))
* **router:** store root/default page instruction correctly (#1869) ([84e6380](84e6380))
* **runtime-html:** template wrapping  (#1875) ([bfdaa3b](bfdaa3b))
* **i18n:** handle change of key in t.bind (#1868) ([c185764](c185764))
* **router-lite:** Router injection and ignoring null/undefined values for query parameters (#1859) ([6a79bc9](6a79bc9))
* **router-lite:** injection of Router alias ([6a79bc9](6a79bc9))
* **runtime-html:** fix broken tests ([bfdaa3b](bfdaa3b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants