Skip to content

refactor: migrate WIDENAMES to wideLabel capability - #8010

Open
severe77 wants to merge 3 commits into
sugarlabs:masterfrom
severe77:refactor/widenames-widelabel
Open

refactor: migrate WIDENAMES to wideLabel capability#8010
severe77 wants to merge 3 commits into
sugarlabs:masterfrom
severe77:refactor/widenames-widelabel

Conversation

@severe77

@severe77 severe77 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Description

This PR replaces the remaining hardcoded WIDENAMES block classification with the existing capability-based approach.

The affected blocks now declare the wideLabel capability, and consumers use Block.hasWideLabel() instead of maintaining a separate list of block names.

What changed

  • Added wideLabel capability to the blocks previously listed in WIDENAMES.
  • Added Block.hasWideLabel() helper.
  • Replaced all WIDENAMES consumers with capability checks.
  • Removed the obsolete WIDENAMES and empty EXTRAWIDENAMES lists.
  • Added/updated tests for the new capability and affected block behavior.

Behavior

This is a refactoring only. The existing wide-label behavior is preserved while removing the hardcoded block-name classification.

Testing

  • Prettier: passed locally
  • ESLint: passed locally
  • Tests: 298/298 passed locally

PR Category

  • chore / refactor
  • tests

@severe77
severe77 requested a review from pikurasa as a code owner August 10, 2026 08:03
@github-actions github-actions Bot added tests Adds or updates test coverage chore Maintenance, refactoring, or tooling with no behavior change size/M Medium: 50-249 lines changed area/javascript Changes to JS source files area/tests Changes to test files labels Aug 10, 2026
@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.23%. Comparing base (67bb1bf) to head (6ce3d81).

Files with missing lines Patch % Lines
js/block.js 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8010      +/-   ##
==========================================
+ Coverage   62.19%   62.23%   +0.03%     
==========================================
  Files         187      187              
  Lines       58324    58331       +7     
==========================================
+ Hits        36273    36300      +27     
+ Misses      22051    22031      -20     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@walterbender

Copy link
Copy Markdown
Member

@Chaitu7032 look OK to you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/javascript Changes to JS source files area/tests Changes to test files chore Maintenance, refactoring, or tooling with no behavior change size/M Medium: 50-249 lines changed tests Adds or updates test coverage

Projects

Development

Successfully merging this pull request may close these issues.

2 participants