question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adopt core shared header for Snippet type listing header

See original GitHub issue

Is 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

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 the action_url should be sufficient for can_add_snippet

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lb-commented, Nov 22, 2022

@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.

0reactions
akshay-gupta7commented, Nov 22, 2022

Appreciate the support @lb- !

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found