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 support for markdown > alerts via markdig #10173

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Add support for markdown > alerts via markdig #10173

wants to merge 2 commits into from

Conversation

kzu
Copy link

@kzu kzu commented Sep 5, 2024

Partial fix for #10125

Markdig supports alert blocks as documented at https://github.com/xoofx/markdig/blob/master/src/Markdig.Tests/Specs/AlertBlockSpecs.md.

Bumping markdig and adding .UseAlertBlocks() now renders the expected html.

Not sure how to go about adding the styles as needed.

@kzu kzu requested a review from a team as a code owner September 5, 2024 20:33
@kzu
Copy link
Author

kzu commented Sep 5, 2024

I guess as a test PR, it showcases that for someone that can actually run the site, it should be fairly straightforward to add support for this :)

@lyndaidaii
Copy link
Contributor

I guess as a test PR, it showcases that for someone that can actually run the site, it should be fairly straightforward to add support for this :)

Thank you for your contribution. I could help to test it.

@lyndaidaii lyndaidaii self-assigned this Sep 5, 2024
@erdembayar
Copy link
Contributor

I guess as a test PR, it showcases that for someone that can actually run the site, it should be fairly straightforward to add support for this :)

Thank you for your contribution. I could help to test it.

Thanks, Lynn. Please add screenshot here.

@erdembayar
Copy link
Contributor

@lyndaidaii
Have you had chance to test this? If not then I can do it, please let me know.

@@ -1374,20 +1374,20 @@ ul.accordion {
}

ul.accordion li.accordion-item .accordion-expand-link {
background: none!important;
background: none !important;
Copy link
Contributor

@erdembayar erdembayar Sep 10, 2024

Choose a reason for hiding this comment

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

Also this change should have been done in .less file rather than this file?

Copy link
Author

Choose a reason for hiding this comment

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

I have no idea where things are in your code base. Feel free to close this issue which was mostly a demonstration that fixing the issue is mostly adding one line of code and whichever styles you want for the site 🙏

Copy link
Author

Choose a reason for hiding this comment

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

would you mind pointing at which .less file you're referring to?

image

Copy link
Contributor

Choose a reason for hiding this comment

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

@NuGet/gallery-team

Do you know which less file we need to make changes to? I never change any of them.

@kzu
Copy link
Author

kzu commented Sep 13, 2024

Test should be passing now. Screenshots below.

Dark mode:

image

Light mode;

image

Markdig supports alert blocks as documented at https://github.com/xoofx/markdig/blob/master/src/Markdig.Tests/Specs/AlertBlockSpecs.md.

Bumping markdig and adding `.UseAlertBlocks()` now renders the expected html.

Fixes NuGet#10125
If we don't unset it, the default bootstrap p style turns
dark mode illegible (uses white-ish color). This seems
to be an issue specific to the very old version of Bootstrap
being used (v3.x).

When running the site locally, I could not find any other
.css (or .less) files being built or linked from the page,
so I placed the only needed style in the only other style
file other than bootstrap.
@kzu
Copy link
Author

kzu commented Sep 16, 2024

any updates @erdembayar @lyndaidaii ?

@erdembayar
Copy link
Contributor

any updates @erdembayar @lyndaidaii ?

Sorry, we'll review this week or at the latest next week. We have other priorities at the moment and need some time.

@lyndaidaii
Copy link
Contributor

lyndaidaii commented Sep 16, 2024

@lyndaidaii Have you had chance to test this? If not then I can do it, please let me know.

I had trouble in building gallery in local since we merged a couple of repos into one. My .NET version on dev is out of date now. Haven't checked in since then. If you could build gallery in local fine, could you help take a look at UI?

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.

4 participants