[CONTEXT]: provided values are handed over on connect only, consumers do not follow later provider updates
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ó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Read BaseElement.update() and verifyProvidedProperties() to assess the proposed update hook and its subtree walk; compare the behavior with the context example in examples/showcase/ and the current context documentation. The issue needs a maintainer decision between documenting connect-time values and updating consumers after provider changes; done means that decision is reflected consistently in the implementation or docs, showcase, and treatment of manual requestContext() callbacks.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Observation
A provider lists a plain value in provideProperties():
class Provider extends TemplateElement {
properties() {
return { theme: 'light' };
}
provideProperties() {
return { theme: this.theme };
}
}
class Consumer extends TemplateElement {
injectProperties() {
return { theme: '' };
}
}
The consumer gets light when it connects. When the provider sets this.theme = 'dark' later, the consumer keeps light. A Store in provideProperties() behaves differently: it is handed over by reference, the consumer subscribes to it, so changes in the store render the consumer.
The context section of examples/showcase/ (#171) shows both behaviours side by side.
Cause
verifyProvidedProperties() replays missed requests and compares customChild[key] !== providedProperties[key], but it only runs in connectedCallback() (both branches). Nothing runs it after a provider update.
Options
- Document it: a provided value is handed over when the consumer connects, values that change are provided as a
Store. No code. - Run
this.verifyProvidedProperties()at the end ofBaseElement.update(). Three lines, consumers then follow every provided value. Costs a subtree walk (getAllComposedElementChildren) on every render of an element that provides something, and manualrequestContext()callbacks still fire once only, which should be stated either way.
The docs currently say the injected value "will be just there at some point", which does not decide this. A maintainer decision, the showcase and the docs follow it.
- 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