Skip to content

show related posts in tag popover component#28

Merged
interim17 merged 7 commits intomainfrom
feature/tag-popover
Jan 28, 2026
Merged

show related posts in tag popover component#28
interim17 merged 7 commits intomainfrom
feature/tag-popover

Conversation

@interim17
Copy link
Copy Markdown
Contributor

@interim17 interim17 commented Jan 21, 2026

Problem

Advances #7

Originally wrote this hoping to have some work from #27 done but I'm deferring that pending prioritization.

Solution

Made a TagPopover component so that clicking on a tag shows a list of posts that share that tag, and a link to browse the (undeveloped) Tags page.

I also added a type declaration for CSS modules so that we could drop the require imports for our CSS classes and use the pattern more like simularium website:
import * as styles from "../style/tag-popover.module.css";

and className={styles.className}

IMHO, we don't gain much from destructuring the class names because there is no TS check whether those fields actually exist, you can just const { thingThatDoesntExist, thingThatIsNotReal } = require("../style/fake.module.css)

That's fine, this version isn't more safe, but I slightly prefer that it prevents name collisions, in case you have a variable tagContent and a class name tagContent you can now have

  • New feature (non-breaking change which adds functionality)
Screenshot 2026-01-23 at 2 49 43 PM

@interim17 interim17 requested a review from Copilot January 21, 2026 17:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a TagPopover component that displays related posts when clicking on a tag. The popover shows a list of other posts sharing the same tag and includes a link to browse all tags.

Changes:

  • Created a new TagPopover component with styling to show related posts in a popover on tag click
  • Updated IdeaPostNode type to include the fields.slug property needed for filtering
  • Replaced static tag displays in idea-post.tsx and IdeaRoll.tsx with the interactive TagPopover component

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/types/index.ts Added fields.slug to IdeaPostNode interface to support post filtering
src/templates/idea-post.tsx Integrated TagPopover component and passed currentSlug to filter out current post
src/style/tag-popover.module.css Added CSS styles for popover layout and tag interactions
src/components/TagPopover.tsx Implemented new component with GraphQL query to fetch and display related posts
src/components/IdeaRoll.tsx Replaced static tag links with TagPopover component

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/TagPopover.tsx Outdated
Comment thread src/components/IdeaRoll.tsx Outdated
interim17 and others added 3 commits January 21, 2026 10:40
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@interim17 interim17 changed the base branch from feature/dev-script to main January 23, 2026 20:46
@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 23, 2026

Deploy Preview for project-idea-board ready!

Name Link
🔨 Latest commit 81d0ab5
🔍 Latest deploy log https://app.netlify.com/projects/project-idea-board/deploys/6973e81b36b30f0008563ce1
😎 Deploy Preview https://deploy-preview-28--project-idea-board.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@interim17 interim17 requested a review from meganrm January 23, 2026 22:49
@interim17 interim17 merged commit 6ddcd2d into main Jan 28, 2026
4 checks passed
@interim17 interim17 deleted the feature/tag-popover branch January 29, 2026 20:53
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