Repository navigation
feat(sponsorships): team tags on sponsors, with a tag filter and desk sidebar - #555
Merged
Merged
Conversation
A bare `tags` pattern also ignored buzz/api/tags/.
… sidebar Tags are Buzz Tag records scoped to a team and a kind of record, so two teams, or sponsors and events of one team, can each have their own "VIP". A unique index on (team, document_type, label) enforces it. Buzz Tag Link joins a tag to a record and checks the two belong to the same team and type. - Sponsor drawer: tag picker with a Create Tag button, applied immediately. - Sponsor list: moves to its own endpoint with search, sort and filters, including a Tags filter; cards show their tags. - Desk: a record's tag labels are mirrored into `_user_tags`, so the sidebar, list pills, tag counts and Tags filter show them. Desk's add_tag, add_tags, remove_tag and get_tags are overridden for taggable doctypes only and write Buzz Tags; every other doctype keeps Frappe's tags. - Patch converts existing Frappe tags on taggable records into team Buzz Tags. Taggable doctypes are listed in the `taggable_doctypes` hook: Event Sponsor, Buzz Event, Talk Proposal and Buzz Team Membership. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Contributor
|
✅ UI Demo Check — a screenshot or demo is attached. |
Contributor
Backend test coverage: 91%Commit 1318d59. Test modules are excluded. Coverage by file
91 empty files skipped. |
Buzz Tag gets a color (nine hues picked to stay distinct at dot size). create_tag takes it and every tag payload returns it. The sponsor drawer's MultiSelect and create dialog are replaced by a TagEditor at the top of the drawer: chips with remove buttons and an add pill that opens TagMenu. TagMenu searches the team's tags, offers "Create ..." (or Enter) for a new label, then swaps in place to a color list, Luma style. Rows use frappe-ui's ItemListRow. Sponsor cards show a dot per tag after the company name. The sponsorships page now shows its skeleton only on first load, so a background reload (after tagging, a status change or an edit) no longer blanks the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TagEditor now uses Combobox for search and keyboard handling instead of the hand-rolled TagMenu. Only tags not yet on the record are listed, as a colour dot and name; picking one adds it. "Create ..." and the colour step are custom options, since their onClick fires on every pick. The suggested colour is highlighted by arrowing down to it after the swap, as Combobox has no way to highlight a row from code. The save, rollback and create calls move into useDocumentTags. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The enquiries section has its own Filter button, so the unscoped locator matched two. The Sponsors section gets an aria-label, which also names the region for screen readers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- toggle becomes removeTag; adding goes through Combobox selection. - Names read at a glance: appliedTags, createdTags, newTagLabel, searchText, addSelectedTag, setMenuOpen, setTagsCall, createTagCall. - The suggested-colour arrow keys go only to the Combobox search input, never whatever else holds focus. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Found by seeding worst-case sponsors (140-character names and tiers, missing and broken logos, 12 tags, 300 sponsors): - Card: tag dots get their own row above the name, keeping its height when empty so cards line up; name and tier stack and truncate with a tooltip, so a long tier no longer hides the name. - Logo: a missing or failed logo reads "Logo not provided" instead of an initials avatar or a broken-image icon; logos load lazily. - Tag menu: rows cap at 16rem and truncate, so a long tag no longer stretches it across the page. A name over 140 characters shows the limit instead of a raw server error. - Tag chips show their full label on hover; section counts get thousands separators. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Combobox reports custom options too, which have no value, so the handler takes both option types and ignores custom ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Team-scoped, colored tags on sponsors.
Buzz Tag: label + color, unique per team and record type.Buzz Tag Linkjoins a tag to a record._user_tags, so the sidebar and list filters work. Desk tag methods are overridden for taggable doctypes only.Why not Frappe's
Tag: its label is the primary key, so names would be global across teams.Screenshots
Tests
test_tags.py,test_sponsors.py, patch test.e2e/tests/sponsor-tags.spec.ts: create a tag with a color, filter by tag.