feat(widget): Swap tag in single-select mode and add a mode indicator #350 #352

Merged
imAsparky merged 6 commits from issue-350 into main 2026-05-31 23:35:10 +00:00
Owner

closes #350
closes #351

closes #350 closes #351
[dev-notes]:
"""
- CLAUDE.md: package re-exports now work; document the import-direction
  invariant; bump tested matrix to Django 4.2-6.0; note git-herald owns
  versioning and the changelog.
- llms.txt and how-to guides: use the short re-exported import paths and the
  Django 4.2 floor.
- conf.py: serve llms.txt from the docs root via html_extra_path.
"""

closes #351
Single-select fields now replace the current tag when a different one is
chosen, instead of blocking the choice with an alert.

[doc-notes]:
"""
Single-select tag fields now switch to the newly chosen tag instead of
showing a "maximum selections" alert. A small icon in the field shows
whether it takes one tag (radio) or many (checkbox).
"""

[dev-notes]:
"""
toggleTag() performs the swap and announces it via aria-live ("Replaced X
with Y"); selecting the already-selected tag still toggles it off, and the
incoming chip's enter transition is the visual cue. Widget icons were
migrated from Heroicons to Material Symbols (MD3) inline SVGs. The toggleTag
change lives in frontend/src/js and needs a Vite rebuild to ship in dist/.
"""

closes #350
Set the minimum supported Django to 4.2 and fix issues surfaced while
getting the version matrix green.

[doc-notes]:
"""
Minimum supported Django is now 4.2 (4.0 and 4.1 are end-of-life). Fixes a
500 error on the Tagged Field List management page.
"""

[dev-notes]:
"""
- Defer the form-field, TaggedFieldModel and widget imports into
  TagMeCharField.formfield() to break a models <-> forms/widgets circular
  import exposed by the package re-export refactor.
- Default TagMeCharField.max_length to 255 before super().__init__() so Django
  attaches the MaxLengthValidator (removes a stray MaxLengthValidator(None)
  and a duplicate validator).
- get_app_verbose_name no longer misuses pgettext_lazy; returns a concrete
  string with an app_label fallback (the management-view 500).
- Remove Django 4.0/4.1 from tox, the dependency pin, and the classifiers.
"""
closes #351
[dev-notes]:
"""
Asserts tag_me.models/forms/views/widgets import cleanly and that the
documented public names are re-exported and present in __all__. Parses
models/fields.py with ast and fails if it imports the forms/widgets layer at
module top level, guarding against the circular import returning.
"""
closes #351
chore(assets): Update front-end assets #350
All checks were successful
1. Update Changelog / Update Changelog (pull_request) Successful in 15s
9918432a12
Sign in to join this conversation.
No description provided.