Skip to content

Make FAQs bookmarkable#1357

Open
maebeale wants to merge 1 commit intomainfrom
maebeale/bookmarkable-faqs
Open

Make FAQs bookmarkable#1357
maebeale wants to merge 1 commit intomainfrom
maebeale/bookmarkable-faqs

Conversation

@maebeale
Copy link
Collaborator

@maebeale maebeale commented Mar 7, 2026

What is the goal of this PR and why is this important?

  • Allow users to bookmark individual FAQs, just like workshops, resources, events, etc.
  • FAQ appears as a filterable type in bookmark index/personal page dropdowns

How did you approach the change?

  • Added has_many :bookmarks, as: :bookmarkable to the FAQ model
  • Added "Faq" to BOOKMARKABLE_MODELS in Bookmark (auto-included in DROPDOWN_MODELS)
  • Added FAQ joins to sort_by_title and title search scopes in Bookmark
  • Rendered editable_bookmark_icon partial in the FAQ accordion view
  • Added association spec to FAQ model test

UI Testing Checklist

  • Bookmark icon appears next to each FAQ for authenticated users
  • Clicking bookmark icon bookmarks/unbookmarks the FAQ
  • FAQ appears in the type dropdown on bookmarks personal page
  • FAQ appears in the type dropdown on bookmarks index page (admin)
  • Bookmarked FAQs appear in personal bookmarks list
  • Title search works for bookmarked FAQs
  • Sort by title works for bookmarked FAQs

Anything else to add?

  • Follows the exact same polymorphic bookmark pattern used by all other bookmarkable models

🤖 Generated with Claude Code

Add bookmark support to FAQs using the existing polymorphic bookmark
pattern — association, SQL joins for title search/sort, bookmark icon
in the FAQ accordion, and FAQ as a dropdown option on bookmark indexes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant