Closed aymericdelab closed 3 months 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 19, 2024 6:00am |
โฑ๏ธ Estimated effort to review [1-5] | 3 |
๐งช Relevant tests | No |
๐ Security concerns | No |
โก Key issues to review |
Possible Bug: The removal of animation path state management in useExplore.tsx and useTravel.tsx might lead to issues where the UI does not update correctly after an entity has moved. This is because the previous mechanism of managing animations through a global state (animationPaths ) has been removed, and it's unclear if the new method handles all cases. |
Refactoring Concern: The WarriorModel component has been simplified by removing the rotationY prop. Ensure that this does not affect the intended orientation of the models in the UI, as rotation might be a necessary feature for correct visual representation. |
Category | Suggestion | Score |
Enhancement |
Reintegrate the
___
**The | 9 |
Restore right-click interaction functionality to the
___
**The | 8 | |
Enhance the animation effect by adding a CSS transition for opacity changes___ **Consider using CSS transitions for opacity changes to enhance the animation effect. Thiscan be done by adding a transition property to the style object. This will make the opacity change appear smoother, which is often more visually appealing.** [client/src/ui/elements/DojoHtml.tsx [15]](https://github.com/BibliothecaDAO/eternum/pull/953/files#diff-49c8316d205568a2369273c06568569fb50640fb30c8071cbf9015537d9ca32aR15-R15) ```diff - + ``` Suggestion importance[1-10]: 8Why: The suggestion to add a CSS transition for opacity changes is valid and improves the user experience by making the visibility changes smoother. It is a minor enhancement but adds to the visual appeal. | 8 | |
Maintainability |
Consolidate duplicate
___
**The | 7 |
Possible issue |
Ensure correct positioning and orientation for
___
**The | 6 |
PR Type
Enhancement, Bug fix
Description
useArmyAnimation
hook for handling army animations.WarriorModel
component by removing unnecessary props.ArmyFlag
andArmyHitBox
for better modularity.BaseThreeTooltip
andArmyInfoLabel
with visibility control.hexagon/utils.tsx
.Changes walkthrough ๐
15 files
useArmies.tsx
Include Position in useEntityQuery for armies.
client/src/hooks/helpers/useArmies.tsx - Added `Has(Position)` to the `useEntityQuery` call.
useExplore.tsx
Remove animation path state management from useExplore.
client/src/hooks/helpers/useExplore.tsx
exploreHex
function by removing animation path logic.useTravel.tsx
Remove animation path state management from useTravel.
client/src/hooks/helpers/useTravel.tsx
travelToHex
function by removing animation path logic._mapStore.tsx
Remove animation paths from MapStore.
client/src/hooks/store/_mapStore.tsx
animationPaths
andsetAnimationPaths
fromMapStore
interfaceand its implementation.
WarriorModel.tsx
Simplify WarriorModel props by removing rotationY.
client/src/ui/components/models/armies/WarriorModel.tsx - Removed `rotationY` prop from `WarriorModel`.
Armies.tsx
Remove enemy animation path updates from Armies component.
client/src/ui/components/worldmap/armies/Armies.tsx
useUpdateAnimationPathsForEnnemies
hook and related imports.Army.tsx
Refactor Army component to use useArmyAnimation.
client/src/ui/components/worldmap/armies/Army.tsx
Army
component to useuseArmyAnimation
hook.ArmyFlag
andArmyHitBox
.ArmyFlag.tsx
Add ArmyFlag component for flag rendering.
client/src/ui/components/worldmap/armies/ArmyFlag.tsx - Created new `ArmyFlag` component to handle flag rendering.
ArmyHitBox.tsx
Add ArmyHitBox component for hitbox interactions.
client/src/ui/components/worldmap/armies/ArmyHitBox.tsx - Created new `ArmyHitBox` component to handle hitbox interactions.
ArmyInfoLabel.tsx
Add visibility control to ArmyInfoLabel.
client/src/ui/components/worldmap/armies/ArmyInfoLabel.tsx - Added `visible` prop to `ArmyInfoLabel` for conditional rendering.
useArmyAnimation.tsx
Add useArmyAnimation hook for army animations.
client/src/ui/components/worldmap/armies/useArmyAnimation.tsx - Created `useArmyAnimation` hook to manage army animations.
utils.tsx
Add utility functions for army animations.
client/src/ui/components/worldmap/armies/utils.tsx - Added utility functions for army animations.
utils.tsx
Add BFS pathfinding utility function.
client/src/ui/components/worldmap/hexagon/utils.tsx - Added `findShortestPathBFS` function to find paths using BFS.
BaseThreeTooltip.tsx
Add visibility control to BaseThreeTooltip.
client/src/ui/elements/BaseThreeTooltip.tsx
visible
prop toBaseThreeTooltip
for conditional rendering.DojoHtml.tsx
Add inline style for visibility control in DojoHtml.
client/src/ui/elements/DojoHtml.tsx - Added inline style to control visibility via opacity.