rfcs
rfcs copied to clipboard
RFC 28: Tagging improvements
cc @wagtail/ux-design
FWIW the functionality outlined in Add a “Tag management” interface would be absolutely fantastic. We've had recurring issues with this too (especially when user accidentally add sentenced cased and lower cased variants of the same tag).
Rather than adding a new input field for filtering by tags, one option would be to support a syntax for that within the main search box, e.g. croissant tagged:Savoury. The downside is that it's not as discoverable as an explicit field, and it'd be harder to integrate autocomplete.
As a minor point on the layout, bear in mind that the Collections dropdown won't always be there (it's hidden when no collections exist, or the user only has permission for one) so the UI would have to adjust to deal with the presence or absence of that field.
How useful is the 'popular tags' listing anyway? I don't think users would miss it too much if we dropped it, if we're giving them a better tag filtering UI at the same time. Perhaps we can set up the 'tags' field to offer the 'popular' list as an autocompletion dropdown when you first focus on the field?
Rather than adding a new input field for filtering by tags, one option would be to support a syntax for that within the main search box, e.g. croissant tagged:Savoury. The downside is that it's not as discoverable as an explicit field, and it'd be harder to integrate autocomplete.
Maybe we could use this as a way to display the currently selected tags. To make it clear how to add a tag, we could add a small tag icon to the right of the search box which displays a tag selector?
How useful is the 'popular tags' listing anyway? I don't think users would miss it too much if we dropped it, if we're giving them a better tag filtering UI at the same time. Perhaps we can set up the 'tags' field to offer the 'popular' list as an autocompletion dropdown when you first focus on the field?
:+1:
Proposed approach for disabling free tag creation (i.e. only allowing existing tags to be selected, through autocomplete):
- Patch tag-it.js with https://github.com/aehlke/tag-it/pull/322
- Add a flag to AdminTagWidget to pass autocompleteOnly in initTagField - this would be sufficient to disable creation of new tags by setting
FieldPanel('tags', widget=AdminTagWidget(free_tagging=False)), but this would only be enforced client-side - Introduce a subclass of taggit.forms.TagField (I propose locating this at
wagtail.admin.forms.tags) that accepts thefree_taggingargument, and - as well as passing it on to AdminTagWidget - validates server-side that all entered tags are ones that exist already. This would allow devs to fully disable tag creation, but requires a custom admin form (https://docs.wagtail.io/en/v2.7.1/advanced_topics/customisation/page_editing_interface.html#wagtail.admin.forms.WagtailAdminPageForm) - Add a TagFieldPanel edit handler that accepts a
free_tagging=Falseargument and passes it on to the form field; this allows tag creation to be disabled without needing a custom form. - Update documentation to cover the new parameter / panel type
@gasman Hey Matt, We're interested in this enhancement for a project we're working on. I wonder if this is a candidate for a release soon?
@rgs258 Yep - this is now implemented and will be part of Wagtail 2.9, due for release at the beginning of May: https://docs.wagtail.io/en/latest/reference/pages/model_recipes.html#disabling-free-tagging
@rgs258 Yep - this is now implemented and will be part of Wagtail 2.9, due for release at the beginning of May: https://docs.wagtail.io/en/latest/reference/pages/model_recipes.html#disabling-free-tagging
You're so fast! Thank you!