Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Extra Metadata about csproj file to Doc Source Generator & use for Package Links in Sample App #131

Merged
merged 5 commits into from
Aug 30, 2023

Conversation

michael-hawker
Copy link
Member

@michael-hawker michael-hawker commented Aug 30, 2023

Fixes #105

Tested in Windows repo with all the other changes here: CommunityToolkit/Windows#204

This PR:

  • Cleans up Doc Source Generator a bit using deconstructed tuple over Left.Right shenanigans
  • Adds a full document registry test to look at the generated output
  • Adds an experimental bool to YAML FrontMatter of docs we can use for Labs-Windows in the future for interleaving repos for sample apps
  • Supports looking for csproj files in AdditionalFiles to get ComponentName property as well as filename for packages identity
  • Updates the Sample App to have the 'Source Code' button open the Component folder on main on GitHub
  • In the package flyout:
    • Roughly show a good namespace for the components in the document
    • Link to both UWP and WinUI packages on NuGet.org

Fix issue with Author missing
Fix issue with old path setup for markdown file path
Can be used for Labs to mark experimental components when we interleave things together.
This will allow us to pass them into the generator and get additional info we can use in the Sample App for pointing folks towards Source code and Packages (for  now).
Source code button navigates to component folder on GitHub (main branch)
Most likely namespace is shown (hard-coded logic for now) - unoplatform/uno#8750
Shows and links to Uwp/WinUI packages on NuGet
@michael-hawker michael-hawker added documentation 📃 Improvements or additions to documentation sample app 🖼 source generator ⚙️ testing 🏗 ux 🖌️ Everything design related labels Aug 30, 2023
michael-hawker added a commit to CommunityToolkit/Labs-Windows that referenced this pull request Aug 30, 2023
Add future `experimental` frontmatter to docs from CommunityToolkit/Tooling-Windows-Submodule#131
Add TransitionHelper description to doc content (as was blank)
Copy link
Member

@Arlodotexe Arlodotexe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in UWP/Wasm, seems to work as expected save for this styling issue on WASM:

image

Also note that our current source generator was doing too much in a single place before this PR, iterating every type in every assembly on every keypress.

We should avoid adding to the source generator if there's an alternative (e.g. going through msbuild) so we don't worsen the tech debt here.

Approved to bring 8.0 closer to release.

@michael-hawker michael-hawker merged commit 097f7c5 into main Aug 30, 2023
8 checks passed
@michael-hawker
Copy link
Member Author

@Arlodotexe there's a better approach @Sergio0694's taking in the MVVM Toolkit with a helper/API that just filters/grabs the attributed things directly. It's something we should switch to.

But for the doc registry itself, we could probably move that to a separate step as it doesn't really need to be real time.

@delete-merged-branch delete-merged-branch bot deleted the llama/docgen-component-details branch August 30, 2023 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📃 Improvements or additions to documentation sample app 🖼 source generator ⚙️ testing 🏗 ux 🖌️ Everything design related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show PackageID in Sample App Page
2 participants