Repository navigation
Add adaptive TableSurface artwork for consumer-owned layouts - #5
Merged
Merged
Conversation
saeedet
marked this pull request as ready for review
October 19, 2026 15:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Poker consumers with their own responsive scenes could use FeltForge's desktop canvas, but had to duplicate its mobile rails, felt, lighting and materials. This adds
TableSurfaceso they can render the library artwork at arbitrary outer-rail proportions while retaining their own player/card/chip positioning.<TableSurface width={334} height={486} detailScale={0.57} theme="classic" decorative />renders a tall stadium. Width and height are numerical design units for the outer rail. The optional material scale defaults to the shorter edge / 460. The root, table, poker and focused table-surface entries expose the component and its props type.All six themes share the captured paint recipes and the same renderer as
PokerTable. Insets and curvature reflow, textures tile, studs distribute around the perimeter, and outlined ornaments scale uniformly. Wordmarks fit inside the curved betting field, including circular surfaces and thick material settings. Material definitions are compiled once per theme; artwork and geometry are memoized. The existing PokerTable/TableAnchor/core contracts and desktop artwork pixels remain unchanged. PokerTable now explicitly orders its overlays as artwork < community cards < bets/pot/markers < seats, preventing chip stacks from covering players. Custom TableAnchor children can select the documented layer.The playground includes arbitrary dimension/material controls, proportion examples and independent HTML content. Dealer, small-blind and big-blind markers now shrink with the table using container-relative sizing and a readable 32px minimum. The existing resize check verifies all three shrink while remaining round. The README/API guide and
docs/table-surfaces.mdexplain customization, limits and the exact mobile replacement for AI-engineering-system/poker. The consumer repository is unchanged. Targets FeltForge 0.4.0 through the existing tagged-release pipeline.Validation includes 124 unit/SSR/rendering tests, full pixel regressions against all six unmodified 0.3.0 desktop renders, independent Penpot image checks, strict prop/ref contracts, deterministic generation, package/bundle inspection, and actual tarball React 18 and Next.js builds. All 32 browser checks passed and cover all themes in portrait, landscape, circular and intermediate proportions, instance references, responsive CSS resizing, material controls and independent interaction in Chromium and WebKit. An intentional overlap test checks hit order through seats, chips and cards in both browsers. CI retains screenshots for visual review.
Validation passed for commit
2fa5ef7: https://github.com/saeedet/feltforge/actions/runs/39276265428. Representative screenshots from all six themes and the deliberate mobile overlap were visually inspected.