Skip to content

Conversation

@myabc
Copy link
Contributor

@myabc myabc commented Dec 29, 2025

Ticket

What are you trying to accomplish?

Screenshots

What approach did you choose and why?

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

import { ModalData, OpModalService } from 'core-app/shared/components/modal/modal.service';
import { PortalOutletTarget } from 'core-app/shared/components/modal/portal-outlet-target.enum';
import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin';
import { QupayaOverlayContainer } from './custom-overlay-container';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import QupayaOverlayContainer.

Copilot Autofix

AI 12 days ago

To fix the unused import problem, the import of QupayaOverlayContainer should be removed since the class is not used anywhere in active code. This aligns with the recommendation to remove unused program elements and does not change runtime behavior because the only usage is commented out.

Concretely, in frontend/src/app/shared/components/modal/modal-overlay.component.ts, delete the line import { QupayaOverlayContainer } from './custom-overlay-container'; (line 52). No other code changes, imports, or new definitions are required because nothing in the class currently depends on QupayaOverlayContainer. The commented-out lines that reference it can remain as comments; they do not require the import.

Suggested changeset 1
frontend/src/app/shared/components/modal/modal-overlay.component.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/frontend/src/app/shared/components/modal/modal-overlay.component.ts b/frontend/src/app/shared/components/modal/modal-overlay.component.ts
--- a/frontend/src/app/shared/components/modal/modal-overlay.component.ts
+++ b/frontend/src/app/shared/components/modal/modal-overlay.component.ts
@@ -49,7 +49,6 @@
 import { ModalData, OpModalService } from 'core-app/shared/components/modal/modal.service';
 import { PortalOutletTarget } from 'core-app/shared/components/modal/portal-outlet-target.enum';
 import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin';
