Plugin entries that extend another app pull in that app's UI, and every core UI container is named `ui`
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
- 3-5 ngày
- Mức phù hợp với người mới
- 45/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ệ
- react, typescript
- Lĩnh vực
- developer-experience, frontend
Hướng nghiên cứu
Start in src/services/resolution/load.ts and trace resolveComposableReference, getAssociatedUi, and withAssociatedUi to see how a plugin entry inherits app.ui; then inspect the descriptor schema and the UI merge helpers named in the issue. The proposed opt-out affects schema and merge behavior, while unique container names involve build and host resolution. Done means an extended plugin no longer loads the provider's whole UI when opted out, without breaking core UI loading.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
When a child app extends another app's plugin, e.g.
plugins: {
nostr: { extends: "bos://nearbuilding.near/nostr.nearbuilders.org#plugins.nostr" },
}
resolveComposableReference (src/services/resolution/load.ts) also copies the extended app's app.ui onto the plugin entry (getAssociatedUi → withAssociatedUi). The host then loads that whole app UI as a plugin UI on every page of the consumer.
Every app's core UI container is named after ui/package.json, so it's ui in practice: var ui, chunks in self.chunk_ui. Two containers with the same global name end up on one page. The second remoteEntry.js overwrites window.ui, and the host's ui/Hydrate resolves to the other app's UI.
Seen in
-
nearbuilders.org (NEARBuilders/nearbuilders.org#305) consumes nostr.nearbuilders.org's plugin.
-
The page loads both
localhost:3003/remoteEntry.jsand nostr'sremoteEntry.js, bothvar ui. -
Hydration runs nostr's
__federation_expose_Hydrate, whose bundledreact-dom/client19.2.4 meets the sharedreact19.2.9:[Hydrate] Failed: Minified React error #527 (19.2.9 vs 19.2.4) -
Matching React versions only hides it: the consumer still hydrates with the other app's
Hydrate. -
Renaming the provider's UI package (e.g.
nostr_ui) doesn't work either. The host addresses the core UI asuiunless the config hasapp.ui.name, which a core UI can't publish, so the provider's own SSR breaks (Cannot read properties of undefined (reading 'call')).
Proposed fix
- Opt-out (small, unblocks consumers now): let a plugin entry drop the attached UI, e.g.
plugins.nostr.ui: nullorfalse.getEntryAssociatedUiandmergeAssociatedUitreatnullas "no override" today, and the descriptor schema would need to allow it.- nearbuilders.org has its own nostr screens and only needs the plugin's API.
- This also keeps the provider's routes out of the consumer's route tree.
- Unique container names (general): build each app's core UI under a per-app container name, e.g. derived from account and domain. The host would resolve the core UI by the name in the published config instead of the hard-coded
ui, so composed UIs can't collide.
Workaround without a framework change: the provider publishes a second, plugin-only config without app.ui, and consumers extend that.
Versions
everything-dev / platform 2.0.0-rc.24, every-plugin 3.0.0-rc.14.
- Ngôn ngữ chính
- TypeScript
- Star
- 5
- Fork
- 3
- Merge trung bình
- 9 giờ 20 phút
- Pull request đã merge (30 ngày)
- 159
Chuẩn bị môi trường
- Có Dockerfile hoặc 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 NEARBuilders/everything-dev
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NEARBuilders/everything-dev#678 ·
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 77/100
NEARBuilders/everything-dev#628 · 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 78/100
NEARBuilders/everything-dev#400 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
NEARBuilders/everything-dev#677 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
NEARBuilders/everything-dev#673 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của NEARBuilders/everything-dev
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Northeastern-Electric-Racing/FinishLine#4660 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
excaliburjs/Excalibur#3895 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
infer_audio_type only recognises one MPEG Layer III frame header, so most MP3 files are rejectedCó thể đã có người làm @Steve-20-ai đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Earn report crashes with "RangeError: Invalid time value" when a report row has an unparsable timestampCó thể đã có người làm @Gurkaran18 đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
joinmarket-webui/jam#1588 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
BeOS .json missingĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
mihaip/infinite-mac#475 ·