Skip to content

chore: remove standalone: true property across all components, dire…#667

Open
eneajaho wants to merge 1 commit intomainfrom
chore/clean-standalone-flag
Open

chore: remove standalone: true property across all components, dire…#667
eneajaho wants to merge 1 commit intomainfrom
chore/clean-standalone-flag

Conversation

@eneajaho
Copy link
Collaborator

…ctives, and pipes for consistency and cleanup

…ctives, and pipes for consistency and cleanup
@nx-cloud
Copy link

nx-cloud bot commented Feb 26, 2026

View your CI Pipeline Execution ↗ for commit fe030bd

Command Status Duration Result
nx affected --target=build --parallel=3 --exclu... ✅ Succeeded 13s View ↗
nx affected --target=test --parallel=3 --exclud... ✅ Succeeded 23s View ↗
nx affected --target=lint --parallel=3 ✅ Succeeded 38s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 4s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-26 10:24:23 UTC

@gemini-code-assist
Copy link

Summary of Changes

Hello @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 standalone: true property from a wide array of Angular components, directives, and pipes. This change standardizes their declaration, likely preparing for a different module organization or ensuring they are consumed as part of a larger NgModule, thereby improving consistency and simplifying future maintenance.

Highlights

  • Code Cleanup and Consistency: The standalone: true property has been systematically removed from numerous Angular components, directives, and pipes across the codebase.
  • Documentation Updates: Corresponding documentation files in both English and Spanish have been updated to reflect the removal of the standalone: true property from code examples.
  • Test File Refactoring: Test files for various utilities (e.g., injectAutoEffect, call-apply, connect, gestures, inject-lazy, inject-leaf-activated-route, inject-query-params, inject-route-data, intl pipes, repeat-pipe, repeat, rx-effect) have been updated by removing the standalone: true property from their test components and directives.
