BibliothecaDAO / eternum

onchain eternal game
https://alpha-eternum.realms.world
MIT License
46 stars 34 forks source link

Enh/walkthrough #967

Closed cwastche closed 3 months ago

cwastche commented 3 months ago

User description


PR Type

Enhancement, Tests


Description


Changes walkthrough ๐Ÿ“

Relevant files
Enhancement
13 files
useQuests.tsx
Enhance quest handling and descriptions in `useQuests` hook.

client/src/hooks/helpers/useQuests.tsx
  • Added QuestNames enum for quest names.
  • Modified useQuests hook to derive entityId from playerRealms.
  • Updated quest descriptions and steps.
  • Added currentQuest and armyHasTroops functions.
  • +48/-14 
    useUIStore.tsx
    Add right navigation view state management.                           

    client/src/hooks/store/useUIStore.tsx
  • Added rightNavigationView state management.
  • Updated leftNavigationView to LeftView.
  • +10/-5   
    main.tsx
    Enable `TourProvider` for onboarding.                                       

    client/src/main.tsx - Enabled `TourProvider` with empty steps.
    +7/-7     
    SelectPreviewBuilding.tsx
    Integrate tour steps and quest handling in building selection.

    client/src/ui/components/construction/SelectPreviewBuilding.tsx
  • Integrated tour steps and quest handling.
  • Added UI elements for guiding users through building selection.
  • +74/-5   
    HintBox.tsx
    Display quest steps and add end-game information.               

    client/src/ui/components/hints/HintBox.tsx
  • Added quest steps display.
  • Introduced EndGameInfo component for post-quest guidance.
  • +26/-19 
    EntityList.tsx
    Highlight entities during quests.                                               

    client/src/ui/components/list/EntityList.tsx - Added `questing` prop to highlight entities during quests.
    +9/-2     
    ArmyList.tsx
    Integrate quest handling in army management.                         

    client/src/ui/components/military/ArmyList.tsx - Integrated quest handling in army creation and enlistment.
    +13/-1   
    BottomNavigation.tsx
    Update bottom navigation for quest progress.                         

    client/src/ui/modules/navigation/BottomNavigation.tsx
  • Updated navigation to reflect quest progress.
  • Added conditional rendering based on quest states.
  • +11/-5   
    LeftNavigationModule.tsx
    Add quest-based conditional rendering in left navigation.

    client/src/ui/modules/navigation/LeftNavigationModule.tsx - Added conditional rendering and animations based on quest states.
    +48/-6   
    RightNavigationModule.tsx
    Add right navigation module with quest handling.                 

    client/src/ui/modules/navigation/RightNavigationModule.tsx
  • Added right navigation module with quest-based conditional rendering.
  • +107/-60
    TopMiddleNavigation.tsx
    Disable map button during quest completion.                           

    client/src/ui/modules/navigation/TopMiddleNavigation.tsx - Disabled map button when quests are claimable.
    +4/-0     
    Steps.tsx
    Comment out walkthrough minting logic.                                     

    client/src/ui/modules/onboarding/Steps.tsx - Commented out walkthrough minting logic.
    +9/-12   
    tourSteps.tsx
    Add tour steps for building structures.                                   

    client/src/ui/utils/tourSteps.tsx
  • Added tour steps for building resources, economic, and military
    structures.
  • +55/-0   

    ๐Ÿ’ก PR-Agent usage: Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    vercel[bot] commented 3 months ago

    The latest updates on your projects. Learn more about Vercel for Git โ†—๏ธŽ

    Name Status Preview Comments Updated (UTC)
    eternum โŒ Failed (Inspect) Jun 20, 2024 2:25pm
    github-actions[bot] commented 3 months ago

    PR Reviewer Guide ๐Ÿ”

    โฑ๏ธ Estimated effort to review [1-5] 4
    ๐Ÿงช Relevant tests No
    ๐Ÿ”’ Security concerns No
    โšก Key issues to review Possible Bug:
    The useQuests hook has been refactored to remove the entityId parameter and now internally fetches the entityId using useEntities. This change could potentially break existing functionality where specific entity IDs are needed. It's crucial to ensure that this new approach doesn't affect other parts of the application relying on the useQuests hook.
    Code Duplication:
    There is noticeable duplication in the conditional rendering logic across various components (e.g., className computations in BuildingCard). It might be beneficial to abstract these conditions into a more centralized method or configuration to simplify maintenance and improve readability.
    Hardcoded Logic:
    The SelectPreviewBuildingMenu component contains hardcoded checks for quest names to conditionally render UI elements. This approach is prone to errors if quest names change and makes the component less flexible. Consider using a more dynamic approach to handle these conditions.
    github-actions[bot] commented 3 months ago

    Failed to generate code suggestions for PR