Document the slot element/attribute name clash - #339
Open
maragubot wants to merge 2 commits into
Open
Conversation
The name clash lists in the README and LLMs.md covered six names but omitted `slot`. Both `html.SlotEl` and `html.SlotAttr` exist, and unlike the other six clashes neither gets the plain name, so a reader following the documented rule would reach for `Slot` and not find it.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #339 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 639 639
=========================================
Hits 639 639 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
AGENTS.md states the naming convention without the carve-out, and it's the file assistants read first, so it was the remaining place likely to suggest a plain `Slot`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was found
Three docs describe the element/attribute name clashes: the README's "What's up with the specially named elements and attributes?" section, the "Name Conflicts" section in
LLMs.md, and the "Attribute vs Element Disambiguation" bullets inAGENTS.md(symlinked asCLAUDE.md). All three covered six names —cite,data,form,label,style,title— and omittedslot.html.SlotElandhtml.SlotAttrboth exist (added in #235) and neither is deprecated, soslotis a seventh clash. It's also the one that breaks the rule the docs state: for the other six, one form gets the plain name and the other gets a suffix, so a reader following that rule reaches forSlotand finds nothing.I intersected every name passed to
g.El(...)with every name passed tog.Attr(...)in thehtmlpackage; the overlap is exactly the seven names now listed, so nothing else is missing.What was fixed
Added
slotto all three docs. In the README andLLMs.mdit joins the list in alphabetical order, with the exception flagged where a reader meets it rather than in a footnote below the list. InAGENTS.mdit's one bullet alongside the existing convention rules.The wording deliberately states only what the API looks like today and asserts no rationale. An earlier draft of this branch claimed both forms keep a suffix because neither is clearly more common; self-review found that was invented. #235 shows the suffixing was a deferral — "not add the non-suffixed version for now" — not a judgement about usage, so putting that reasoning in the README's first-person voice would have misattributed it.
Review notes
AGENTS.mdwas initially left out of this PR to avoid colliding with #338, which is open against the same file. That turned out to be unfounded — #338's hunks end around line 34 and these bullets are at 63-67 — so it's included here, where the finding belongs.One pre-existing issue surfaced during review and is left alone:
html.Data(name, v string)is thedata-*helper, so the realdataattribute (on<object>) has no function at all, andData()in theLLMs.mdlist implies a zero-argument signature it doesn't have.Worth deciding rather than implicitly ratifying: since #235 framed the double suffix as temporary, you may prefer to close the gap by adding a plain
Slotinstead of documenting the exception.