Player info name font scaling - #4866
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe player overlay precomputes icons, scales player-name text based on available space, and updates identity, alliance, and betrayal layouts to support constrained widths. ChangesPlayer identity layout
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
I am making this pull and such so that the PR gets AI checked and the branch goes into the dev server to test. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/client/hud/layers/PlayerInfoOverlay.ts (1)
413-413: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winReplace the removed Tailwind utility.
Unless the project defines a custom utility, Tailwind CSS 4 ignores
flex-grow-1. Usegroworgrow-1so this identity column has the intended growth behavior. Tailwind v4 removedflex-grow-*utilities in favor ofgrow-*. (tailwindcss.com)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/client/hud/layers/PlayerInfoOverlay.ts` at line 413, Update the class list on the identity column in PlayerInfoOverlay to replace the unsupported flex-grow-1 utility with the Tailwind v4 grow utility, preserving the column’s intended growth behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/client/hud/layers/PlayerInfoOverlay.ts`:
- Around line 300-305: Update the identity-row sizing logic around isDesktop and
scale to derive capacity from the row’s actual available width after fixed
columns, padding, and status content, rather than using a fixed mobile value.
Measure the identity-row container with ResizeObserver or equivalent
container-relative sizing before calculating scale, while preserving the
existing minimum-scale behavior.
---
Nitpick comments:
In `@src/client/hud/layers/PlayerInfoOverlay.ts`:
- Line 413: Update the class list on the identity column in PlayerInfoOverlay to
replace the unsupported flex-grow-1 utility with the Tailwind v4 grow utility,
preserving the column’s intended growth behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: bba2e51d-f0c9-49cc-90e4-44511b2e8271
📒 Files selected for processing (1)
src/client/hud/layers/PlayerInfoOverlay.ts
a8772ba to
2d9a889
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
2d9a889 to
b74dfda
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
b74dfda to
cb7636b
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
cb7636b to
1ac9113
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Add approved & assigned issue number here:
Resolves #4863
Description:
In player-info-overlay: Make the PlayerName monospace, this allows to scale the font-size based on pressure of the icons. All names will be text-lg (or sm for mobile) until the icons and alliance/betrayal puts spacial pressure, in which case the font-size gets reduced. If and only if the min font-size is reached through clamping, should the text start wrapping.
See album for various different device sizes, and different icons
https://imgur.com/a/20xfHFO
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
jB940