Support for hierarchical nested components
@Arlodotexe đang làm issue này rồi.
Từ ngày 16/4/2024.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Background
@Arlodotexe thoughts on how hard it'd be to group things in the TOC under 'Controls' that have the Controls package/project name? I think that'd help reduce some of the noise in the TOC and make things easier to find?
@michael-hawker Right now we're just iterating each of our components in the
./componentsdirectory to build the list. We still need to create a meta-package for Controls (see https://github.com/CommunityToolkit/Windows/issues/115) but our infrastructure doesn't have an elegant way to account for toolkit-using-toolkit in general, a problem tangential to why we can't do nested components like./components/Controls/Primitives/or./components/AppServices/AppServices.SourceGenerators/.Our flattened
./components/folder structure is our "component registry", while our tooling (build scripts, msbuild, props files, etc) strings components together based on that flat list.Yes, it would be good to group things more here. But if we do that grouping here, it won't be a reflection of how things are actually structured in the toolkit and will be more work to migrate later, after the above work that we'll need to do anyway.
For now, I think it would be preferable to publish docs with the improvements we have here and come back when we've made improvements to our underlying infrastructure (including new redirects that would entail). It will be less confusing for contributors and people consuming our packages.
Originally posted by @Arlodotexe in https://github.com/CommunityToolkit/Tooling-Windows-Submodule/issues/177#issuecomment-2025761892
How it currently works
- Each of our separate components are represented by a separate folder in the
tooling/../componentsdirectory of the repo consuming our submodule. - In scenarios where the toolkit needs to reference another toolkit component, we:
- Hardcode the absolute path in Directory.Build.props.
- Reference the variables defined in Directory.Build.props via a hardcoded
ProjectReferencein the component's source project.
Problem
- Our infrastructure only supports a flat list of components in the
./components/directory. - Even with a flat list, our infrastructure doesn't have an elegant way to account for toolkit-using-toolkit.
This has a few effects:
- Added difficulty when a component needs to reference another, especially if it hasn't been set up already
- Flat list makes it difficult to create and manage "meta-packages", which are crucial for consumers to quickly install sets of their favorites parts of the toolkit, particularly our various Controls (see https://github.com/CommunityToolkit/Windows/issues/115).
Additionally, building with a ProjectReference shouldn't cause issues when all are built and packaged at the same time/version. However, we've encountered issues with packaging from the platform side, and from the details at hand, it seems like this may be solved by using PackageReference instead. This would be a cleaner solution than detecting when the workaround is needed and auto-applying it.
Solution
- The improved component system should allow components to add toolkit references via their
ToolkitComponentName. - Each component folder needs a new way of being identified, which can be discussed here.
- I suggest that rather than building a manifest file, we use the existing information we have.
- The source project is the minimum requirement for a toolkit component (tests and samples are optional), and it already contains all the information needed to identify the component, including a
ToolkitComponentName, which is always the same as the component folder name. - We can use this to identify when an
srcfolder is a toolkit source component, allowing us to identify when the parent folder is a full component that may contain tests and samples. - This allows us to recursively crawl the folder structure and build a nested hierarchy
- This should be an msbuild target or task which, given a
ToolkitComponentName, finds the csproj recursively (similarly to what we're doing in CheckMultiTargets.props) and adds aProjectReferenceorPackageReferenceto the toolkit component..
- Ngôn ngữ chính
- C#
- Star
- 57
- Fork
- 20
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- 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 CommunityToolkit/Tooling-Windows-Submodule
-
Running WASM on All Solution Doesn't work in VSCó thể làm lại được @Arlodotexe đã nhận 245 ngày trước và không có pull request nào đang mở. Đang mởbug :bug: build :fire: regression sample app 🖼 WASM
CommunityToolkit/Tooling-Windows-Submodule#307 · 2 bình luận · 1 người được giao ·
-
GenerateAllSolution with only wasm target won't buildCó thể làm lại được @Arlodotexe đã nhận 245 ngày trước và không có pull request nào đang mở. Đang mởbug :bug: build :fire: sample app 🖼 WASM
CommunityToolkit/Tooling-Windows-Submodule#306 · 1 bình luận · 1 người được giao ·
-
bug :bug:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
-
Add basic usage docs for Build-Toolkit-Docs.ps1 scriptCó thể làm lại được @Arlodotexe đã nhận 597 ngày trước và không có pull request nào đang mở. Đang mởdocumentation :page_with_curl: low difficulty powershell
CommunityToolkit/Tooling-Windows-Submodule#282 · 1 người được giao ·
-
bug :bug: regression testing 🏗
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Tất cả issue của CommunityToolkit/Tooling-Windows-Submodule
Issue tương tự
-
[Core] IPlatformServices.PrefersDarkTheme: the desktop's theme as the signed-in user sees itĐang mởarea: core bug help wanted ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
ZaidX88/sluice#265 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: remote bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Install a C# EnvironmentĐang mở📅 Sprint 4 Module-Tools Setup Submit:None 🦔 Size Tiny
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
CodeYourFuture/Module-Tools#712 ·
-
:watch: Not Triaged dotnet-fundamentals/svc
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
A: Mapping P3: Standard T: New Feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
space-wizards/space-station-14#46878 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày