Skip to content

Add dice roller features and UI components with refactoring - #45

Merged
Barata-Ribeiro merged 8 commits into
mainfrom
implement-2d-vtm-dice-roller-p3
Aug 6, 2026
Merged

Add dice roller features and UI components with refactoring#45
Barata-Ribeiro merged 8 commits into
mainfrom
implement-2d-vtm-dice-roller-p3

Conversation

@Barata-Ribeiro

Copy link
Copy Markdown
Owner

This pull request adds a willpower reroll feature to the Vampire: The Masquerade dice roller, improves the dice display and selection UX, and introduces new utility components and hooks for future extensibility.

VTM Dice Roller Enhancements

  • Added willpower reroll functionality, allowing users to select up to 3 regular dice to reroll after the initial roll, with selection managed via checkboxes and an action bar UI. [1] [2] [3] [4] [5] [6] [7]
  • Refactored dice roll data structures to include unique IDs for each die, enabling precise selection and rerolling. [1] [2]
  • Improved dice outcome logic and display, including handling of bestial compulsion and vibrate feedback for mobile devices. [1] [2] [3]

UI Components and Utilities

  • Introduced a new Portal component using Radix UI's Slot and ReactDOM.createPortal for rendering content outside the DOM hierarchy, with support for custom containers.
  • Added a useAsRef hook to keep a ref in sync with the latest prop value, leveraging an isomorphic layout effect for consistency across render environments.

These changes collectively improve the dice roller's interactivity, user experience, and code maintainability.

@Barata-Ribeiro Barata-Ribeiro self-assigned this Aug 6, 2026
@Barata-Ribeiro Barata-Ribeiro added bug Something isn't working enhancement New feature or request labels Aug 6, 2026
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
utilities-webapp Ready Ready Preview Aug 6, 2026 11:22am

@Barata-Ribeiro
Barata-Ribeiro merged commit 2d0f230 into main Aug 6, 2026
3 checks passed
@Barata-Ribeiro
Barata-Ribeiro deleted the implement-2d-vtm-dice-roller-p3 branch August 6, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant