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

Apply richtext styles to markdown blocks and improve spacing of markdown/code blocks #464

Merged
merged 3 commits into from
Feb 26, 2024

Conversation

kbayliss
Copy link
Contributor

@kbayliss kbayliss commented Feb 26, 2024

This MR will:

  1. Apply the same rich text styles applied to RichTextBlock to MarkDownBlock, which fixes display issues of ul and makes other elements display consistently within MarkDownBlocks.
  2. Standardise the spacing of code blocks within MarkDownBlock and CodeBlock

Screenshots

Both "Before" and "After" screenshots below are taken using the same StreamField which uses two approaches to achieve the same content:

Streamfield

Before

Before

After

After

@@ -1,6 +1,6 @@
{% load wagtailcore_tags %}
<div class="grid">
<div class="grid-align">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed because this is the only place .grid-align was used, so .code-block makes more sense

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree. This makes more sense. A little weird that it wasn't used elsewhere.

Copy link
Collaborator

@vossisboss vossisboss left a comment

Choose a reason for hiding this comment

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

This looks good @kbayliss. I tested this with three previous blog posts that contain code blocks as well and they all look good. I'm not aware of any other ways we use the code-block styling outside of the blog, so this is seems good to go to me.

@@ -1,6 +1,6 @@
{% load wagtailcore_tags %}
<div class="grid">
<div class="grid-align">
Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree. This makes more sense. A little weird that it wasn't used elsewhere.

@vossisboss vossisboss merged commit 15f5a01 into wagtail:main Feb 26, 2024
3 checks passed
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.

2 participants