vanilla-framework icon indicating copy to clipboard operation
vanilla-framework copied to clipboard

chore(Tiered List): Refactor tiered list macro to extract duplicated code blocks

Open Nayab-Gauhar opened this issue 2 months ago • 1 comments

Extract duplicated code blocks into private helper macros to improve maintainability.

Created two private helper macros:

  • _vf_tiered_list_item_separator(): Renders the HR separator between list items
  • _vf_tiered_list_item(): Renders list item content with parameterized column classes

This eliminates code duplication while maintaining the exact same functionality.

Fixes #5530

Done

  • Extracted HR separator block into _vf_tiered_list_item_separator() macro
  • Extracted list item content block into _vf_tiered_list_item() macro with parameterized column classes
  • Replaced duplicated code blocks with macro calls
  • Verified that functionality remains unchanged

QA

  • The changes are purely structural/refactoring - no visual or functional changes
  • All existing tiered list examples should continue to work exactly as before
  • The macro API remains unchanged

Check if PR is ready for release

  • [ ] PR should have one of the following labels: Maintenance 🔨 (suggested for this refactoring)
  • [ ] Vanilla version in package.json should be updated (this is a maintenance/refactoring change, so a bugfix release x.x.X would be appropriate)
  • [ ] No changes to component class names or macro APIs, so no updates needed to what's new page

Nayab-Gauhar avatar Oct 31 '25 13:10 Nayab-Gauhar

Nayab-Gauhar is not a collaborator of the repo

webteam-app avatar Oct 31 '25 13:10 webteam-app