Skip to content

Movable cards on Safes and Timers, easier swapping; fix comma in estimate note - #65

Merged
ToothyDev merged 2 commits into
mainfrom
claude/47-51-movable-cards
Oct 15, 2026
Merged

ToothyDev merged 2 commits into
mainfrom
claude/47-51-movable-cards

Conversation

@ToothyDev

@ToothyDev ToothyDev commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

What this does

The Safes and Timers cards can now be rearranged like the business cards. Swapping cards is easier on every tab: a swap follows where the dragged card is, not where the pointer is. Also removes the extra comma in the supplies estimate note.

  • The drag and keyboard code moves out of Businesses into a shared ui/CardGrid, used by Businesses, Safes (Money Fronts and the property safes) and Timers. Settings and the Overview stay fixed.
  • You pick a card up by its title bar, with mouse, pen and touch alike. Text on the card stays selectable and its controls work as usual. The card lifts only after 4 px of travel, so a click on the title bar stays a click.
  • A swap happens when the middle of the dragged card is 10% inside the other card (it used to need the pointer 20% inside). When you hold a card by its title, it hangs below the pointer, so the old rule often missed.
  • New saved fields safeOrder and timerOrder (state version 13), with a migration test.
  • Decision 026; decision 014 and CLAUDE.md point to it.

Closes #47
Closes #51

How to check it

  • Timers tab: drag the Lucky Wheel title bar onto the Mansion boost card. They swap, and the order stays after a reload.
  • Safes tab, with a few safes owned: drag Money Fronts by its title onto another safe.
  • Businesses tab: swapping should work as soon as the dragged card mostly covers the other one. Dragging over a card's text selects it and does not move the card.
  • A business card with Equipment off shows the supplies note without the comma before "as in the Bunker".

Checklist

  • npm run verify passes
  • Game data added or changed here has a source (see docs/decisions/004-game-data.md): text only, no values changed
  • README / CLAUDE.md updated if usage or workflow changed

🤖 Generated with Claude Code

… comma

- Drag logic moves from Businesses into a shared ui/CardGrid, now also used by the Safes and
  Timers tabs; their orders are saved as safeOrder and timerOrder (state version 13).
- Mouse and pen pick a card up anywhere except on its controls, after 4 px of travel; touch
  still uses the title bar so swipes scroll.
- Swaps follow the middle of the dragged card, 10% in from the other card's sides.
- Drop the comma before "as in the Bunker" in the supplies estimate note.
- Decision 026.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Deploying lsos with  Cloudflare Pages  Cloudflare Pages

Latest commit: 225aadd
Status: ✅  Deploy successful!
Preview URL: https://60f18655.lsos-2qs.pages.dev
Branch Preview URL: https://claude-47-51-movable-cards.lsos-2qs.pages.dev

View logs

Grabbing a card anywhere got in the way of text selection and the card's controls; mouse and
pen now use the title bar, like touch. Swapping by the dragged card's middle stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ToothyDev ToothyDev changed the title Movable cards on Safes and Timers, easier dragging; fix comma in estimate note Movable cards on Safes and Timers, easier swapping; fix comma in estimate note Oct 15, 2026
@ToothyDev
ToothyDev merged commit 7b647b9 into main Oct 15, 2026
4 checks passed
@ToothyDev
ToothyDev deleted the claude/47-51-movable-cards branch October 15, 2026 13:48
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.

Make safe / all cards draggable Extra comma in estimate note

2 participants