Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enh/clean assets #2637

Merged
merged 6 commits into from
Jan 12, 2025
Merged

Enh/clean assets #2637

merged 6 commits into from
Jan 12, 2025

Conversation

bob0005
Copy link
Collaborator

@bob0005 bob0005 commented Jan 11, 2025

Summary by CodeRabbit

Release Notes

  • Asset Management

    • Reorganized image and resource paths across multiple applications
    • Updated loading animations and icons to use new directory structure
    • Modified visual representations in various components with new image sources
  • Configuration

    • Modified Vite configuration to use a common public directory
    • Updated Tailwind CSS configuration for cursor and background images
  • Sound

    • Removed harvest sound effect from UI
  • Cleanup

    • Deleted resource address JSON files from landing application
    • Updated .gitignore to handle .DS_Store files
  • Documentation

    • Minor updates to documentation image references

Copy link
Contributor

mentatbot bot commented Jan 11, 2025

Hi @bob0005! You need to be added as a user to interact with me. Please ask @ponderingdemocritus to add you on the settings page.

You are receiving this comment because I am set to review all PRs. That is configurable here.

Copy link

vercel bot commented Jan 11, 2025

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 Jan 12, 2025 9:12am
eternum-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 12, 2025 9:12am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
eternum-landing ⬜️ Ignored (Inspect) Visit Preview Jan 12, 2025 9:12am

Copy link
Contributor

coderabbitai bot commented Jan 11, 2025

Walkthrough

This pull request involves a comprehensive reorganization of image and resource paths across multiple client applications. The changes primarily focus on restructuring asset directories, updating image source paths, and modifying configuration files to reflect the new directory structure. Key modifications include moving images to more organized subdirectories like /images/logos/, /images/icons/, and /images/avatars/, updating Vite configurations to specify public directories, and removing some resource address JSON files.

Changes

File/Directory Change Summary
.gitignore Added .DS_Store and **/.DS_Store entries, reintroduced docs/dist
client/apps/game/ HTML files Updated image and resource paths to new organized directories
client/apps/game/src/ Components Modified image source paths for loading animations and UI elements
client/apps/game/tailwind.config.js Updated background and cursor image paths
client/apps/game/vite.config.ts Added publicDir pointing to ../../common/public
client/apps/landing/ Similar path reorganizations and image source updates
Resource Address Files Removed resource_addresses.json from local, mainnet, and sepolia directories

Possibly related PRs

  • knip #2635: Changes to .knip.json file related to file and directory ignore configurations
  • prettier #2636: Formatting and organization improvements introduced in the "prettier" PR, enhancing project file structure.

Poem

🐰 Hop, hop, through directories new,
Images dancing in paths so true,
Logos and icons find their place,
A rabbit's reorganization with grace!
Paths aligned, resources bright ✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e6557a2 and 903d730.

