We should create a system which lets users easily understand and identify the different templates available in WordPress. For example, singular by itself is not informative unless you already know about the template hierarchy.
Though I'm not sure yet where this will appear in the FSE interface (or what the copy should be for describing things), we can at least create something like getTemplateInfo, which takes a template slug/identifier and returns helpful information about it.
cc @jameskoster
I made a rough outline of some descriptions we might use in this Figma. These definitely need refinement, but could serve as a starting point?
Also worth noting, if we are able to determine which templates are actively in use at a site (as mentioned here), we may be able to dynamically generate more contextual template descriptions. Appreciate this may not be a 'v1' thing though :)
Also worth noting that user defined templates should also _allow_ a description, which could be configured through the excerpt field in the wp_template entry.
Note: this was partially accomplished in #25739, which added a basic map of template slugs to template info.
Just a note from me: These should be filterable. This way plugins like woocommerce and others can add their own templates & descriptions for their template-parts.
Most helpful comment
Just a note from me: These should be filterable. This way plugins like woocommerce and others can add their own templates & descriptions for their template-parts.