From bc964fa88c985d2d2e1d350ec3035956841120ac Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Wed, 16 Sep 2026 09:36:28 -0700 Subject: [PATCH] Specify post options menu for all post cards By specifier. --- .../specs/post-options-menu.feature | 129 ++++++++++++++++++ specs/feature-backlog.md | 20 ++- 2 files changed, 146 insertions(+), 3 deletions(-) create mode 100644 psf-memo-client/specs/post-options-menu.feature diff --git a/psf-memo-client/specs/post-options-menu.feature b/psf-memo-client/specs/post-options-menu.feature new file mode 100644 index 0000000..0c106c8 --- /dev/null +++ b/psf-memo-client/specs/post-options-menu.feature @@ -0,0 +1,129 @@ +# Scenarios: Post Options Menu - 1, Post Options Menu - 2, Post Options Menu - 3, Post Options Menu - 4, Post Options Menu - 5, Post Options Menu - 6, Post Options Menu - 7, Post Options Menu - 8, Post Options Menu - 9 +# +# Every post card has a "Post options" button (three dots) in its upper-right +# corner. The menu is hidden until that button is clicked. Clicking it opens a +# menu whose first (top) item is "See on block explorer", a link to the post's +# transaction on the block explorer (https://bch.loping.net/tx/) that +# opens in a new tab. Clicking the button again, clicking anywhere outside the +# menu, or pressing Escape closes the menu. Arrow keys move focus to the menu's +# first item. The menu appears everywhere a post card is rendered: the recent +# feed, the following feed, the topic feed, profile posts, and the thread +# modal. This is a read-only rendering feature in psf-memo-client: it +# broadcasts no Memo action and changes no DB data. +Feature: Post Options Menu + + Background: + Given a wallet authenticated for the address bitcoincash:qqlrzp23w08434twmvr4fxw672whkjy0py26r63g3d + + Scenario Outline: Post Options Menu - 1 the post menu shows the block explorer link as its first item + Given the psf-memo-db API serves a post with txid authored by the address bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy with text a post from the feed + When I open the recent posts feed + Then the page shows a post options button for the post with txid + And the post options menu is hidden for the post with txid + When I click the post options button for the post with txid + Then the post options menu is shown for the post with txid + And the first item in the post options menu is "See on block explorer" + And the first post options menu item links to and opens in a new tab + + Examples: + | txid | explorer_url | + | c96a46c8b55657fe125115e3ddf5ad30ad587bb41baa952cb8d9be9334161875 | https://bch.loping.net/tx/c96a46c8b55657fe125115e3ddf5ad30ad587bb41baa952cb8d9be9334161875 | + | 1111111111111111111111111111111111111111111111111111111111111111 | https://bch.loping.net/tx/1111111111111111111111111111111111111111111111111111111111111111 | + + Scenario Outline: Post Options Menu - 2 clicking the post options button again closes the menu + Given the psf-memo-db API serves a post with txid authored by the address bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy with text a post from the feed + When I open the recent posts feed + When I click the post options button for the post with txid + Then the first post options menu item links to and opens in a new tab + When I click the post options button again for the post with txid + Then the post options menu is hidden for the post with txid + + Examples: + | txid | explorer_url | + | 2222222222222222222222222222222222222222222222222222222222222222 | https://bch.loping.net/tx/2222222222222222222222222222222222222222222222222222222222222222 | + + Scenario Outline: Post Options Menu - 3 clicking outside the menu closes it + Given the psf-memo-db API serves a post with txid authored by the address bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy with text a post from the feed + When I open the recent posts feed + When I click the post options button for the post with txid + Then the first post options menu item links to and opens in a new tab + When I click outside the post options menu + Then the post options menu is hidden for the post with txid + + Examples: + | txid | explorer_url | + | 3333333333333333333333333333333333333333333333333333333333333333 | https://bch.loping.net/tx/3333333333333333333333333333333333333333333333333333333333333333 | + + Scenario Outline: Post Options Menu - 4 pressing Escape closes the menu + Given the psf-memo-db API serves a post with txid authored by the address bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy with text a post from the feed + When I open the recent posts feed + When I click the post options button for the post with txid + Then the first post options menu item links to and opens in a new tab + When I press the Escape key + Then the post options menu is hidden for the post with txid + + Examples: + | txid | explorer_url | + | 4444444444444444444444444444444444444444444444444444444444444444 | https://bch.loping.net/tx/4444444444444444444444444444444444444444444444444444444444444444 | + + Scenario Outline: Post Options Menu - 5 arrow keys move focus to the menu's first item + Given the psf-memo-db API serves a post with txid authored by the address bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy with text a post from the feed + When I open the recent posts feed + When I click the post options button for the post with txid + Then the first post options menu item links to and opens in a new tab + When I press the ArrowDown key + Then the first post options menu item has focus + + Examples: + | txid | explorer_url | + | 5555555555555555555555555555555555555555555555555555555555555555 | https://bch.loping.net/tx/5555555555555555555555555555555555555555555555555555555555555555 | + + Scenario Outline: Post Options Menu - 6 the following feed post menu offers the block explorer link + Given my wallet follows the address bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy + Given the psf-memo-db API serves a post with txid authored by the address bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy with text a post from the feed + When I open the Following feed + Then the page shows a post options button for the post with txid + When I click the post options button for the post with txid + Then the first item in the post options menu is "See on block explorer" + And the first post options menu item links to and opens in a new tab + + Examples: + | txid | explorer_url | + | 6666666666666666666666666666666666666666666666666666666666666666 | https://bch.loping.net/tx/6666666666666666666666666666666666666666666666666666666666666666 | + + Scenario Outline: Post Options Menu - 7 the topic feed post menu offers the block explorer link + Given the psf-memo-db API serves a post with txid in the topic "bitcoin" authored by the address bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy with text a post from the feed + When I open the topic feed for "bitcoin" + Then the page shows a post options button for the post with txid + When I click the post options button for the post with txid + Then the first item in the post options menu is "See on block explorer" + And the first post options menu item links to and opens in a new tab + + Examples: + | txid | explorer_url | + | 7777777777777777777777777777777777777777777777777777777777777777 | https://bch.loping.net/tx/7777777777777777777777777777777777777777777777777777777777777777 | + + Scenario Outline: Post Options Menu - 8 the thread post menu offers the block explorer link + Given the psf-memo-db API serves a post with txid authored by the address bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy with text a post from the feed + And the thread for the post with txid contains a reply with txid bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + When I open the thread for the post with txid + Then the page shows a post options button for the post with txid + When I click the post options button for the post with txid + Then the first item in the post options menu is "See on block explorer" + And the first post options menu item links to and opens in a new tab + + Examples: + | txid | explorer_url | + | 8888888888888888888888888888888888888888888888888888888888888888 | https://bch.loping.net/tx/8888888888888888888888888888888888888888888888888888888888888888 | + + Scenario Outline: Post Options Menu - 9 the profile post menu offers the block explorer link + Given the psf-memo-db API serves a post with txid authored by the address bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy with text a post from the feed + When I open the profile page for the address bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy + Then the page shows a post options button for the post with txid + When I click the post options button for the post with txid + Then the first item in the post options menu is "See on block explorer" + And the first post options menu item links to and opens in a new tab + + Examples: + | txid | explorer_url | + | 9999999999999999999999999999999999999999999999999999999999999999 | https://bch.loping.net/tx/9999999999999999999999999999999999999999999999999999999999999999 | diff --git a/specs/feature-backlog.md b/specs/feature-backlog.md index 0ea2719..8693c1e 100644 --- a/specs/feature-backlog.md +++ b/specs/feature-backlog.md @@ -207,10 +207,24 @@ Reference: https://memo.sv/protocol (Wayback snapshot 2025-12-15) small; handoffs are blocked on a dirty tree. See `docs/process-improvements.md` for the what/why, commits, and verification evidence. -## Next up: TBD +## Next up: Post options menu (client) -Current direction is front-end improvements to `psf-memo-client` (UI/UX polish, -accessibility, performance, responsiveness, state handling, error surfacing). +Every post card gets a working three-dots "Post options" menu. The menu is +hidden until the button is clicked; its first (top) item is "See on block +explorer", linking to the post transaction at `https://bch.loping.net/tx/` +in a new tab. Clicking the button again, clicking outside the menu, or pressing +Escape closes the menu, and arrow keys move focus to the first item. Scope: the +recent feed, following feed, topic feed, thread modal, and the profile post +card. + +- Client-only; no psf-memo-db or psf-memo-indexer changes. +- The shared post card and the profile post card should share one common + options-menu component so the behavior stays identical on both. +- Spec: `psf-memo-client/specs/post-options-menu.feature`. + +Current direction remains front-end improvements to `psf-memo-client` (UI/UX +polish, accessibility, performance, responsiveness, state handling, error +surfacing). ## Notes for future cycles