From a3e078eb7ae1365da46016bde22261b718d19624 Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Wed, 25 Mar 2026 09:56:04 +0000 Subject: [PATCH] [#529] Fix story card layout and desktop click MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Move author name back outside moleskine (below cover, above TVL/rating) so profile link doesn't conflict with card link - Move plot count + NEW badges to bottom of moleskine cover - Genre tag stays at top of cover - Revert to wrapping cover in (no stretched link pattern needed) - Layout: moleskine (genre top, title center, plot+NEW bottom) → author → TVL/rating - Update tests to match restored wrapper - Bump version to 0.1.7 Fixes #529 Co-Authored-By: Claude Opus 4.6 (1M context) --- package.json | 2 +- src/components/StoryCard.tsx | 48 ++++++++++----------- src/components/__tests__/StoryCard.test.tsx | 6 +-- 3 files changed, 27 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index 119c35b8..367cedef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plotlink", - "version": "0.1.6", + "version": "0.1.7", "private": true, "workspaces": [ "packages/*" diff --git a/src/components/StoryCard.tsx b/src/components/StoryCard.tsx index e201c565..6d13c9e7 100644 --- a/src/components/StoryCard.tsx +++ b/src/components/StoryCard.tsx @@ -24,14 +24,10 @@ export function StoryCard({ return (
-
- {/* Stretched link — makes the whole card clickable */} - - + {/* Page underneath — revealed when cover opens */}
- {/* Top area: genre + plot count badges */} + {/* Top: genre badge */}
{displayGenre || "Uncategorized"} - - {storyline.plot_count} {storyline.plot_count === 1 ? "plot" : "plots"} - - {isNew && ( - - NEW - - )} {storyline.sunset && ( complete @@ -109,18 +97,28 @@ export function StoryCard({ )}
- {/* Bottom: author name inside cover — z-40 so profile link sits above card link */} -
- - - {storyline.writer_type === 1 && } - + {/* Bottom: plot count + NEW badges */} +
+
+ + {storyline.plot_count} {storyline.plot_count === 1 ? "plot" : "plots"} + + {isNew && ( + + NEW + + )} +
-
+ - {/* Metadata below notebook */} + {/* Metadata below notebook: author → TVL → rating */}
+ + + {storyline.writer_type === 1 && } + {storyline.token_address && ( diff --git a/src/components/__tests__/StoryCard.test.tsx b/src/components/__tests__/StoryCard.test.tsx index 7073f349..2301b088 100644 --- a/src/components/__tests__/StoryCard.test.tsx +++ b/src/components/__tests__/StoryCard.test.tsx @@ -69,14 +69,14 @@ describe("StoryCard", () => { it("links to correct story page", () => { render(); - const link = screen.getByRole("link", { name: "Test Story Title" }); + const link = screen.getAllByText("Test Story Title")[0].closest("a"); expect(link).toHaveAttribute("href", "/story/42"); }); it("applies moleskine-notebook class for hover animation", () => { render(); - const container = screen.getAllByText("Test Story Title")[0].closest(".moleskine-notebook"); - expect(container).toBeTruthy(); + const link = screen.getAllByText("Test Story Title")[0].closest("a"); + expect(link).toHaveClass("moleskine-notebook"); }); it("shows plot count", () => {