Skip to content

Show nofilter pill on concepts & events#2011

Merged
jacbn merged 6 commits intomainfrom
hotfix/nofilter-tags
Mar 6, 2026
Merged

Show nofilter pill on concepts & events#2011
jacbn merged 6 commits intomainfrom
hotfix/nofilter-tags

Conversation

@axlewin
Copy link
Copy Markdown
Contributor

@axlewin axlewin commented Mar 3, 2026

No description provided.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 43.05%. Comparing base (693a564) to head (48bcdac).
⚠️ Report is 138 commits behind head on main.

Files with missing lines Patch % Lines
src/app/components/elements/cards/EventCard.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2011      +/-   ##
==========================================
- Coverage   43.22%   43.05%   -0.17%     
==========================================
  Files         575      576       +1     
  Lines       24747    24761      +14     
  Branches     7343     8222     +879     
==========================================
- Hits        10696    10660      -36     
- Misses      14002    14052      +50     
  Partials       49       49              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@axlewin axlewin marked this pull request as ready for review March 5, 2026 13:45
Copy link
Copy Markdown
Contributor

@jacbn jacbn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I would rather use the property tags component for handling this as we have issues with these all the time and keeping all the logic in one place would be helpful, though.

Also, tiny aside, but perhaps we should add mw-max-content to the pill classnames. Two of them are only one word, so this should only affect no-filter, but I guess for consistency we could do it for all of them.

Image Image

This'd look like this for the three tags:

{tags?.includes("nofilter") && isStaff(user) && <span
    className="pill-tag-outline mw-max-content" 
>NO-FILTER</span>}

{title && <CardTitle className="mb-0 pod-title" id={`event-title-${id}`}><h5>{title}</h5></CardTitle>}
<CardTitle className="mb-0 pod-title d-flex align-items-baseline" id={`event-title-${id}`}>
{title && <h5 className="mb-0 me-2">{title}</h5>}
{event.tags?.includes("nofilter") && isStaff(user) && <span className="pill-tag-outline">NO-FILTER</span>}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that events aren't likely to be superseded, deprecated, or have accessibility tags, can we use <QuestionPropertyTags tags={...} /> here just so that all the logic for these tags is always in the same place?

(maybe we should rename the component to <ContentPropertyTags /> given it's being much more widely used now...)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. I'm slightly concerned that the /questions/${supersededBy} could become problematic if we use this too widely and somebody tries to supersede a concept (?), but I agree that this is neater than duplicating the logic everywhere.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh, good point. The parent object typically knows what content type it is, so we could pass the /questions/ / /concept/ prefix in there. I might look at fixing this in a separate PR. :)

Comment thread src/app/components/elements/cards/EventCard.tsx Fixed
Comment thread src/app/components/elements/cards/EventCard.tsx Fixed
Comment thread src/app/components/elements/cards/EventCard.tsx Fixed
@jacbn jacbn merged commit dee99a5 into main Mar 6, 2026
10 checks passed
@jacbn jacbn deleted the hotfix/nofilter-tags branch March 6, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants