chore: remove standalone: true property across all components, dire…#667
chore: remove standalone: true property across all components, dire…#667
standalone: true property across all components, dire…#667Conversation
…ctives, and pipes for consistency and cleanup
|
View your CI Pipeline Execution ↗ for commit fe030bd
☁️ Nx Cloud last updated this comment at |
Summary of ChangesHello @eneajaho, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on a significant refactoring effort to remove the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request removes standalone: true from components, directives, and pipes across the project. While this is a significant architectural change, the current implementation is incomplete and introduces several critical issues. Many components, particularly in tests and documentation, are now non-standalone but still use the imports metadata property, which is invalid. Additionally, test components are no longer declared in any NgModule, which will cause tests to fail. Making library components non-standalone is a breaking change, and this should be accompanied by NgModules that export them for consumers. These issues need to be addressed to ensure the project builds and tests pass.
| @Component({ | ||
| standalone: true, | ||
| template: '', | ||
| }) |
There was a problem hiding this comment.
By removing standalone: true, the Test component becomes non-standalone. However, it is used with TestBed.createComponent(Test) in the setup function without being declared in any NgModule. This will cause the test to fail. You need to configure TestBed to declare this component. For example:
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [Test]
});
});| @Pipe({ | ||
| name: 'call', | ||
| pure: true, | ||
| standalone: true, | ||
| }) |
There was a problem hiding this comment.
Removing standalone: true from CallPipe (and ApplyPipe below) is a breaking change for consumers of this library. Users who were importing these pipes directly into their standalone components will now have to declare them in an NgModule. It would be good practice to provide an NgModule within the library that declares and exports these pipes to make migration easier for users. Since this is a breaking change, it should probably not be labeled as a chore.
| @@ -20,7 +20,6 @@ Add `clickOutside` directive directly to the Angular element. | |||
|
|
|||
| ```ts | |||
| @Component({ | |||
There was a problem hiding this comment.
Removing standalone: true from this documentation example makes the component non-standalone. However, the example still uses the imports property (on line 26), which is only valid for standalone components. This makes the code example incorrect and misleading for users. The example should be updated to show how to use this directive with a non-standalone component, likely by declaring it in an NgModule.
…ctives, and pipes for consistency and cleanup