Closed edisontim closed 5 days ago
The latest updates on your projects. Learn more about Vercel for Git โ๏ธ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
eternum | โ Ready (Inspect) | Visit Preview | ๐ฌ Add feedback | Jun 28, 2024 8:14am |
โฑ๏ธ Estimated effort to review [1-5] | 3 |
๐งช Relevant tests | No |
๐ Security concerns | No |
โก Key issues to review |
Type Consistency: The change from RecsType.String to RecsType.Number for battle_side in contractComponents.ts is significant. Ensure that all related components and data handling logic are updated to handle battle_side as a number. |
Immutability: The use of structuredClone in BattleManager.ts to clone battle into battleClone is a good practice for immutability. Reviewers should ensure that all operations thereafter are using battleClone and not mutating the original battle object. | |
Data Type Conversion: In BattleManager.ts , ensure that the conversion to BigInt during health calculations is handled correctly across all platforms and doesn't lead to precision issues or bugs. |
Category | Suggestion | Score |
Possible bug |
Add onClick handlers to the buttons to ensure they are functional___ **Restore the onClick handlers for the buttons to ensure that they perform actions whenclicked. Removing these handlers might have been unintentional and could lead to non-functional UI elements.** [client/src/ui/components/military/TroopSelect.tsx [131-134]](https://github.com/BibliothecaDAO/eternum/pull/1035/files#diff-d48cb754711d156d71eb306469bed2491bb0e2249e298521427cbecba37d9a77R131-R134) ```diff - - + + ``` Suggestion importance[1-10]: 9Why: Removing the onClick handlers makes the buttons non-functional, which is a significant issue. This suggestion addresses a major bug by restoring functionality. | 9 |
Possible issue |
Revert the type of
___
**Consider reverting the type of | 8 |
Best practice |
Keep the
___
**Refactor the method | 7 |
Enhancement |
Restore previous styling for visual consistency in the UI___ **Consider maintaining the previous styling for theBattle Chest div to ensure consistent UI experience. The changes in class names and structure might affect the visual consistency and layout.** [client/src/ui/modules/military/battle-view/LockedResources.tsx [18-19]](https://github.com/BibliothecaDAO/eternum/pull/1035/files#diff-359d4a5ec2ea695cafb43989d9412232fc58a85aae799cdc84e83e4b128d9f42R18-R19) ```diff -
- Battle Chest
+
+ Battle Chest
```
Suggestion importance[1-10]: 6Why: The suggested change ensures visual consistency in the UI, which is important for user experience but is a minor issue compared to functionality bugs. | 6 |
PR Type
Bug fix, Enhancement
Description
battle_side
type fromString
toNumber
in multiple components to ensure type consistency.battle
object tobattleClone
for immutability and updated health and troops calculations accordingly.console.log
statements from various components.LockedResources
.TroopRow
component and adjustedTroopCard
component height and image size.Changes walkthrough ๐
contractComponents.ts
Change `battle_side` type from `String` to `Number`
client/src/dojo/contractComponents.ts
battle_side
type fromString
toNumber
in multiple components.battle_side
.TroopSelect.tsx
Remove console.log from button click handlers
client/src/ui/components/military/TroopSelect.tsx - Removed `console.log` statements from button click handlers.
Onboarding.tsx
Remove unnecessary console.log statement
client/src/ui/layouts/Onboarding.tsx - Removed unnecessary `console.log` statement.
Steps.tsx
Remove unnecessary console.log statement
client/src/ui/modules/onboarding/Steps.tsx - Removed unnecessary `console.log` statement.
BattleManager.ts
Clone battle object and update health calculations
client/src/dojo/modelManager/BattleManager.ts
battle
object tobattleClone
for immutability.battleClone
.getBattle
method public.LockedResources.tsx
Adjust layout and styling for battle chest
client/src/ui/modules/military/battle-view/LockedResources.tsx - Adjusted layout and styling for battle chest display.
Troops.tsx
Simplify TroopRow and adjust TroopCard styling
client/src/ui/modules/military/battle-view/Troops.tsx
TroopRow
component by removing commented-out code.TroopCard
component height and image size.