Closed rsodre closed 3 months ago
The recent changes across various files in the application primarily focus on enhancing the representation of the last_direction
property, transitioning from a numeric type to a string type for better clarity. Additionally, user interface improvements have been made to highlight critical gameplay information, such as moves left and position, by applying bold formatting.
Files | Change Summary |
---|---|
examples/react/react-app/src/App.tsx , examples/react/react-pwa-app/src/App.tsx , examples/react/starknet-react-app/src/App.tsx |
Enhanced UI by making critical game information bold (Moves Left, Position, Last Direction). |
examples/react/react-app/src/dojo/generated/contractComponents.ts , examples/react/react-pwa-app/src/dojo/generated/contractComponents.ts , examples/react/react-phaser-example/src/dojo/generated/contractComponents.ts , examples/react/starknet-react-app/src/dojo/generated/contractComponents.ts , examples/vue/vue-app/src/dojo/generated/contractComponents.ts |
Changed last_direction type from RecsType.Number to RecsType.String to accommodate string values. |
packages/core/bin/generateComponents.cjs |
Changed return value of parseSchemaEnum from "RecsType.Number" to "RecsType.String" to reflect new expectations. |
Objective | Addressed | Explanation |
---|---|---|
Generated components should match Torii's string enums (#[238]) | ✅ | |
Ensure compatibility of last_direction across the codebase (#[238]) |
✅ | |
Maintain internal logic while altering property types (#[238]) | ✅ |
🐰 In fields of code where bunnies hop,
We changed the paths, we made a swap.
From numbers to strings, oh what a delight,
Our game now shines, everything feels right!
With bold moves and directions clear,
Let's jump for joy, the updates are here! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
This approach may not be ideal. More details on #238
Closes #238
Depends on Torii behavior resolution in dojo issue #2188. If Torii is correct, this PR can go on.
Introduced changes
Checklist
Summary by CodeRabbit
New Features
Bug Fixes
last_direction
property from numeric to string across various components, improving clarity and usability.Chores
last_direction
to support string representation instead of numeric values.