From 73e7c7ed2081a848f02600d7ff3903dc0b839141 Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Wed, 25 Mar 2026 08:00:42 +0000 Subject: [PATCH 1/3] [#518] Fix home page story card layout - Move author name inside moleskine cover (bottom area, no nested links) - Move plot count inside as compact badge next to genre tag - Move NEW indicator inside cover as badge - Reduce metadata below card to only TVL and rating - Bump version to 0.1.2 Fixes #518 Co-Authored-By: Claude Opus 4.6 (1M context) --- package.json | 2 +- src/components/StoryCard.tsx | 29 +++++++++++++++++------------ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 1114e099..446dee14 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plotlink", - "version": "0.1.1", + "version": "0.1.2", "private": true, "workspaces": [ "packages/*" diff --git a/src/components/StoryCard.tsx b/src/components/StoryCard.tsx index d45ddc49..aeea777e 100644 --- a/src/components/StoryCard.tsx +++ b/src/components/StoryCard.tsx @@ -71,12 +71,20 @@ export function StoryCard({ }} /> - {/* Top area: genre badge */} + {/* Top area: genre + plot count badges */}
-
+
{displayGenre || "Uncategorized"} + + {storyline.plot_count} {storyline.plot_count === 1 ? "plot" : "plots"} + + {isNew && ( + + NEW + + )} {storyline.sunset && ( complete @@ -97,26 +105,23 @@ export function StoryCard({ )}
- {/* Bottom spacer (author shown below card with profile link) */} -
+ {/* Bottom: author name inside cover */} +
+ + + {storyline.writer_type === 1 && } + +
{/* Metadata below notebook */}
- - - {storyline.writer_type === 1 && } - {storyline.token_address && ( )} - - {storyline.plot_count} {storyline.plot_count === 1 ? "plot" : "plots"} linked - {isNew && NEW} -
From c1062625241442c6bd905983b772abcd2d76d5bc Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Wed, 25 Mar 2026 08:03:46 +0000 Subject: [PATCH 2/3] [#518] Fix: use stretched link pattern to keep author profile clickable Restructured card to avoid nested tags: - Card wrapper changed from to
with a stretched overlay (z-30) - Author section at z-40 so WriterIdentityClient profile link is clickable above the overlay - Re-enabled linkProfile={true} (default) on WriterIdentityClient Co-Authored-By: Claude Opus 4.6 (1M context) --- src/components/StoryCard.tsx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/components/StoryCard.tsx b/src/components/StoryCard.tsx index aeea777e..e201c565 100644 --- a/src/components/StoryCard.tsx +++ b/src/components/StoryCard.tsx @@ -24,10 +24,14 @@ export function StoryCard({ return (
- +
+ {/* Stretched link — makes the whole card clickable */} + + {/* Page underneath — revealed when cover opens */}
- {/* Bottom: author name inside cover */} -
+ {/* Bottom: author name inside cover — z-40 so profile link sits above card link */} +
- + {storyline.writer_type === 1 && }
- +
{/* Metadata below notebook */}
From 08aa675fb30e55b2589bd628d6f7cbdc04c4ca3d Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Wed, 25 Mar 2026 08:09:15 +0000 Subject: [PATCH 3/3] [#518] Fix tests for stretched link pattern Update StoryCard tests to match new card structure: - Use getByRole('link') instead of closest('a') for story link test - Use closest('.moleskine-notebook') for class test Co-Authored-By: Claude Opus 4.6 (1M context) --- src/components/__tests__/StoryCard.test.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/__tests__/StoryCard.test.tsx b/src/components/__tests__/StoryCard.test.tsx index 2301b088..7073f349 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.getAllByText("Test Story Title")[0].closest("a"); + const link = screen.getByRole("link", { name: "Test Story Title" }); expect(link).toHaveAttribute("href", "/story/42"); }); it("applies moleskine-notebook class for hover animation", () => { render(); - const link = screen.getAllByText("Test Story Title")[0].closest("a"); - expect(link).toHaveClass("moleskine-notebook"); + const container = screen.getAllByText("Test Story Title")[0].closest(".moleskine-notebook"); + expect(container).toBeTruthy(); }); it("shows plot count", () => {