📒 Files selected for processing (1)
  • client/apps/game/index.html (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • client/apps/game/index.html
⏰ Context from checks skipped due to timeout of 90000ms (16)
  • GitHub Check: test-various (test_ownership_systems)
  • GitHub Check: test-various (transport_test)
  • GitHub Check: test-various (guild_test)
  • GitHub Check: test-various (realm_test)
  • GitHub Check: test-various (trade_test)
  • GitHub Check: test-various (resource_bridge_test)
  • GitHub Check: test-various (map_test)
  • GitHub Check: test-various (bank_test)
  • GitHub Check: test-various (hyperstructure_test)
  • GitHub Check: test-various (config_test)
  • GitHub Check: test-various (resources_test)
  • GitHub Check: test-various (position_test)
  • GitHub Check: test-various (owner_test)
  • GitHub Check: test-various (combat_test)
  • GitHub Check: test-various (season_test)
  • GitHub Check: clippy

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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🔭 Outside diff range comments (1)
client/apps/landing/src/components/ui/elements/ResourceIcon.tsx (1)

Line range hint 32-65: Update image paths in Components object to match new directory structure.

The image paths in the Components object should be updated to match the new directory structure being implemented across the project.

Apply this pattern to update the paths:

  const Components: { [key: string]: Resource } = Object.freeze({
    Adamantine: {
-     component: <img src={`/images/resources/20.png`} />,
+     component: <img src={`/images/icons/resources/20.png`} />,
      name: "Adamantine",
    },
    // Update remaining paths similarly...
🧹 Nitpick comments (2)
client/apps/game/hex/index.html (1)

7-12: Consider performance impact of asset reorganization.

The reorganization of assets into subdirectories might affect load times. Consider implementing a loading strategy:

  1. Implement lazy loading for non-critical resources
  2. Use image sprites for frequently used icons
  3. Consider implementing a CDN for better asset delivery
client/apps/game/index.html (1)

67-89: Standardize naming convention for building thumbnails.

The building thumbnail filenames use inconsistent naming conventions:

  • camelCase: castleZero.png
  • kebab-case: fragment-mine.png
  • lowercase: house.png

Consider standardizing to kebab-case for better consistency with web conventions.

Example changes:

-    <link rel="prefetch" href="/images/buildings/thumb/castleZero.png" />
+    <link rel="prefetch" href="/images/buildings/thumb/castle-zero.png" />
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3e63503 and e6557a2.

⛔ Files ignored due to path filters (270)
  • client/apps/balancing/public/vite.svg is excluded by !**/*.svg
  • client/apps/balancing/src/assets/react.svg is excluded by !**/*.svg
  • client/apps/game-docs/docs/public/buildings/wonder.png is excluded by !**/*.png
  • client/apps/game-docs/docs/public/resources/249.png is excluded by !**/*.png
  • client/apps/game/public/images/buildings/construction/archery.png is excluded by !**/*.png
  • client/apps/game/public/images/buildings/construction/barracks.png is excluded by !**/*.png
  • client/apps/game/public/images/buildings/construction/farm.png is excluded by !**/*.png
  • client/apps/game/public/images/buildings/construction/fishing_village.png is excluded by !**/*.png
  • client/apps/game/public/images/buildings/construction/forge.png is excluded by !**/*.png
  • client/apps/game/public/images/buildings/construction/lumber_mill.png is excluded by !**/*.png
  • client/apps/game/public/images/buildings/construction/market.png is excluded by !**/*.png
  • client/apps/game/public/images/buildings/construction/mine.png is excluded by !**/*.png
  • client/apps/game/public/images/buildings/construction/stable.png is excluded by !**/*.png
  • client/apps/game/public/images/buildings/construction/storehouse.png is excluded by !**/*.png
  • client/apps/game/public/images/buildings/construction/workers_hut.png is excluded by !**/*.png
  • client/apps/game/public/images/buildings/thumb/archer-tower.png is excluded by !**/*.png
  • client/apps/game/public/images/buildings/thumb/army.png is excluded by !**/*.png
  • client/apps/game/public/images/buildings/thumb/castle.png is excluded by !**/*.png
  • client/apps/game/public/images/buildings/thumb/military.png is excluded by !**/*.png
  • client/apps/game/public/images/buildings/thumb/realm.png is excluded by !**/*.png
  • client/apps/game/public/images/covers/03.png is excluded by !**/*.png
  • client/apps/game/public/images/icons/250.png is excluded by !**/*.png
  • client/apps/game/public/images/icons/251.png is excluded by !**/*.png
  • client/apps/game/public/images/icons/252.png is excluded by !**/*.png
  • client/apps/game/public/images/icons/troop.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/1.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/10.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/11.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/12.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/13.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/14.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/15.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/16.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/17.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/18.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/19.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/2.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/20.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/21.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/22.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/254.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/255.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/29.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/3.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/4.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/5.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/6.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/7.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/8.png is excluded by !**/*.png
  • client/apps/game/public/images/resources/9.png is excluded by !**/*.png
  • client/apps/game/public/images/squire.png is excluded by !**/*.png
  • client/apps/game/public/sound/buildings/storehouse.wav is excluded by !**/*.wav
  • client/apps/game/public/sound/ui/Click_8.wav is excluded by !**/*.wav
  • client/apps/game/public/sound/ui/ESM_GB_fx_foley_one_shot_firebrst_crackle_crunchy_light_foley_fire_01_natural_organic_material.wav is excluded by !**/*.wav
  • client/apps/game/public/sound/ui/click.mp3 is excluded by !**/*.mp3
  • client/apps/game/public/sound/ui/harvest.mp3 is excluded by !**/*.mp3
  • client/apps/game/public/sound/ui/harvest_fish.mp3 is excluded by !**/*.mp3
  • client/apps/game/public/sound/ui/harvest_wheat.mp3 is excluded by !**/*.mp3
  • client/apps/game/public/sound/ui/katana.mp3 is excluded by !**/*.mp3
  • client/apps/game/public/sound/ui/mint.mp3 is excluded by !**/*.mp3
  • client/apps/game/public/sound/ui/sidebar_in.mp3 is excluded by !**/*.mp3
  • client/apps/game/public/sound/ui/sidebar_out.mp3 is excluded by !**/*.mp3
  • client/apps/landing/public/eternum_new_logo.svg is excluded by !**/*.svg
  • client/apps/landing/public/images/Castle.png is excluded by !**/*.png
  • client/apps/landing/public/images/Dark Plains.png is excluded by !**/*.png
  • client/apps/landing/public/images/argent-x.svg is excluded by !**/*.svg
  • client/apps/landing/public/images/avatars/Armor.png is excluded by !**/*.png
  • client/apps/landing/public/images/avatars/Axe.png is excluded by !**/*.png
  • client/apps/landing/public/images/avatars/Battle-axe.png is excluded by !**/*.png
  • client/apps/landing/public/images/avatars/Blade.png is excluded by !**/*.png
  • client/apps/landing/public/images/avatars/Dual-Wield.png is excluded by !**/*.png
  • client/apps/landing/public/images/avatars/Handaxe.png is excluded by !**/*.png
  • client/apps/landing/public/images/avatars/Hidden.png is excluded by !**/*.png
  • client/apps/landing/public/images/avatars/Hilt.png is excluded by !**/*.png
  • client/apps/landing/public/images/avatars/Javelin.png is excluded by !**/*.png
  • client/apps/landing/public/images/avatars/Spear.png is excluded by !**/*.png
  • client/apps/landing/public/images/avatars/Sword.png is excluded by !**/*.png
  • client/apps/landing/public/images/avatars/WrappedAxe.png is excluded by !**/*.png
  • client/apps/landing/public/images/avatars/mercenary.png is excluded by !**/*.png
  • client/apps/landing/public/images/braavos.svg is excluded by !**/*.svg
  • client/apps/landing/public/images/buildings/construction/archery.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/construction/barracks.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/construction/dragonhide.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/construction/farm.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/construction/fishing_village.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/construction/forge.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/construction/lumber_mill.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/construction/market.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/construction/mine.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/construction/stable.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/construction/storehouse.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/construction/workers_hut.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/archer-tower.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/army.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/banks.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/castle.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/crane.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/discord.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/fragment-mine.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/guilds.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/house.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/hyperstructure.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/leaderboard.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/military.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/question-wood.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/question.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/realm.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/resources.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/scale.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/settings.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/silo.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/squire.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/sword.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/timeglass.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/trade.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/trophy.png is excluded by !**/*.png
  • client/apps/landing/public/images/buildings/thumb/world-map.png is excluded by !**/*.png
  • client/apps/landing/public/images/cover.png is excluded by !**/*.png
  • client/apps/landing/public/images/eternum-logo.svg is excluded by !**/*.svg
  • client/apps/landing/public/images/eternum-logo_animated.png is excluded by !**/*.png
  • client/apps/landing/public/images/eternum_logo.png is excluded by !**/*.png
  • client/apps/landing/public/images/eternum_with_snake.png is excluded by !**/*.png
  • client/apps/landing/public/images/eternumloader.png is excluded by !**/*.png
  • client/apps/landing/public/images/hidden-castle.png is excluded by !**/*.png
  • client/apps/landing/public/images/icons/250.png is excluded by !**/*.png
  • client/apps/landing/public/images/icons/251.png is excluded by !**/*.png
  • client/apps/landing/public/images/icons/252.png is excluded by !**/*.png
  • client/apps/landing/public/images/icons/attack.png is excluded by !**/*.png
  • client/apps/landing/public/images/icons/claim.png is excluded by !**/*.png
  • client/apps/landing/public/images/icons/leave-battle.png is excluded by !**/*.png
  • client/apps/landing/public/images/icons/raid.png is excluded by !**/*.png
  • client/apps/landing/public/images/icons/troop.png is excluded by !**/*.png
  • client/apps/landing/public/images/jungle-clouds.png is excluded by !**/*.png
  • client/apps/landing/public/images/oroborus.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/1.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/10.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/11.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/12.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/13.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/14.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/15.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/16.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/17.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/18.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/19.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/2.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/20.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/21.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/22.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/254.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/255.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/29.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/3.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/4.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/5.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/6.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/7.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/8.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/9.png is excluded by !**/*.png
  • client/apps/landing/public/images/resources/coin.png is excluded by !**/*.png
  • client/apps/landing/public/images/squire.png is excluded by !**/*.png
  • client/apps/landing/public/og-image.png is excluded by !**/*.png
  • client/common/public/draco/draco_decoder.wasm is excluded by !**/*.wasm
  • client/common/public/draco/gltf/draco_decoder.wasm is excluded by !**/*.wasm
  • client/common/public/gifs/bridge-in.gif is excluded by !**/*.gif
  • client/common/public/gifs/bridge-out-final.gif is excluded by !**/*.gif
  • client/common/public/gifs/bridge-out-start.gif is excluded by !**/*.gif
  • client/common/public/gifs/final-bridge-in.gif is excluded by !**/*.gif
  • client/common/public/images/avatars/01.png is excluded by !**/*.png
  • client/common/public/images/avatars/02.png is excluded by !**/*.png
  • client/common/public/images/avatars/03.png is excluded by !**/*.png
  • client/common/public/images/avatars/04.png is excluded by !**/*.png
  • client/common/public/images/avatars/05.png is excluded by !**/*.png
  • client/common/public/images/avatars/06.png is excluded by !**/*.png
  • client/common/public/images/avatars/07.png is excluded by !**/*.png
  • client/common/public/images/avatars/08.png is excluded by !**/*.png
  • client/common/public/images/avatars/09.png is excluded by !**/*.png
  • client/common/public/images/avatars/10.png is excluded by !**/*.png
  • client/common/public/images/avatars/11.png is excluded by !**/*.png
  • client/common/public/images/avatars/12.png is excluded by !**/*.png
  • client/common/public/images/avatars/DEPRECATED/01.png is excluded by !**/*.png
  • client/common/public/images/avatars/DEPRECATED/02.png is excluded by !**/*.png
  • client/common/public/images/avatars/DEPRECATED/03.png is excluded by !**/*.png
  • client/common/public/images/avatars/DEPRECATED/04.png is excluded by !**/*.png
  • client/common/public/images/avatars/DEPRECATED/05.png is excluded by !**/*.png
  • client/common/public/images/avatars/DEPRECATED/06.png is excluded by !**/*.png
  • client/common/public/images/avatars/DEPRECATED/07.png is excluded by !**/*.png
  • client/common/public/images/avatars/DEPRECATED/08.png is excluded by !**/*.png
  • client/common/public/images/avatars/DEPRECATED/09.png is excluded by !**/*.png
  • client/common/public/images/avatars/DEPRECATED/10.png is excluded by !**/*.png
  • client/common/public/images/avatars/mercenary.png is excluded by !**/*.png
  • client/common/public/images/buildings/construction/archery.png is excluded by !**/*.png
  • client/common/public/images/buildings/construction/bank.png is excluded by !**/*.png
  • client/common/public/images/buildings/construction/barracks.png is excluded by !**/*.png
  • client/common/public/images/buildings/construction/dragonhide.png is excluded by !**/*.png
  • client/common/public/images/buildings/construction/farm.png is excluded by !**/*.png
  • client/common/public/images/buildings/construction/fishing_village.png is excluded by !**/*.png
  • client/common/public/images/buildings/construction/forge.png is excluded by !**/*.png
  • client/common/public/images/buildings/construction/fragment_mine.png is excluded by !**/*.png
  • client/common/public/images/buildings/construction/hyperstructure.png is excluded by !**/*.png
  • client/common/public/images/buildings/construction/lumber_mill.png is excluded by !**/*.png
  • client/common/public/images/buildings/construction/market.png is excluded by !**/*.png
  • client/common/public/images/buildings/construction/mine.png is excluded by !**/*.png
  • client/common/public/images/buildings/construction/stable.png is excluded by !**/*.png
  • client/common/public/images/buildings/construction/storehouse.png is excluded by !**/*.png
  • client/common/public/images/buildings/construction/workers_hut.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/banks.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/castleOne.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/castleThree.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/castleTwo.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/castleZero.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/crane.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/discord.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/fragment-mine.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/guilds.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/house.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/hyperstructure.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/leaderboard.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/question-wood.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/question.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/resources.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/rewards.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/scale.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/settings.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/silo.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/squire.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/sword.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/timeglass.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/trade.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/trophy.png is excluded by !**/*.png
  • client/common/public/images/buildings/thumb/world-map.png is excluded by !**/*.png
  • client/common/public/images/covers/01.png is excluded by !**/*.png
  • client/common/public/images/covers/02.png is excluded by !**/*.png
  • client/common/public/images/covers/03.png is excluded by !**/*.png
  • client/common/public/images/covers/04.png is excluded by !**/*.png
  • client/common/public/images/covers/05.png is excluded by !**/*.png
  • client/common/public/images/covers/06.png is excluded by !**/*.png
  • client/common/public/images/covers/07.png is excluded by !**/*.png
  • client/common/public/images/covers/empire-og-image.jpg is excluded by !**/*.jpg
  • client/common/public/images/covers/eternum-documentation.png is excluded by !**/*.png
  • client/common/public/images/covers/game-cover.png is excluded by !**/*.png
  • client/common/public/images/covers/og-image-docs.png is excluded by !**/*.png
  • client/common/public/images/covers/og-image.png is excluded by !**/*.png
  • client/common/public/images/game-apple-touch-icon-180x180.png is excluded by !**/*.png
  • client/common/public/images/game-favicon.ico is excluded by !**/*.ico
  • client/common/public/images/game-maskable-icon-512x512.png is excluded by !**/*.png
  • client/common/public/images/game-pwa-192x192.png is excluded by !**/*.png
  • client/common/public/images/game-pwa-512x512.png is excluded by !**/*.png
  • client/common/public/images/game-pwa-64x64.png is excluded by !**/*.png
  • client/common/public/images/hex-bg.png is excluded by !**/*.png
  • client/common/public/images/icons/250.png is excluded by !**/*.png
  • client/common/public/images/icons/251.png is excluded by !**/*.png
  • client/common/public/images/icons/252.png is excluded by !**/*.png
  • client/common/public/images/icons/attack.png is excluded by !**/*.png
  • client/common/public/images/icons/claim.png is excluded by !**/*.png
  • client/common/public/images/icons/cursor-cross.png is excluded by !**/*.png
  • client/common/public/images/icons/cursor.png is excluded by !**/*.png
  • client/common/public/images/icons/grab.png is excluded by !**/*.png
  • client/common/public/images/icons/leave-battle.png is excluded by !**/*.png
  • client/common/public/images/icons/raid.png is excluded by !**/*.png
  • client/common/public/images/landing-apple-touch-icon-180x180.png is excluded by !**/*.png
  • client/common/public/images/landing-favicon.ico is excluded by !**/*.ico
  • client/common/public/images/landing-maskable-icon-512x512.png is excluded by !**/*.png
  • client/common/public/images/landing-pwa-192x192.png is excluded by !**/*.png
  • client/common/public/images/landing-pwa-512x512.png is excluded by !**/*.png
  • client/common/public/images/landing-pwa-64x64.png is excluded by !**/*.png
  • client/common/public/images/logos/BuiltDojo.svg is excluded by !**/*.svg
  • client/common/public/images/logos/Cartridge.png is excluded by !**/*.png
  • client/common/public/images/logos/Dojo.svg is excluded by !**/*.svg
  • client/common/public/images/logos/Eternum-Mark-Black.png is excluded by !**/*.png
📒 Files selected for processing (23)
  • .gitignore (1 hunks)
  • client/apps/game-docs/docs/pages/mechanics/realm/wonders.mdx (1 hunks)
  • client/apps/game/hex/index.html (1 hunks)
  • client/apps/game/index.html (3 hunks)
  • client/apps/game/map/index.html (1 hunks)
  • client/apps/game/src/hooks/useUISound.tsx (0 hunks)
  • client/apps/game/src/ui/components/WorldLoading.tsx (1 hunks)
  • client/apps/game/src/ui/components/cityview/realm/SettleRealmComponent.tsx (1 hunks)
  • client/apps/game/src/ui/elements/LoadingAnimation.tsx (1 hunks)
  • client/apps/game/src/ui/layouts/Onboarding.tsx (1 hunks)
  • client/apps/game/src/ui/modules/LoadingScreen.tsx (1 hunks)
  • client/apps/game/src/ui/modules/loading-oroborus.tsx (1 hunks)
  • client/apps/game/src/ui/modules/onboarding/Steps.tsx (1 hunks)
  • client/apps/game/tailwind.config.js (1 hunks)
  • client/apps/game/vite.config.ts (1 hunks)
  • client/apps/landing/public/resource_addresses/local/resource_addresses.json (0 hunks)
  • client/apps/landing/public/resource_addresses/mainnet/resource_addresses.json (0 hunks)
  • client/apps/landing/public/resource_addresses/sepolia/resource_addresses.json (0 hunks)
  • client/apps/landing/src/components/ui/elements/CountdownTimer.tsx (1 hunks)
  • client/apps/landing/src/components/ui/elements/ResourceIcon.tsx (1 hunks)
  • client/apps/landing/src/main.tsx (1 hunks)
  • client/apps/landing/src/routes/index.lazy.tsx (7 hunks)
  • client/apps/landing/vite.config.ts (1 hunks)
💤 Files with no reviewable changes (4)
  • client/apps/game/src/hooks/useUISound.tsx
  • client/apps/landing/public/resource_addresses/local/resource_addresses.json
  • client/apps/landing/public/resource_addresses/mainnet/resource_addresses.json
  • client/apps/landing/public/resource_addresses/sepolia/resource_addresses.json
✅ Files skipped from review due to trivial changes (12)
  • client/apps/game/src/ui/elements/LoadingAnimation.tsx
  • client/apps/game/src/ui/modules/loading-oroborus.tsx
  • client/apps/game/src/ui/components/WorldLoading.tsx
  • client/apps/game-docs/docs/pages/mechanics/realm/wonders.mdx
  • client/apps/game/src/ui/modules/LoadingScreen.tsx
  • client/apps/landing/src/components/ui/elements/CountdownTimer.tsx
  • client/apps/game/src/ui/layouts/Onboarding.tsx
  • client/apps/landing/src/main.tsx
  • client/apps/game/src/ui/modules/onboarding/Steps.tsx
  • client/apps/game/src/ui/components/cityview/realm/SettleRealmComponent.tsx
  • .gitignore
  • client/apps/landing/src/routes/index.lazy.tsx
⏰ Context from checks skipped due to timeout of 90000ms (17)
  • GitHub Check: test-various (test_ownership_systems)
  • GitHub Check: test-various (transport_test)
  • GitHub Check: test-various (guild_test)
  • GitHub Check: test-various (realm_test)
  • GitHub Check: test-various (trade_test)
  • GitHub Check: test-various (resource_bridge_test)
  • GitHub Check: test-various (map_test)
  • GitHub Check: test-various (bank_test)
  • GitHub Check: test-various (hyperstructure_test)
  • GitHub Check: test-various (config_test)
  • GitHub Check: test-various (resources_test)
  • GitHub Check: test-various (position_test)
  • GitHub Check: test-various (owner_test)
  • GitHub Check: test-various (combat_test)
  • GitHub Check: test-various (season_test)
  • GitHub Check: Run pr agent on every pull request, respond to user comments
  • GitHub Check: clippy
🔇 Additional comments (7)
client/apps/landing/vite.config.ts (1)

30-30: LGTM! Good practice to centralize static assets.

Centralizing public assets in a common directory is a good practice for sharing resources between apps.

Let's verify the common public directory exists:

✅ Verification successful

✅ Verified: Common public directory is properly configured and used

The configuration is correct and safe:

  • The common/public directory exists with proper asset structure
  • No hardcoded public paths found in the codebase
  • Components use proper asset referencing patterns
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the common public directory exists and contains assets
if [ -d "client/common/public" ]; then
  echo "Directory exists. Listing contents:"
  ls -la client/common/public
else
  echo "Warning: Directory client/common/public does not exist"
fi

# Check if any image files reference the old paths
rg -g '*.{tsx,jsx,ts,js,html}' -i 'src=["\']/(?!images/).*\.(png|jpg|jpeg|gif|svg|webp)' client/apps/landing/

Length of output: 1067


Script:

#!/bin/bash
# Check for asset references in landing app
rg -g '*.{tsx,jsx,ts,js,html}' -i 'src=["\']/' client/apps/landing/

# Check if there are any references to old public directory
fd -t f -e tsx -e jsx -e ts -e js -e html . client/apps/landing --exec grep -l "public/"

Length of output: 116


Script:

#!/bin/bash
# Check for asset references in landing app source files
cd client/apps/landing
find . -type f \( -name "*.tsx" -o -name "*.jsx" -o -name "*.ts" -o -name "*.js" -o -name "*.html" \) -exec grep -l "src=" {} \;

# Check for public directory references
find . -type f \( -name "*.tsx" -o -name "*.jsx" -o -name "*.ts" -o -name "*.js" -o -name "*.html" \) -exec grep -l "public/" {} \;

Length of output: 722

client/apps/game/vite.config.ts (1)

101-101: LGTM! Consistent with landing app configuration.

The shared public directory configuration aligns well with the existing PWA manifest image paths.

Let's verify the PWA assets exist in the new structure:

client/apps/landing/src/components/ui/elements/ResourceIcon.tsx (1)

1-7: LGTM! SVG imports updated correctly.

The change to use ?react query parameter for SVG imports aligns with Vite's recommended approach for handling SVGs as React components.

client/apps/game/tailwind.config.js (1)

110-110: LGTM! Asset paths updated consistently.

The backgroundImage and cursor configurations have been updated to use the new directory structure, maintaining consistency with the project-wide asset reorganization.

Also applies to: 118-122

client/apps/game/hex/index.html (1)

5-12: Verify removal of prefetched resources.

Several prefetch links (troop.png, archer-tower.png, army.png, military.png, realm.png) have been removed. Please confirm that these resources are no longer needed or are being loaded through a different mechanism.

Run this script to check for usage of the removed resources:

✅ Verification successful

Prefetch removal verified - assets reorganized

The removed prefetch resources have been reorganized:

  • Military assets consolidated into building-specific images (e.g., archery.png)
  • Combat-related assets moved to thumb directory (sword.png, squire.png)
  • Assets properly organized in buildings/construction/ and buildings/thumb/ directories
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if removed resources are still referenced in the codebase

# Search for references to removed resources
echo "Checking for references to removed resources..."
rg -l "troop\.png|archer-tower\.png|army\.png|military\.png|realm\.png"

Length of output: 178


Script:

#!/bin/bash
# Check for existence of files and similar references

# Search for files with similar names in any format
echo "Searching for similar image files..."
fd -e png -e svg -e jpg -e jpeg "troop|archer|tower|army|military|realm" images/

# Search for references without file extensions
echo -e "\nSearching for references without extensions..."
rg -l "troop|archer.?tower|army|military|realm" --type html --type js --type ts --type jsx --type tsx

# Check specific images directory structure
echo -e "\nListing images directory structure..."
fd . images/ -t d

Length of output: 707


Script:

#!/bin/bash
# Find image assets location and references

# Find potential asset directories
echo "Searching for asset directories..."
fd -t d "images|assets|public|static|dist"

# Search for any reference to these resources in all files
echo -e "\nSearching for resource references..."
rg -l "/images/|troop|archer|tower|army|military|realm" --type html --type js --type ts

# List files in the found directories
echo -e "\nListing files in potential asset directories..."
for dir in $(fd -t d "images|assets|public|static|dist"); do
  echo "Contents of $dir:"
  ls -la "$dir" 2>/dev/null
done

Length of output: 14942


Script:

#!/bin/bash
# Check contents of relevant image subdirectories

echo "Checking buildings directory..."
ls -la client/common/public/images/buildings/

echo -e "\nChecking icons directory..."
ls -la client/common/public/images/icons/

echo -e "\nChecking resources directory..."
ls -la client/common/public/images/resources/

Length of output: 3018


Script:

#!/bin/bash
# Check building-related directories and search for possible renamed files

echo "Checking building construction directory..."
ls -la client/common/public/images/buildings/construction/

echo -e "\nChecking building thumbnails..."
ls -la client/common/public/images/buildings/thumb/

# Let's also check if there are any SVG alternatives
echo -e "\nSearching for SVG files with similar names..."
fd -e svg "troop|archer|tower|army|military|realm" client/common/public/

Length of output: 3302

client/apps/game/map/index.html (1)

5-12: Duplicate changes detected.

The changes in this file mirror those in client/apps/game/hex/index.html. The same considerations about removed prefetch links and performance impact apply here.

client/apps/game/index.html (1)

5-11: Verify resource existence in new locations.

The reorganization of resources into subdirectories looks good, but let's ensure all resources exist in their new locations.

✅ Verification successful

All resources exist in their expected locations

The paths in the HTML file correctly map to existing resources under client/common/public/images/, with proper organization of icons, logos, and root assets.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify existence of global resources in new locations
# Note: Using fd to find files as paths are relative to repo root

echo "Checking global resources..."
fd -t f -e png -e svg "eternum-animated.png|map.svg|cursor.png|grab.png|argent-x.svg|cursor-cross.png|cover.png" images/

Length of output: 284


Script:

#!/bin/bash
# First, let's find where images directories might be
echo "Looking for 'images' directories..."
fd -t d "^images$"

echo -e "\nLooking for the specific files anywhere..."
fd -t f "eternum-animated.png|map.svg|cursor.png|grab.png|argent-x.svg|cursor-cross.png"

Length of output: 706

client/apps/game/index.html Outdated Show resolved Hide resolved
client/apps/game/index.html Show resolved Hide resolved
Copy link

Failed to generate code suggestions for PR

@@ -5,7 +5,7 @@ description: The Wonders of Realms Eternum

# The Wonders

<img src="/buildings/wonder.png" alt="Wonder" width="200" className="float-left " />
<img src="/buildings/dragonhide.png" alt="Wonder" width="200" className="float-left " />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why dragon hide ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the 3d model of the dragonhide building. We used it as model for wonders as tmp for s0.

@bob0005 bob0005 merged commit 45bf055 into next Jan 12, 2025
22 of 29 checks passed
@bob0005 bob0005 deleted the enh/clean-assets branch January 12, 2025 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants