Adopt core shared header for Snippet type listing header
See original GitHub issueIs your proposal related to a problem?
The Snippet type listing header is one of the last major header usages within the admin that is not using the using the core (non-slim) shared header template or include.
Describe the solution you’d like
- Using either a template that extends the shared header OR the template include, ensure that the wagtail/snippets/templates/wagtailsnippets/snippets/type_index.html view uses the shared header.
- This is so that shared styles will all work the same and do not need to be maintained across multiple files.
Describe alternatives you’ve considered
- Leave as is, ok to maintain these in isolation for the most part.
Additional context
- See initial work to unify headers https://github.com/wagtail/wagtail/issues/8539
- See a very similar work for the model admin header - https://github.com/wagtail/wagtail/issues/8907 (it may make sense to do that first as some blocks/args will be required for that which could be used for this issue)
Notes for potential implementation approach
wagtail/snippets/templates/wagtailsnippets/snippets/type_index.html
- Firstly, you will likely need to create a new template that extends OR includes the header.
- Firstly, set up a fragment that uses
{% include 'wagtailsnippets/snippets/headers/list_header.html' %}
(this should be just breadcrumbs) and pass it into the block breadcrumbs (be careful here as it may not render in the same way, investigate this usage carefully) - Pass in the icon name
snippet
instead of rendering it on its own model_opts.verbose_name_plural|capfirst
becomes the title arg- The search URL looks like a copy verbatim of the existing search in the shared template
{% if locales %}
- this may not have a home (adds an extra col), see if there is a nicer way to achieve this goal- If we are happy to reverse the order, the locale selector can go into
extra_actions
and theaction_url
should be sufficient forcan_add_snippet
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
About structured snippet assets - Google Ads Help
Consider your products and services, select from a list of predefined headers (like "Product" or "Service category"), and then add specific, supporting details ......
Read more >Google AdWords Structured Snippets Ad Extensions Guide
This Header could be used for single and multi-location based companies and service area businesses who operate in specific towns/cities/neighborhoods of ...
Read more >Protected web API: Code configuration - Microsoft Learn
Learn how to build a protected web API and configure your application's code.
Read more >Level Up Your Application by Adopting Clarity Core - Medium
I'll outline the path for applications using Clarity Angular and share details about how we will partner with you on this journey to...
Read more >14 Structured Snippet Examples to Help You Improve Your Ads
The “styles” header is useful for listing specific sub-types within a broader product category. The items should all be variations of the same ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@akshay-gupta7 no problems at all & no rush. Just add a comment to this issue if you’re stuck with anything or have any questions.
Appreciate the support @lb- !