Skip to content

refactor(rating): Improved code quality and architecture#2171

Merged
rkaraivanov merged 3 commits intomasterfrom
rkaraivanov/rating-improvements
Apr 1, 2026
Merged

refactor(rating): Improved code quality and architecture#2171
rkaraivanov merged 3 commits intomasterfrom
rkaraivanov/rating-improvements

Conversation

@rkaraivanov
Copy link
Copy Markdown
Member

Description

  • Replaced guard directive with propery updated lifecycle method to handle the projected symbols update.
  • Use the internal slot controller for managing the projected symbols.
  • Replaced the generator-based rendering with a more efficient repeat + range DOM diffing when max changes.
  • The component now follows the project code style and architecture guidelines.
  • Improved JSDoc description, added slot entries and annotated example usage.

Type of Change

  • Refactoring (code improvements without functional changes)

Checklist

  • My code follows the project's coding standards
  • I have tested my changes locally

- Replaced `guard` directive with propery `updated`
lifecycle method to handle the projected symbols update.
- Use the internal slot controller for managing the projected symbols.
- Replaced the generator-based rendering with a more efficient
`repeat` + `range` DOM diffing when `max` changes.
- The component now follows the project code style and architecture guidelines.
- Improved JSDoc description, added slot entries and annotated
example usage.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors the igc-rating web component to better align with the project’s Lit component architecture (slot controller usage, lifecycle handling) while improving rendering efficiency and documentation.

Changes:

  • Replaced directive-based projected symbol handling with a slot controller + updated() lifecycle hook.
  • Switched default symbol rendering from a generator approach to repeat(range(...)) for better DOM diffing on max changes.
  • Expanded/clarified JSDoc, including slot documentation and examples.

@rkaraivanov rkaraivanov merged commit 8c5e453 into master Apr 1, 2026
7 checks passed
@rkaraivanov rkaraivanov deleted the rkaraivanov/rating-improvements branch April 1, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants