Consolidate status badges onto a shared/_badge partial - #2099
Merged
Conversation
The pill recipe (inline-flex ... rounded-full border text-xs ...) was copy-pasted across ~40 views. Extract the static (case 1) and link (case 2) variants — same icon+label content model, differing only by an optional link wrapper — into shared/_badge plus a badge_classes helper that owns the class token. Convert _ce_status_badge, which was already this exact span-vs-link branch, as the first adopter; other sites can adopt incrementally. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maebeale
marked this pull request as ready for review
August 5, 2026 12:53
Convert ~30 hand-written pill/badge call sites (static and link/jump variants) to render "shared/badge", collapsing the copy-pasted recipe onto one partial + badge_classes helper. Normalizing unifies the drifted spacing/border/hover and links all show the jump icon. Partial gained icon_html (non-FA markers like status dots), extra (shrink-0 / positioning passthrough), title, and target/rel so the "edit in admin" links keep opening in a new tab. Padding unified at px-2. Left alone: interactive <select> pills, single-letter status circles, and the text-sm title_display_helper badges (a different size family). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
🤖 suggested review level: 5 Inspect 🔬 ~40 view files across many admin pages; subtle behavior (link jump icons, new-tab target/rel, normalized spacing)
What is the goal of this PR and why is this important?
The pill/badge recipe (
inline-flex … rounded-full border text-xs …) was copy-pasted across ~40 views with drifted spacing/border/hover. This consolidates the genuine status badges onto one partial so badges are consistent and centrally styled.How did you approach the change?
shared/_badgepartial +badge_classeshelper (the single source of the pill recipe, padding unified atpx-2).label,classes(theme bg/text/border),icon,icon_html(non-FA markers like status dots),href(→ link + trailing jump icon),extra(shrink-0/positioning passthrough),title,target/rel(keep "edit in admin" links opening in a new tab),data.Deliberately left alone
<select>pills (_attendance_status_badge,chip_select) — different interaction model.program_status_badge).title_display_helperbadges — atext-smtitle-header family; normalizing would shrink them.Verification
Notes for the reviewer
gap/padding/border); a Current-vs-Normalize preview gallery was used to vet each family.