Changelog
  • apps/test-app/src/app/control-value-accessor/control-value-accessor.ts
    • Removed standalone: true from CustomInput and UserSelect component definitions.
  • apps/test-app/src/app/document-visibility-state/document-visibility-state.component.ts
    • Removed standalone: true from DocumentVisibilityStateComponent definition.
  • apps/test-app/src/app/drag/drag.component.ts
    • Removed standalone: true from BoxWithHost and Box component definitions.
  • apps/test-app/src/app/svg-sprite/svg-sprite.component.ts
    • Removed standalone: true from FaRegularDirective, FaSolidDirective, and FaBrandDirective definitions.
  • apps/test-app/src/app/text-selection/text-selection.component.ts
    • Removed standalone: true from TextSelectionComponent definition.
  • docs/src/content/docs/es/utilities/Assets/svg-sprites.md
    • Removed standalone: true from code example for faBrand directive.
  • docs/src/content/docs/es/utilities/Directives/click-outside.md
    • Removed standalone: true from code example for a component using clickOutside.
  • docs/src/content/docs/es/utilities/Forms/control-value-accessor.md
    • Removed standalone: true from code examples for CustomInput and selector-usuario components.
  • docs/src/content/docs/es/utilities/Gesture/gesture.mdx
    • Removed standalone: true from code examples for app-draggable-box components.
  • docs/src/content/docs/es/utilities/Injectors/active-element.md
    • Removed standalone: true from code example for app-example component.
  • docs/src/content/docs/es/utilities/Injectors/inject-lazy.md
    • Removed standalone: true from code examples for components using injectLazy.
  • docs/src/content/docs/es/utilities/Injectors/inject-params.md
    • Removed standalone: true from code example for TestComponent.
  • docs/src/content/docs/es/utilities/Injectors/inject-query-params.md
    • Removed standalone: true from code example for TestComponent.
  • docs/src/content/docs/es/utilities/Injectors/inject-route-data.md
    • Removed standalone: true from code example for TestComponent.
  • docs/src/content/docs/es/utilities/Injectors/navigation-end.md
    • Removed standalone: true from code example for app-example component.
  • docs/src/content/docs/es/utilities/Operators/rx-effect.md
    • Removed standalone: true from code examples for app-root components.
  • docs/src/content/docs/utilities/Assets/svg-sprites.md
    • Removed standalone: true from code example for faBrand directive.
  • docs/src/content/docs/utilities/Components/host-binding.md
    • Removed standalone: true from code examples for my-component.
  • docs/src/content/docs/utilities/Directives/click-outside.md
    • Removed standalone: true from code example for a component using clickOutside.
  • docs/src/content/docs/utilities/Forms/control-value-accessor.md
    • Removed standalone: true from code examples for CustomInput and user-select components.
  • docs/src/content/docs/utilities/Forms/form-events.md
    • Removed standalone: true from code examples for my-app components.
  • docs/src/content/docs/utilities/Gesture/gesture.mdx
    • Removed standalone: true from code examples for app-draggable-box components.
  • docs/src/content/docs/utilities/Injectors/active-element.md
    • Removed standalone: true from code example for app-example component.
  • docs/src/content/docs/utilities/Injectors/inject-attribute.md
    • Removed standalone: true from code examples for app-divider, app-card, and app-paginator components.
  • docs/src/content/docs/utilities/Injectors/inject-lazy.md
    • Removed standalone: true from code examples for components using injectLazy.
  • docs/src/content/docs/utilities/Injectors/inject-leaf-activated-route.md
    • Removed standalone: true from code example for a component using injectLeafActivatedRoute.
  • docs/src/content/docs/utilities/Injectors/inject-params.md
    • Removed standalone: true from code example for TestComponent.
  • docs/src/content/docs/utilities/Injectors/inject-route-data.md
    • Removed standalone: true from code examples for TestComponent and a layout component.
  • docs/src/content/docs/utilities/Injectors/navigation-end.md
    • Removed standalone: true from code example for app-example component.
  • docs/src/content/docs/utilities/Operators/rx-effect.md
    • Removed standalone: true from code examples for app-root components.
  • docs/src/content/docs/utilities/Signals/to-observable-signal.md
    • Removed standalone: true from code example for my-app component.
  • libs/ngxtension/auto-effect/src/auto-effect.spec.ts
    • Removed standalone: true from Test component definition in tests.
  • libs/ngxtension/call-apply/src/call-apply.spec.ts
    • Removed standalone: true from test component definitions for CallPipe and ApplyPipe.
  • libs/ngxtension/call-apply/src/call-apply.ts
    • Removed standalone: true from CallPipe and ApplyPipe definitions.
  • libs/ngxtension/connect/src/connect.spec.ts
    • Removed standalone: true from TestComponent definition in tests.
  • libs/ngxtension/gestures/src/drag.ts
    • Removed standalone: true from NgxDrag directive definition.
  • libs/ngxtension/gestures/src/hover.ts
    • Removed standalone: true from NgxHover directive definition.
  • libs/ngxtension/gestures/src/move.ts
    • Removed standalone: true from NgxMove directive definition.
  • libs/ngxtension/gestures/src/pinch.ts
    • Removed standalone: true from NgxPinch directive definition.
  • libs/ngxtension/gestures/src/scroll.ts
    • Removed standalone: true from NgxScroll directive definition.
  • libs/ngxtension/gestures/src/wheel.ts
    • Removed standalone: true from NgxWheel directive definition.
  • libs/ngxtension/inject-lazy/src/inject-lazy.spec.ts
    • Removed standalone: true from test component definitions for injectLazy.
  • libs/ngxtension/inject-leaf-activated-route/src/inject-leaf-activated-route.spec.ts
    • Removed standalone: true from numerous test component definitions.
  • libs/ngxtension/inject-query-params/src/inject-query-params.spec.ts
    • Removed standalone: true from SearchComponent definition in tests.
  • libs/ngxtension/inject-route-data/src/inject-route-data.spec.ts
    • Removed standalone: true from numerous test component definitions.
  • libs/ngxtension/intl/src/display-names.pipe.ts
    • Removed standalone: true from DisplayNamesPipe definition.
  • libs/ngxtension/intl/src/display-names.spec.ts
    • Removed standalone: true from test component definitions for DisplayNamesPipe.
  • libs/ngxtension/intl/src/list-format.pipe.ts
    • Removed standalone: true from ListFormatPipe definition.
  • libs/ngxtension/intl/src/list-format.spec.ts
    • Removed standalone: true from test component definitions for ListFormatPipe.
  • libs/ngxtension/intl/src/plural-rules.pipe.ts
    • Removed standalone: true from PluralRulesPipe definition.
  • libs/ngxtension/intl/src/plural-rules.spec.ts
    • Removed standalone: true from test component definitions for PluralRulesPipe.
  • libs/ngxtension/intl/src/relative-time-format.pipe.ts
    • Removed standalone: true from RelativeTimeFormatPipe definition.
  • libs/ngxtension/intl/src/relative-time-format.spec.ts
    • Removed standalone: true from test component definitions for RelativeTimeFormatPipe.
  • libs/ngxtension/intl/src/supportedValuesOf.pipe.ts
    • Removed standalone: true from SupportedValuesOf pipe definition.
  • libs/ngxtension/intl/src/supportedValuesOf.spec.ts
    • Removed standalone: true from test component definition for SupportedValuesOf.
  • libs/ngxtension/repeat-pipe/src/repeat-pipe.ts
    • Removed standalone: true from RepeatPipe definition.
  • libs/ngxtension/repeat/src/repeat.spec.ts
    • Removed standalone: true from Repeat component definition in tests.
  • libs/ngxtension/repeat/src/repeat.ts
    • Removed standalone: true from Repeat directive definition.
  • libs/ngxtension/rx-effect/src/rx-effect.spec.ts
    • Removed standalone: true from test component definitions for rxEffect.
Activity
  • The pull request was created by eneajaho to remove standalone: true properties for consistency and cleanup.
  • No human review comments or additional activities have been recorded on this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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.

Comment on lines 6 to 8
@Component({
standalone: true,
template: '',
})

Choose a reason for hiding this comment

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

critical

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]
  });
});

Comment on lines 21 to 24
@Pipe({
name: 'call',
pure: true,
standalone: true,
})

Choose a reason for hiding this comment

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

high

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({

Choose a reason for hiding this comment

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

medium

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.

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.

1 participant