Skip to content

2/2 chore(starter): Delete old filters component (#192)#776

Merged
ivilarop merged 10 commits intodevelopfrom
chore/176-delete-old-filters-component
Mar 5, 2026
Merged

2/2 chore(starter): Delete old filters component (#192)#776
ivilarop merged 10 commits intodevelopfrom
chore/176-delete-old-filters-component

Conversation

@JungleGiu
Copy link
Collaborator

@JungleGiu JungleGiu commented Feb 24, 2026

📍 Context

(IT-Academy-BCN/ita-challenges#192)
As part of the ongoing migration to the new filtering system, the start-filters.component has been rendered obsolete. All its functionality has already been replaced by the new implementation in a prior PR.

This PR is the final cleanup step: removing every remaining trace of the old component to prevent confusion, reduce bundle size, and keep the codebase maintainable.


✅ What Was Done

  • Removed component files — Deleted start-filters.component.ts, start-filters.component.html, start-filters.component.scss and start-filters.component.spec.ts
  • Removed all component references — Cleaned up every import, declaration, and usage across the project
  • Removed related SCSS rules — Deleted all stylesheet rules that were scoped to or dependent on start-filters.component
  • Module cleanup — Removed the component from any NgModule declarations/exports where it was registered
  • Removed a useless function from starter.component.ts

🔍 Why This Matters

Leaving deprecated components in a codebase introduces several risks:

  • Dead code increases cognitive load for developers navigating the project
  • Orphaned SCSS rules can cause unintended style conflicts
  • Undeclared dependencies may produce build warnings or silent failures
  • It signals incomplete migrations, making future refactors harder to scope

🧪 Testing

  • Application builds without errors or warnings related to the removed component
  • No visual regressions in areas previously affected by start-filters.component
  • New filtering system continues to work as expected
  • No orphaned SCSS rules causing unintended style side effects
Screenshot 2026-02-24 alle 12 52 17 -----

🔗 Related

  • PR #[previous-pr] — 1/2
  • Issue #[issue-number] — issue

📌 Notes

No functional changes are introduced in this PR. This is a pure cleanup — the new filtering system was already validated and merged previously.

Copy link
Collaborator

@Carlos-Martorell Carlos-Martorell left a comment

Choose a reason for hiding this comment

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

Verified locally — old component successfully removed!

Checked:

  • ✅ Build passes with no errors
  • ✅ Old filters no longer render (confirmed in DevTools)
  • ✅ No broken references

Clean deletion. Codebase is leaner now.

Approved! ✅

Image

Copy link
Collaborator

@otrocadev otrocadev left a comment

Choose a reason for hiding this comment

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

Hello @JungleGiu, the files of the component 'starter-filters are still there'. Are we keeping it for something?

</div>
</fieldset>
</header>
</header> -->
Copy link
Collaborator

Choose a reason for hiding this comment

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

All this comented code should be deleted once the component is not there anymore

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sorry had a problem with a duplicated git branch and I had to rebase and push the branch again, the component is now definitely deleted

Copy link
Collaborator

@Arnau-66 Arnau-66 left a comment

Choose a reason for hiding this comment

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

Old filters component removal

The old filters component has been properly removed from the layout and only the new filtering component is rendered.

Commented legacy code

I noticed the previous implementation remains commented in the HTML.
Just to confirm — was this kept intentionally for traceability, or could it be safely removed to avoid leaving commented legacy code?

Tests status

All tests are passing successfully ✅

Image

Functional validation

The new filtering component works as expected and there are no conflicts resulting from the removal of the old component.
Filtering behavior remains stable and consistent.

Image

Overall, everything looks correct from my side 👍

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 5, 2026

@ivilarop ivilarop merged commit 6709a76 into develop Mar 5, 2026
3 checks passed
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.

[FE] Delete the old filters element and logic once the new element is fully working

5 participants