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

Sample App Issue/Discussion Links and Markdown Rendering #308

Merged
merged 9 commits into from
Dec 2, 2022

Conversation

michael-hawker
Copy link
Member

@michael-hawker michael-hawker commented Nov 9, 2022

Adds:

  • Replaces buttons at top of samples with 'Discussion' and 'Tracking Issue' which link to the discussion/issue for the experiment here on GitHub. Uses new metadata fields on top of frontmatter for docs.
  • Markdown rendering via Markdig in WASM via HTML (Fixes [Sample App] Markdown Renderer Polyfill #151)

Tested in WASM locally

Known issues for Markdown

  • layout potential mismatch for image loading on Rive page, resizing fixes (need to see if happens without debugger) - this seems random?
  • links in markdown files contrast is bad as it's default link blue (forgot to test trying to open them as well)

@niels9001
Copy link
Collaborator

@michael-hawker I'm still having some WASM issues on my local machine so haven't tested that yet. UWP looked good though!

Removed some more obsolete links on the CanvasLayout and CanvasView page.

@michael-hawker
Copy link
Member Author

Looks like we can get #211 in, so we'll merge that and then I'll update this PR on top of it.

@michael-hawker
Copy link
Member Author

@Arlodotexe I've updated this and tested locally on UWP, WASDK, and WASM. Working great there. Weird build issues with other platform heads trying to build the __WASM__ section instead of the uno section though...

Let's see what happens in the CI. If it's clean, we should merge to get the improvements here. And then file a separate issue to figure out what's going on with VS?

@michael-hawker
Copy link
Member Author

@niels9001 icons looks great now on WASM!

image

@@ -29,6 +29,12 @@ public partial class ToolkitSampleMetadataGenerator
private const string FrontMatterRegexSubcategoryExpression = @"^subcategory:\s*(?<subcategory>.*)$";
private static readonly Regex FrontMatterRegexSubcategory = new Regex(FrontMatterRegexSubcategoryExpression, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Multiline);

private const string FrontMatterRegexDiscussionIdExpression = @"^labs-discussion:\s*(?<discussionId>.*)$";
Copy link
Member

Choose a reason for hiding this comment

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

Let's remove "labs" from these two new fields. This source generator will serve both Labs and the main Toolkit.

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.

Caught a few issues that'll clash with the main toolkit down the road.

michael-hawker and others added 9 commits November 29, 2022 15:36
Adds tests for validation with the Source Generator
Updates Sample Documentation and View code buttons with links to the Discussion and Tracking Issue (not shown if not provided)
Updates template and existing sample documentation with id numbers (zero (0) if no issue/discussion exists)


Works pretty well, seems to be a timing issue with layout and the image in the Rive sample I think? Slowing down in the debugger causes it not to occur, so hard to understand.
Centralizes Fonts.css file used in all WASM heads.
@Arlodotexe Arlodotexe merged commit 9045236 into main Dec 2, 2022
@delete-merged-branch delete-merged-branch bot deleted the llama/sample-app-links branch December 2, 2022 01:06
Martin1994 pushed a commit to Martin1994/Labs-Windows that referenced this pull request Sep 2, 2023
…ample-app-links

Sample App Issue/Discussion Links and Markdown Rendering
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Sample App] Markdown Renderer Polyfill
3 participants