Skip to content

Conversation

@Raphael-Gregori
Copy link
Contributor

@Raphael-Gregori Raphael-Gregori commented Nov 28, 2025

Add the "freshness" badge directly inline with FAQ titles in both single FAQ pages and accordion views, making it immediately visible when viewing FAQ questions.

Changes:

  • Refactor the "freshness" template to display one badge (New or Recently Updated)
  • Added badge to FAQ page titles (src/faq/faqs.njk)
  • Added badge to accordion item summaries (src/_includes/components/faq/faq-accordion-item.njk)

The badge now appears inline immediately after FAQ titles for FAQs created within the last 30 days, in
both individual FAQ pages and FAQ accordion lists. In those specific cases, you don't have to toggle admin info.

Closes #189

@Raphael-Gregori Raphael-Gregori marked this pull request as ready for review November 28, 2025 17:06
@Raphael-Gregori Raphael-Gregori changed the title Add "New" Badge to FAQ Titles Add Freshness Badges to FAQ Titles and FAQ Accordion Nov 28, 2025
Copy link
Contributor

@tobie tobie left a comment

Choose a reason for hiding this comment

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

LGTM

@tobie
Copy link
Contributor

tobie commented Nov 28, 2025

Semantically, would it make sense to have the badges outside of the element that contains the question?

Comment on lines 13 to 16
<span class="question-text">
{{ faq.question | markdownInline | safe }}
{% include "components/badges/freshness.njk" %}
</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be more semantically correct here to move the components out of the <span class="question-text">.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

definitely better !

image

Copy link
Contributor

Choose a reason for hiding this comment

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

We want them in the same place visually as they were before.

src/faq/faqs.njk Outdated
Comment on lines 16 to 18
<h1 class="section-header">
{{ faq.question | markdownInline | safe }}
{% include "components/badges/freshness.njk" %}
Copy link
Contributor

Choose a reason for hiding this comment

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

The components really belong outside of the <h1>. Maybe you'll need to add a <header> around it to make it work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It definitely seems cleaner !
image

Copy link
Contributor

Choose a reason for hiding this comment

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

No, we want them in the same place visually, but not inside of the h1

@Raphael-Gregori Raphael-Gregori marked this pull request as draft December 1, 2025 16:32
@Raphael-Gregori Raphael-Gregori force-pushed the add-freshness-badge-to-title branch from 6a27984 to 9dff6ff Compare December 1, 2025 16:54
@Raphael-Gregori Raphael-Gregori force-pushed the add-freshness-badge-to-title branch from 9dff6ff to 43bc463 Compare December 1, 2025 17:38
@Raphael-Gregori Raphael-Gregori requested a review from tobie December 1, 2025 17:46
@Raphael-Gregori Raphael-Gregori marked this pull request as ready for review December 1, 2025 17:46
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.

Create freshness pill

2 participants