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:
📝 WalkthroughWalkthroughAdds several new UI tooltip entries, fixes a typo in the public option key for reclaim batching distance and updates the code that reads that option, and adds a changelog snippet documenting the tooltip additions. (50 words) Changes
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
lua/ui/help/tooltips.lua (1)
590-591: LOC key suffix convention is inconsistent with nearby entries.Other descriptive tooltip keys in this file use paired
_TITLE/_DESCRIPTIONsuffixes (e.g.,ASSIST_TO_UPGRADE_TITLE/ASSIST_TO_UPGRADE_DESCRIPTION,WATER_DEPTH_ASSISTANCE_TITLE/WATER_DEPTH_ASSISTANCE_DESCRIPTION). The new entry uses no suffix on the title key (INVERT_MOUSE_PAN) and an abbreviated_DESCsuffix on the description key (INVERT_MOUSE_PAN_DESC). This matters most if localization strings are ever added to a.locfile, as translators and tooling will expect consistent naming.♻️ Suggested rename for consistency
- title = "<LOC INVERT_MOUSE_PAN>Invert pan direction with middle mouse button", - description = "<LOC INVERT_MOUSE_PAN_DESC>When enabled, dragging with the middle mouse button moves the camera in the opposite direction.", + title = "<LOC INVERT_MOUSE_PAN_TITLE>Invert pan direction with middle mouse button", + description = "<LOC INVERT_MOUSE_PAN_DESCRIPTION>When enabled, dragging with the middle mouse button moves the camera in the opposite direction.",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lua/ui/help/tooltips.lua` around lines 590 - 591, The LOC key names for this tooltip are inconsistent: change the title key "INVERT_MOUSE_PAN" to "INVERT_MOUSE_PAN_TITLE" and change the description key "INVERT_MOUSE_PAN_DESC" to "INVERT_MOUSE_PAN_DESCRIPTION" so they match the surrounding *_TITLE / *_DESCRIPTION convention; update the two entries in the tooltip table (the title and description fields in tooltips.lua) and ensure any corresponding .loc or lookup usages reference the new keys (search for INVERT_MOUSE_PAN and INVERT_MOUSE_PAN_DESC to update callers).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@lua/ui/help/tooltips.lua`:
- Around line 590-591: The LOC key names for this tooltip are inconsistent:
change the title key "INVERT_MOUSE_PAN" to "INVERT_MOUSE_PAN_TITLE" and change
the description key "INVERT_MOUSE_PAN_DESC" to "INVERT_MOUSE_PAN_DESCRIPTION" so
they match the surrounding *_TITLE / *_DESCRIPTION convention; update the two
entries in the tooltip table (the title and description fields in tooltips.lua)
and ensure any corresponding .loc or lookup usages reference the new keys
(search for INVERT_MOUSE_PAN and INVERT_MOUSE_PAN_DESC to update callers).
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
lua/ui/help/tooltips.lua (1)
673-676: Minor capitalization inconsistency in title
"Assist to upgrade radars"(sentence case) versus the adjacent"Assist to Upgrade"(title case) inoptions_assist_to_upgrade. Aligning to title case would keep these related entries consistent.✏️ Suggested change
options_assist_to_upgrade_radar = { - title = "<LOC ASSIST_TO_UPGRADE_RADAR>Assist to upgrade radars", + title = "<LOC ASSIST_TO_UPGRADE_RADAR>Assist to Upgrade Radars",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lua/ui/help/tooltips.lua` around lines 673 - 676, The title string in options_assist_to_upgrade_radar uses sentence case ("Assist to upgrade radars") while the related option options_assist_to_upgrade uses title case; update the title value in options_assist_to_upgrade_radar to Title Case (e.g., "Assist to Upgrade Radars") so it matches the casing style of options_assist_to_upgrade and keeps UI entries consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@lua/ui/help/tooltips.lua`:
- Around line 681-684: The title/description pair for options_show_player_names
is contradictory (title says "Show Player Names" but description says it hides
them); update the description to describe the effect when the option is enabled
to match the title and the pattern used by other entries (e.g.,
options_painting, options_assist_to_upgrade). In the options_show_player_names
table change the description string to something like "When enabled, player
names are shown locally in the game; this change is client-side only." ensuring
the title remains options_show_player_names.title and the explanatory text is in
options_show_player_names.description.
- Around line 609-612: Rename the misspelled Lua key
options_reclaim_batching_distance_treshold to
options_reclaim_batching_distance_threshold everywhere it appears; update the
entry in the tooltip table (the shown diff), the options table entry, and the
reclaim handling code that references the key so lookups match the correctly
spelled key. Ensure you update all three occurrences and run a quick search for
any other references to options_reclaim_batching_distance_treshold to replace
them with the corrected key.
---
Nitpick comments:
In `@lua/ui/help/tooltips.lua`:
- Around line 673-676: The title string in options_assist_to_upgrade_radar uses
sentence case ("Assist to upgrade radars") while the related option
options_assist_to_upgrade uses title case; update the title value in
options_assist_to_upgrade_radar to Title Case (e.g., "Assist to Upgrade Radars")
so it matches the casing style of options_assist_to_upgrade and keeps UI entries
consistent.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@lua/options/options.lua`:
- Line 1077: The renamed profile key causes existing profiles to lose their
value; update the read site (e.g. in reclaim.lua where
GetFromCurrentProfile('options.reclaim_batching_distance_threshold') is used) to
attempt the new key first and, if nil, fall back to the old misspelled key
'options.reclaim_batching_distance_treshold' and use that value (then continue
using the default 150 only if both are nil); this one-line migration preserves
existing user settings without changing profile storage and can be removed after
a full migration cycle.
In `@lua/ui/help/tooltips.lua`:
- Line 609: The tooltip key is misspelled as
ooptions_reclaim_batching_distance_threshold — rename it to
options_reclaim_batching_distance_threshold so the options UI can find and
display the tooltip; locate the entry in lua/ui/help/tooltips.lua (the table key
currently named ooptions_reclaim_batching_distance_threshold) and correct the
key to options_reclaim_batching_distance_threshold, then run a quick UI hover to
verify the tooltip appears.
---
Duplicate comments:
In `@lua/ui/help/tooltips.lua`:
- Around line 681-684: The description for the tooltip entry
options_show_player_names semantically contradicts its title — update the
description to describe what the option enables (e.g., that toggling it controls
whether player names are shown locally and that states are 'on' vs
'allies-only') instead of saying it "locally hides" names; also verify the
tooltip lookup logic that resolves keys (the code that constructs the lookup
key, likely where Tooltips[...] is accessed) because the option key in
options.lua is already "options_show_player_names" and a lookup implementation
that prefixes "options_" would produce "options_options_show_player_names" (fix
the lookup to use the raw key or rename the tooltip entry to match the lookup).
Ensure you update the tooltip text for options_show_player_names and confirm/fix
the lookup code accordingly.
Co-authored-by: lL1l1 <82986251+lL1l1@users.noreply.github.com>
Co-authored-by: lL1l1 <82986251+lL1l1@users.noreply.github.com>
Description of the proposed changes
This also removes the warnings when hovering over the affected options.
Checklist
- [ ] Changes are annotated, including comments where usefulSummary by CodeRabbit