parseAttribute: a boolean attribute without a value reads as false
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript
- Ambito
- frontend
Direzione di ricerca
Start by finding parseAttribute() and tracing where declared property defaults are available to attribute parsing on both the server and client. Check the existing tests for boolean and string defaults, then add coverage for a bare attribute, an absent attribute, "false", and an empty string with a string default. Done when both renderers agree and all acceptance criteria pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Goal
A boolean attribute without a value (<el-notification open>) turns its property on, as it does on every native element.
Context
parseAttribute() turns "true" and "false" into booleans and leaves the empty string as it is, so open="" is falsy. Svelte renders open={true} on a custom element as a bare open, and so does anyone who writes HTML by hand. With @webtides/element-library 0.2.0 a server-rendered <el-notification open> therefore reads open as off when it connects, adds is-hidden, and shows again a few frames later, once the framework has set the property: the notification blinks on every page load, and the content below it jumps. element-js 1.3.0. Hit in loewen-digital/sveltekit-ai-starter-template (issue #22 there); the template writes open="true" on every notification that starts open.
Acceptance criteria
- For a property whose default is a boolean, an attribute that is present with an empty value reads as
true; an absent attribute and"false"read asfalse. - A property with a string default keeps the empty string.
- The server renderer and the client agree on this.
Proposal (non-binding)
In parseAttribute(), or where attributes become properties: when the declared default is a boolean and the value is "", return true.
Out of scope
How a true property is reflected back to the attribute.
- Lingua principale
- JavaScript
- Stelle
- 30
- Fork
- 5
- Merge medio
- 1h 57m
- PR unite (30g)
- 10
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di webtides/element-js
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
webtides/element-js#201 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
webtides/element-js#198 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
webtides/element-js#194 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
webtides/element-js#193 ·
I maintainer di solito rispondono entro 1 giorno
-
[RENDERER]: only the first raw text element with interpolations is handled, a line break inside one breaks it tooForse già presa @eddyloewen l’ha presa 28 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
webtides/element-js#185 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di webtides/element-js
Issue simili
-
area:testing bug effort:low model:light plan planner:gpt-6-2-sol tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
Agent360dk/browser-mcp#124 ·
I maintainer di solito rispondono entro 2 giorni
-
area:site feature good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
pacocartones/free-llm-api-hub#829 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
Jason-Vaughan/TangleClaw#3270 ·
I maintainer di solito rispondono entro 1 giorno