parseAttribute: a boolean attribute without a value reads as false
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript
- Lĩnh vực
- frontend
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 30
- Fork
- 5
- Merge trung bình
- 1 giờ 57 phút
- Pull request đã merge (30 ngày)
- 10
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của webtides/element-js
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
webtides/element-js#201 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
webtides/element-js#198 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
webtides/element-js#194 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
webtides/element-js#193 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[RENDERER]: only the first raw text element with interpolations is handled, a line break inside one breaks it tooCó thể đã có người làm @eddyloewen đã nhận 28 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
webtides/element-js#185 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của webtides/element-js
Issue tương tự
-
area:testing bug effort:low model:light plan planner:gpt-6-2-sol tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Agent360dk/browser-mcp#124 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area:site feature good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
pacocartones/free-llm-api-hub#829 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
Jason-Vaughan/TangleClaw#3270 ·
Maintainer thường phản hồi trong vòng 1 ngày