-import { QupayaOverlayContainer } from './custom-overlay-container';
 
 
 @Component({
EOF
@@ -49,7 +49,6 @@
import { ModalData, OpModalService } from 'core-app/shared/components/modal/modal.service';
import { PortalOutletTarget } from 'core-app/shared/components/modal/portal-outlet-target.enum';
import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin';
import { QupayaOverlayContainer } from './custom-overlay-container';


@Component({
Copilot is powered by AI and may make mistakes. Always verify output.
@@ -0,0 +1,24 @@
import { ChangeDetectionStrategy, Component, forwardRef, input, signal } from '@angular/core';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import input.

Copilot Autofix

AI 12 days ago

To fix the unused import, remove the input symbol from the Angular core import list in this file. This keeps the existing functionality intact while cleaning up the unused element.

Concretely:

  • In frontend/src/app/shared/components/modals/form-control/check-box.component.ts, edit the import on line 1 to drop input from the destructured import.
  • No other code changes, methods, or new imports are required.
Suggested changeset 1
frontend/src/app/shared/components/modals/form-control/check-box.component.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/frontend/src/app/shared/components/modals/form-control/check-box.component.ts b/frontend/src/app/shared/components/modals/form-control/check-box.component.ts
--- a/frontend/src/app/shared/components/modals/form-control/check-box.component.ts
+++ b/frontend/src/app/shared/components/modals/form-control/check-box.component.ts
@@ -1,4 +1,4 @@
-import { ChangeDetectionStrategy, Component, forwardRef, input, signal } from '@angular/core';
+import { ChangeDetectionStrategy, Component, forwardRef, signal } from '@angular/core';
 import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
 import { PrimerFormControlBaseComponent } from './form-control.component';
 
EOF
@@ -1,4 +1,4 @@
import { ChangeDetectionStrategy, Component, forwardRef, input, signal } from '@angular/core';
import { ChangeDetectionStrategy, Component, forwardRef, signal } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { PrimerFormControlBaseComponent } from './form-control.component';

Copilot is powered by AI and may make mistakes. Always verify output.
@@ -0,0 +1,24 @@
import { ChangeDetectionStrategy, Component, forwardRef, input, signal } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import ControlValueAccessor.

Copilot Autofix

AI 12 days ago

To fix the problem, remove the unused ControlValueAccessor symbol from the import statement so that only the actually used NG_VALUE_ACCESSOR is imported. This preserves existing functionality while eliminating the unused import.

Concretely, in frontend/src/app/shared/components/modals/form-control/check-box.component.ts, adjust the second line to remove ControlValueAccessor from the curly-brace list, leaving only NG_VALUE_ACCESSOR. No additional methods, definitions, or imports are required, since ControlValueAccessor is not referenced anywhere else in the snippet.

Suggested changeset 1
frontend/src/app/shared/components/modals/form-control/check-box.component.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/frontend/src/app/shared/components/modals/form-control/check-box.component.ts b/frontend/src/app/shared/components/modals/form-control/check-box.component.ts
--- a/frontend/src/app/shared/components/modals/form-control/check-box.component.ts
+++ b/frontend/src/app/shared/components/modals/form-control/check-box.component.ts
@@ -1,5 +1,5 @@
 import { ChangeDetectionStrategy, Component, forwardRef, input, signal } from '@angular/core';
-import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
+import { NG_VALUE_ACCESSOR } from '@angular/forms';
 import { PrimerFormControlBaseComponent } from './form-control.component';
 
 
EOF
@@ -1,5 +1,5 @@
import { ChangeDetectionStrategy, Component, forwardRef, input, signal } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
import { PrimerFormControlBaseComponent } from './form-control.component';


Copilot is powered by AI and may make mistakes. Always verify output.
@@ -0,0 +1,31 @@
import { booleanAttribute, ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, forwardRef, input, signal } from '@angular/core';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused imports booleanAttribute, input.

Copilot Autofix

AI 12 days ago

In general, unused imports should be removed from the import list to improve readability and avoid confusion. This also prevents unnecessary symbols from being kept alive by tooling or linters.

The best fix here is to delete booleanAttribute and input from the named imports on line 1 of frontend/src/app/shared/components/modals/form-control/text-field.component.ts, leaving the rest of the imports unchanged. No other code in the file needs to change, and no new imports or functionality are required.

Concretely:

  • In text-field.component.ts, edit the first import statement so that it only imports ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, forwardRef, and signal from @angular/core.
  • Do not add or remove any other imports or modify any other lines.
Suggested changeset 1
frontend/src/app/shared/components/modals/form-control/text-field.component.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/frontend/src/app/shared/components/modals/form-control/text-field.component.ts b/frontend/src/app/shared/components/modals/form-control/text-field.component.ts
--- a/frontend/src/app/shared/components/modals/form-control/text-field.component.ts
+++ b/frontend/src/app/shared/components/modals/form-control/text-field.component.ts
@@ -1,4 +1,4 @@
-import { booleanAttribute, ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, forwardRef, input, signal } from '@angular/core';
+import { ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, forwardRef, signal } from '@angular/core';
 import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
 import { PrimerFormControlBaseComponent } from './form-control.component';
 
EOF
@@ -1,4 +1,4 @@
import { booleanAttribute, ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, forwardRef, input, signal } from '@angular/core';
import { ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, forwardRef, signal } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { PrimerFormControlBaseComponent } from './form-control.component';

Copilot is powered by AI and may make mistakes. Always verify output.
@@ -0,0 +1,31 @@
import { booleanAttribute, ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, forwardRef, input, signal } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import ControlValueAccessor.

Copilot Autofix

AI 12 days ago

To fix the problem, remove the unused ControlValueAccessor import while leaving NG_VALUE_ACCESSOR intact. This eliminates the unused symbol without changing the component’s functionality.

Concretely, in frontend/src/app/shared/components/modals/form-control/text-field.component.ts, update the second import line so that it only imports NG_VALUE_ACCESSOR from @angular/forms. No other code changes, methods, or additional imports are required.

Suggested changeset 1
frontend/src/app/shared/components/modals/form-control/text-field.component.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/frontend/src/app/shared/components/modals/form-control/text-field.component.ts b/frontend/src/app/shared/components/modals/form-control/text-field.component.ts
--- a/frontend/src/app/shared/components/modals/form-control/text-field.component.ts
+++ b/frontend/src/app/shared/components/modals/form-control/text-field.component.ts
@@ -1,5 +1,5 @@
 import { booleanAttribute, ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, forwardRef, input, signal } from '@angular/core';
-import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
+import { NG_VALUE_ACCESSOR } from '@angular/forms';
 import { PrimerFormControlBaseComponent } from './form-control.component';
 
 
EOF
@@ -1,5 +1,5 @@
import { booleanAttribute, ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, forwardRef, input, signal } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
import { PrimerFormControlBaseComponent } from './form-control.component';


Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants