Skip to content

🎨 Palette: Add visual resource icons to UnitPanel cargo inventory#73

Merged
b0x1 merged 1 commit intomainfrom
palette/cargo-icons-unit-panel-11040475149839159394
Apr 21, 2026
Merged

🎨 Palette: Add visual resource icons to UnitPanel cargo inventory#73
b0x1 merged 1 commit intomainfrom
palette/cargo-icons-unit-panel-11040475149839159394

Conversation

@b0x1
Copy link
Copy Markdown
Owner

@b0x1 b0x1 commented Apr 20, 2026

🎨 Palette: Micro-UX Enhancement

I have enhanced the unit's cargo inventory in the UnitPanel to provide better visual context and a more polished feel.

💡 What

  • Added 16px visual resource icons next to each cargo item using the existing ResourceIcon component.
  • Improved resource name formatting: transformed internal keys like TRADE_GOODS into user-friendly Trade goods.
  • Applied robust layout classes (truncate, gap-2, min-w-0) to ensure the inventory stays clean even with long names or varying amounts.

🎯 Why

  • Recognition over Recall: Players can now identify cargo at a glance via icons rather than reading through a text list.
  • Visual Consistency: Aligns the unit inventory with the settlement inventory which already uses resource iconography.
  • Polish: Small touches like handling underscores in names make the game feel more finished and professional.

📸 Verification

  • Successfully ran a Playwright verification script that injected cargo and verified the rendering.
  • Visual confirmation via screenshot and video.
  • All tests, linting, and type-checking passed.

♿ Accessibility

  • Improved visual hierarchy makes the information more accessible to users with cognitive or reading difficulties.
  • Maintained semantic structure for screen readers.

PR created automatically by Jules for task 11040475149839159394 started by @b0x1

- Import ResourceIcon in UnitPanel
- Update cargo list to include resource icons for better recognition
- Improve resource name formatting (handle underscores)
- Ensure robust layout with Tailwind classes (truncate, gap, flex)

Co-authored-by: b0x1 <21123655+b0x1@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@b0x1 b0x1 merged commit 2803fb0 into main Apr 21, 2026
2 checks passed
@b0x1 b0x1 deleted the palette/cargo-icons-unit-panel-11040475149839159394 branch April 21, 2026 17: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.

1 participant