Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

New control to display MD (Markdown) files #300

Closed

Description

@deltakosh
No description provided.

Activity

  1. xied75 commented on Sep 12, 2016

    @xied75
    Contributor

    Would this be based on a RichText control?

  2. deltakosh commented on Sep 13, 2016

    @deltakosh
    ContributorAuthor

    I think so

  3. ryzngard commented on Sep 23, 2016

    @ryzngard
    Contributor

    Possibly a RichText renderer for sundown? That way we avoid having to maintain a markdown parser

  4. deltakosh commented on Sep 24, 2016

    @deltakosh
    ContributorAuthor

    Do you know if there is a nugget package for sundown

  5. ryzngard commented on Sep 24, 2016

    @ryzngard
    Contributor

    Hmm, doesn't appear to be. Nor are any of the .NET wrappers. We'd have to fork (they're MIT license), make a packaging ourselves, or find another solution. Markdown exists, and is also MIT license but doesn't support a custom renderer. Depending on need, I don't think it would be terribly hard to fork Markdown and add the ability for custom rendering, just casually looking at the code. Could also see if we could do a PR to add it as a full feature of Markdown.

  6. ibebbs commented on Sep 26, 2016

    @ibebbs
    Contributor

    How seeing if @QuinnDamerell would be prepared to contribute UniversalMarkdown to the toolkit? Yes it's a custom parser but it looks extremely well written and comes with a custom user control for rendering the markdown as basic XAML elements. It's also a proven parser/render as it's used in the extremely popular Baconit app.

  7. ryzngard commented on Sep 26, 2016

    @ryzngard
    Contributor

    Good call. I shot him an e-mail last night. You're right, the parser code is really cleanly done, and there's already one XAML view for it. I think it would be a nice addition and easy to add

  8. QuinnDamerell commented on Sep 26, 2016

    @QuinnDamerell
    Contributor

    I would love to. @paulbartrum has really been the champ of Universal Markdown recently, he's the one who made it amazing. I have been meaning to make a nuget package for it, but haven't had the time. I think this is a great idea, I have had many people ping me outside and internally to MS who would like to use it.

    I don't know how we would add it, would we want to move the code and shutdown the other repo? Submodule it? Or just add some information in the docs that there is the Universal Markdown repo available?

  9. deltakosh commented on Sep 26, 2016

    @deltakosh
    ContributorAuthor

    It depends on you :) we would be honored to host you but we can also think about a simple control with a dependency on a nuget you can publish

    I'm obviously more for solution 1

  10. QuinnDamerell commented on Sep 26, 2016

    @QuinnDamerell
    Contributor

    Well I would need to see what @paulbartrum thinks, but I think the best bet would be to include it directly into the project and shutdown my repo. I think it would be a lot easier for developers to use if it is already in the toolkit; and I think a lot of people will find it more useful than they might originally think. It works really well for any formatted text you want to show to users, especially for things like update notes, credits, etc.

  11. deltakosh commented on Sep 26, 2016

    @deltakosh
    ContributorAuthor

    Can't agree more :D

  12. QuinnDamerell commented on Sep 26, 2016

    @QuinnDamerell
    Contributor

    If we do so, how would we go about it? Where do you think it should live in the folder structure?

  13. 24 remaining items

  14. QuinnDamerell commented on Jan 5, 2017

    @QuinnDamerell
    Contributor

    It is all about flexibility. The rich text APIs don't allow all of the styling necessary to correctly render all of the elements markdown, especially when it comes to items like grids and list. But there's a trade off, I would bet the rich text renders more efficiently than a ton of xaml objects. So if you need full markdown support, you need xaml. But if you just need a simpler subset of markdown, you might be able to get away with rich text.

    That said, @paulbartrum did an amazing job with the renderer. All of the comments in baconit are rendered in markdown text boxes. The comments are virtualized in a huge scrolling listview, yet the scroll perf is practically perfect.

  15. QuinnDamerell commented on Jan 5, 2017

    @QuinnDamerell
    Contributor

    @deltakosh and @xied75 my biggest concern for integration are the unit tests and sample app. I saw that the universal controls have unit tests, but they are a different kind than the tests in universal markdown. Is it fine to pull the entire markdown project into the folder structure and keep it as-is for now with the different tests? I can integrate the makrdown control into the universal controls sample app as an example implementation, but I don't think I will have time to convert all of the unit tests over to use the same framework.

  16. deltakosh commented on Jan 5, 2017

    @deltakosh
    ContributorAuthor

    It is COMPLETELY fine. we could even ask for help after the merge to migrate unit tests

  17. ibebbs commented on Jan 6, 2017

    @ibebbs
    Contributor

    @QuinnDamerell, I was the one who originally suggested approaching you about pulling Universal Markdown into the toolkit but didn't mean to dump you with loads of extra work to get this done. If it would be helpful, I could put some time aside to be your lackey here and do whatever is needed to get this integrated.

  18. QuinnDamerell commented on Jan 7, 2017

    @QuinnDamerell
    Contributor

    @deltakosh @ibebbs ok, so I had some time and got some of it in. I was able to get the control in, hooked up, and in the sample. I have also added the unit tests project to the solution and fixed them up.

    Let me know what you think:
    https://github.com/QuinnDamerell/UWPCommunityToolkit/tree/markdown

    Things I still need to do:

    • Get an icon for the MarkdownTextBlock in the sample (can someone make one?)
    • Clean up all of the style issues (there are a ton of them, any ideas on how we can work around them)
    • Clean up the MarkdownTextBlock interface and make sure the public interface looks good.
  19. QuinnDamerell commented on Jan 8, 2017

    @QuinnDamerell
    Contributor

    Ok, I went crazier. I fixed up the public interface and fixed all of the style issues in the main code. So the only thing that remains is getting an image for the sample app and fixing the style issues in the unit tests.

  20. Odonno commented on Jan 8, 2017

    @Odonno
    Contributor

    @QuinnDamerell For the icon, why not using the MarkDown logo ?

  21. QuinnDamerell commented on Jan 9, 2017

    @QuinnDamerell
    Contributor

    That is a perfect idea. I took one of the other icons and kind of made it my own. 😁

    I started the pull request process here
    #772

  22. deltakosh commented on Jan 10, 2017

    @deltakosh
    ContributorAuthor

    Let me know when you think we can start reviewing it :)
    I would love to add documentation preview in the sample app using your control

  23. QuinnDamerell commented on Jan 10, 2017

    @QuinnDamerell
    Contributor

    @deltakosh I would say it is ready now! I added the control to the sample app, but haven't added any documentation.

    The markdown control is really simple. Plop it in, set the Text property, and you get rendered markdown. There are two events; one for when the makrdown is rendered and one for when links are tapped (so the app can handle special links like subreddits). There are also a ton of properties exposed, but they are quite simple. They control all of the different properties of how the markdown is rendered (code block background, header font sizes, list padding, etc)

  24. deltakosh commented on Jan 10, 2017

    @deltakosh
    ContributorAuthor

    Sounds good. Let's go through a cycle of review. Documentation can be added at the end :)

  25. QuinnDamerell commented on Jan 10, 2017

    @QuinnDamerell
    Contributor

    Cool. How does the review process work? Anything I need to do?

  26. deltakosh commented on Jan 10, 2017

    @deltakosh
    ContributorAuthor

    Nope..We need two people to review it and approve it
    I'll be one of them (Will review this afternoon).

    Reviewers may comment and this could trigger some updates on your side
    Once two reviewers approved your code, you can add doc and we can merge and celebrate :D

  27. ghost locked as resolved and limited conversation to collaborators on Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions