parseAttribute: a boolean attribute without a value reads as false
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- javascript
- Área
- frontend
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- JavaScript
- Estrellas
- 30
- Forks
- 5
- Merge medio
- 1 h 57 min
- PR fusionados (30 d)
- 10
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de webtides/element-js
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
webtides/element-js#201 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
webtides/element-js#198 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
webtides/element-js#194 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
webtides/element-js#193 ·
Los mantenedores suelen responder en 1 día
-
[RENDERER]: only the first raw text element with interpolations is handled, a line break inside one breaks it tooPosiblemente ocupada @eddyloewen la tomó hace 28 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
webtides/element-js#185 ·
Los mantenedores suelen responder en 1 día
Todos los issues de webtides/element-js
Issues similares
-
area:testing bug effort:low model:light plan planner:gpt-6-2-sol tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Agent360dk/browser-mcp#124 ·
Los mantenedores suelen responder en 2 días
-
area:site feature good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
pacocartones/free-llm-api-hub#829 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
Jason-Vaughan/TangleClaw#3270 ·
Los mantenedores suelen responder en 1 día