Northeastern-Electric-Racing / Northeastern-Electric-Racing/Argos

Replace @HostListener with host object in component decorators

Open
#559 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

angular-client straightforward
Dominant language
TypeScript
Stars
5
Forks
1
Avg merge
4d 22h
Merged PRs (30d)
26

Description

Description

Several components use @HostListener('window:resize') instead of the host property in the component decorator. Affected: BmsDebugPage, BmsAtAGlance, BmsSegmentView, CellView, AppNavBar.

Acceptance Criteria
  • All @HostListener usages replaced with host property in component decorator
  • All @HostBinding usages replaced with host property bindings
  • Build and lint pass
Proposed Solution

Replace @HostListener('window:resize', ['$event']) with host: { '(window:resize)': 'onResize($event)' } in each component's decorator. Remove the @HostListener import where no longer needed.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the BmsDebugPage, BmsAtAGlance, BmsSegmentView, CellView, and AppNavBar components and inspect their decorators and host-related imports. Replace the listed HostListener and HostBinding usages with decorator host property bindings, then run the project build and lint commands. Done means all affected usages are converted and both checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.