-
Notifications
You must be signed in to change notification settings - Fork 3k
Feature/69641 turbo custom dialogs #21527
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
base: dev
Are you sure you want to change the base?
Conversation
Use Angular `ConfirmDialogService` for the time-being.
| 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
Show autofix suggestion
Hide autofix suggestion
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.
| @@ -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({ |
| @@ -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
Show autofix suggestion
Hide autofix suggestion
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 dropinputfrom the destructured import. - No other code changes, methods, or new imports are required.
-
Copy modified line R1
| @@ -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'; | ||
|
|
| @@ -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
Show autofix suggestion
Hide autofix suggestion
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.
-
Copy modified line R2
| @@ -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'; | ||
|
|
||
|
|
| @@ -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
Show autofix suggestion
Hide autofix suggestion
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 importsChangeDetectionStrategy,Component,CUSTOM_ELEMENTS_SCHEMA,forwardRef, andsignalfrom@angular/core. - Do not add or remove any other imports or modify any other lines.
-
Copy modified line R1
| @@ -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'; | ||
|
|
| @@ -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
Show autofix suggestion
Hide autofix suggestion
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.
-
Copy modified line R2
| @@ -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'; | ||
|
|
||
|
|
Ticket
What are you trying to accomplish?
Screenshots
What approach did you choose and why?
Merge checklist