Skip to content

feat: group posts into topics by their hashtags - #9

Closed
geodro wants to merge 1 commit into
dev-null-sh:productionfrom
geodro:feat/hashtag-topics
Closed

geodro wants to merge 1 commit into
dev-null-sh:productionfrom
geodro:feat/hashtag-topics

Conversation

@geodro

@geodro geodro commented Oct 15, 2026 •

Copy link
Copy Markdown

A post now lands in a topic just by mentioning it: writing #Laravel attaches the post to the laravel topic, creating the topic the first time anyone uses it. The hashtag turns into a link, and /topics/laravel lists every post in that topic newest first with the same infinite scroll as the timelines, behind login like the rest of the app.

Tags are matched case-insensitively, so #Laravel and #laravel are one topic. A tag needs at least one letter and must not be glued to a word, so an issue number like #123 or the # in C# stays plain text, and anything over 50 characters is ignored. CreatePost does the parsing inside the same transaction as the post, and the frontend renders links with the same pattern, so every link points at a topic that exists. Deleting a post drops it from its topics through the pivot's cascade; a topic left empty stays around.

Covered by unit and feature tests for the action, both models and TopicController, with coverage still at 100%, plus a Pest browser test that posts a hashtag, clicks it and lands on the topic page.

@geodro
geodro force-pushed the feat/hashtag-topics branch from 04153f3 to cacd33d Compare October 15, 2026 12:15
@geodro geodro changed the title Group posts into topics by hashtag feat: group posts into topics by their hashtags Oct 15, 2026
@nunomaduro
nunomaduro marked this pull request as draft October 15, 2026 12:20
@brendt

brendt commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

We won't do hashtags

@brendt brendt closed this Oct 15, 2026
@xHeaven xHeaven mentioned this pull request Oct 23, 2026
@nunomaduro nunomaduro mentioned this pull request Oct 27, 2026
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.

2 participants