Skip to content

refactor: delete orphan files, remove fortawesome, remove cdk dependencies - #954

Merged
DerekRoberts merged 3 commits into
mainfrom
feat/fom-code-simplifications
Jun 3, 2026
Merged

refactor: delete orphan files, remove fortawesome, remove cdk dependencies#954
DerekRoberts merged 3 commits into
mainfrom
feat/fom-code-simplifications

Conversation

@DerekRoberts

@DerekRoberts DerekRoberts commented Jun 3, 2026

Copy link
Copy Markdown
Member

Delete Orphan Files and Refactor Core Components

This PR deletes unused/orphan components, pipes, and helper models from the admin and public apps, removing their unused dependencies. It also refactors modal usage in public to eliminate the direct package dependency on @angular/cdk/portal, and deletes the stale demo.yml workflow.

Deleted Files

admin component:

  • admin/src/core/components/file-row/ (contains file-row.component.ts, file-row.component.scss - used @fortawesome)
  • admin/src/core/components/form-group/ (contains form-group.component.ts)
  • admin/src/core/models/file-types.ts
  • admin/src/core/models/enum.ts
  • admin/src/core/pipes/order-by.pipe.ts

public component:

  • public/src/core/components/file-row/ (contains file-row.component.ts, file-row.component.scss)
  • public/src/core/components/button/ (contains button.component.ts, button.component.scss)
  • public/src/core/components/form-group/ (contains form-group.component.ts)
  • public/src/core/pipes/newlines.pipe.ts
  • public/src/core/pipes/object-filter.pipe.ts
  • public/src/core/pipes/order-by.pipe.ts

Workflows:

  • .github/workflows/demo.yml (long stale workflow)

Removed Dependencies

  • admin/package.json: Removed @fortawesome/angular-fontawesome, @fortawesome/fontawesome-svg-core, and @fortawesome/free-solid-svg-icons packages (since the orphaned FileRowComponent was the only user of these libraries). Updated the lockfile.

CDK Portal Refactoring in Public

  • public/src/core/services/modal.service.ts & public/src/core/interceptors/http-error.interceptor.ts: Refactored to eliminate dependency on @angular/cdk/portal (ComponentType). The HTTP error interceptor now uses the cleaner, standard openDialog method instead of calling openCustomDialog with direct CDK components.
  • public/src/core/components/dialog/dialog.component.ts: Updated the standalone template to use a standard HTML <button> rather than the undeclared <app-button>.

Closes #176


Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are deployed in:

@DerekRoberts DerekRoberts self-assigned this Jun 3, 2026
@DerekRoberts DerekRoberts moved this from New to Waiting in DevOps (NR) Jun 3, 2026
@DerekRoberts
DerekRoberts force-pushed the feat/fom-code-simplifications branch from 3d5d82f to d6b45be Compare June 3, 2026 17:38
@DerekRoberts
DerekRoberts marked this pull request as ready for review June 3, 2026 17:50
Copilot AI review requested due to automatic review settings June 3, 2026 17:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR removes unused/orphan UI components, pipes, and helper models from the admin and public Angular apps, and simplifies the public modal/error-dialog flow to avoid the direct @angular/cdk/portal ComponentType dependency. It also cleans up admin’s dependency tree by removing now-unused Font Awesome packages.

Changes:

  • Deleted unused/orphan components/pipes/models from admin/src/core and public/src/core.
  • Refactored public HTTP error handling to use ModalService.openDialog rather than a CDK-based “custom dialog” entrypoint.
  • Removed @fortawesome/* dependencies from admin (and updated the lockfile) after deleting the only consumer.

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
public/src/core/services/modal.service.ts Removes openCustomDialog and relies on a single openDialog path.
public/src/core/interceptors/http-error.interceptor.ts Switches error UI from custom CDK component opening to ModalService.openDialog.
public/src/core/components/dialog/dialog.component.ts Replaces <app-button> usage with a plain <button> in the dialog actions.
public/src/core/pipes/order-by.pipe.ts Deletes unused pipe.
public/src/core/pipes/object-filter.pipe.ts Deletes unused pipe.
public/src/core/pipes/newlines.pipe.ts Deletes unused pipe.
public/src/core/components/form-group/form-group.component.ts Deletes unused component.
public/src/core/components/file-row/file-row.component.ts Deletes unused component (and embedded Font Awesome usage).
public/src/core/components/file-row/file-row.component.scss Deletes unused styles.
public/src/core/components/button/button.component.ts Deletes unused component.
public/src/core/components/button/button.component.scss Deletes unused styles.
admin/src/core/pipes/order-by.pipe.ts Deletes unused pipe.
admin/src/core/models/file-types.ts Deletes unused model/helpers tied to Font Awesome icons.
admin/src/core/models/enum.ts Deletes unused generic type helpers.
admin/src/core/components/form-group/form-group.component.ts Deletes unused component.
admin/src/core/components/file-row/file-row.component.ts Deletes unused component (Font Awesome consumer).
admin/src/core/components/file-row/file-row.component.scss Deletes unused styles.
admin/package.json Removes unused @fortawesome/* dependencies.
admin/package-lock.json Removes @fortawesome/* packages from lockfile to match dependency removal.
Files not reviewed (1)
  • admin/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

public/src/core/services/modal.service.ts:18

  • openDialog currently cannot pass through common MatDialog options like disableClose/autoFocus. This is a behavior regression vs the removed openCustomDialog usage in the HTTP error interceptor (previously disableClose: true, autoFocus: true). Consider supporting these options on openDialog so call sites can preserve prior behavior when needed.
  openDialog(config: { data: DialogData }): MatDialogRef<any> {
    const { data } = config;
    const { width = null } = data;
    return this.dialog.open(DialogComponent, {
      data,

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread public/src/core/services/modal.service.ts Outdated
Comment thread public/src/core/interceptors/http-error.interceptor.ts
Comment thread public/src/core/interceptors/http-error.interceptor.ts Outdated
@DerekRoberts
DerekRoberts force-pushed the feat/fom-code-simplifications branch from 040120a to d955a28 Compare June 3, 2026 18:12
@DerekRoberts DerekRoberts changed the title refactor(core): delete orphan files, remove @fortawesome and cdk dependencies refactor: delete orphan files, remove fortawesome, remove cdk dependencies Jun 3, 2026
@DerekRoberts
DerekRoberts merged commit 7ee1bfe into main Jun 3, 2026
28 checks passed
@DerekRoberts
DerekRoberts deleted the feat/fom-code-simplifications branch June 3, 2026 22:00
@github-project-automation github-project-automation Bot moved this from Waiting to Done in DevOps (NR) Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Refactor to simplify codebase and reduce dependencies

3 participants