-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Add overridable blocks in checks side panel template #13229
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 overridable blocks in checks side panel template #13229
Conversation
</div> | ||
</div> | ||
</div> | ||
<div class="w-mt-3"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the top margin here into a w-gap-3
at the parent, seems to still work well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn’t the parent display: block
though?
</div> | ||
{% endblock %} | ||
{% block issues_section %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we should have some kind of extra_section
here. If we should, I'm not sure if it should come before the content metrics, after the issues, or in between them.
It's technically already possible by overriding either the metrics_section
or issues_section
and using block.super
to render the section's original content along with any custom content, e.g.
{% block issues_section %}
{# This is between the content metrics and issues sections #}
<div data-custom-section></div>
{{ block.super }}
{# This is after the issues section #}
<div data-custom-section></div>
{% endblock %}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think block.super
is good enough for now!
<h2 class="w-my-5 w-text-16 w-font-bold w-text-text-label"> | ||
{% trans 'Content metrics' %} | ||
</h2> | ||
<div class="w-flex w-flex-wrap w-gap-x-10 w-gap-y-4"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added w-flex-wrap
and changed w-gap-10
into separate x and y gaps so if you add custom metrics it wraps around nicely. The w-gap-10
is too big of a gap vertically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I think there are more than enough here, once we’ve tried a few different overrides we can decide which ones to document.
</div> | ||
{% endblock %} | ||
{% block issues_section %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think block.super
is good enough for now!
To ease customisation of the panel's contents, e.g. for packages to add custom checks.