Skip to content

feat(nanoviews): rename $$children, $$slot and $$slots to a trailing $ - #209

Merged
dangreen merged 1 commit into
mainfrom
feat/nanoviews-children-postfix
Aug 24, 2026
Merged

feat(nanoviews): rename $$children, $$slot and $$slots to a trailing $#209
dangreen merged 1 commit into
mainfrom
feat/nanoviews-children-postfix

Conversation

@dangreen

@dangreen dangreen commented Aug 24, 2026

Copy link
Copy Markdown
Member

Effect attributes lost the $$ prefix in #188 and took a trailing $ instead — classList$, value$, ref$, autoFocus$. These three kept the old spelling:

-export function $$children<T extends Child, C extends unknown[] = Children>(render: Renderer<T, C>)
+export function children$<T extends Child, C extends unknown[] = Children>(render: Renderer<T, C>)

-export function $$slot<C, F extends (...args: any[]) => Slot<C, F>>(factory: F, content: C)
+export function slot$<C, F extends (...args: any[]) => Slot<C, F>>(factory: F, content: C)

-export function $$slots<T extends Child, D extends AnySlotDef[]>(slotDefs: [...D], render: RendererWithSlots<T, D>)
+export function slots$<T extends Child, D extends AnySlotDef[]>(slotDefs: [...D], render: RendererWithSlots<T, D>)

They are the names a component author writes most, so the inconsistency was in the most visible place.

Cost

None. The package is not published yet, so the old names go rather than turn into aliases, and the rename is free at every measured entry:

gzip before after
all publics 7419 7417
average usage 3790 3790

The average-usage entry names its imports, so $$children there became children$ too. One brotli pin moves down a step.

114 tests, lint and tsc --noEmit green.

@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.30%. Comparing base (024e812) to head (f32e54a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #209      +/-   ##
==========================================
- Coverage   85.33%   85.30%   -0.04%     
==========================================
  Files         139      139              
  Lines        3143     3143              
  Branches      591      591              
==========================================
- Hits         2682     2681       -1     
  Misses        332      332              
- Partials      129      130       +1     

☔ 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.

…iling `$`

Effect attributes moved from `$$name` to `name$` in #188; these three were the last names left with the old prefix, and they are the ones a component author writes most.
@dangreen
dangreen force-pushed the feat/nanoviews-children-postfix branch from 57bcfef to f32e54a Compare August 24, 2026 15:57
@dangreen
dangreen merged commit 47f794b into main Aug 24, 2026
9 of 10 checks passed
@dangreen
dangreen deleted the feat/nanoviews-children-postfix branch August 24, 2026 16:00
@github-actions github-actions Bot mentioned this pull request Aug 24, 2026
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.

1 participant