Skip to content

Star stories through a form and Turbo Stream - #1707

Merged
mockdeep merged 1 commit into
mainfrom
rf-star-stream
Nov 28, 2026
Merged

mockdeep merged 1 commit into
mainfrom
rf-star-stream

Conversation

@mockdeep

Copy link
Copy Markdown
Collaborator

What

Each star button is now a form that patches /stories/:id/star. The
new star action saves the story and responds with a Turbo Stream
that replaces both of the story's star buttons, so the icon only
changes once the save has worked.

Remove the star-toggle controller. The s hotkey clicks the action
row's star button, and clicking the preview row's star no longer
opens the story. Sample stories on the tutorial page skip the form
submit, as they already did for refresh.

Give the star buttons a translated "Star" or "Unstar" label.

Why

The star should reflect what the server saved. This is the first step
in splitting shared story behavior from the parts that talk to the
server, so the tutorial page can imitate them.

**What**

Each star button is now a form that patches `/stories/:id/star`. The
new `star` action saves the story and responds with a Turbo Stream
that replaces both of the story's star buttons, so the icon only
changes once the save has worked.

Remove the `star-toggle` controller. The `s` hotkey clicks the action
row's star button, and clicking the preview row's star no longer
opens the story. Sample stories on the tutorial page skip the form
submit, as they already did for refresh.

Give the star buttons a translated "Star" or "Unstar" label.

**Why**

The star should reflect what the server saved. This is the first step
in splitting shared story behavior from the parts that talk to the
server, so the tutorial page can imitate them.
@mockdeep mockdeep self-assigned this Nov 28, 2026
@mockdeep
mockdeep enabled auto-merge (squash) November 28, 2026 02:09
@mockdeep
mockdeep merged commit 20a1d1e into main Nov 28, 2026
4 checks passed
@mockdeep
mockdeep deleted the rf-star-stream branch November 28, 2026 02:12
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