-
Notifications
You must be signed in to change notification settings - Fork 566
Update Instructions and text in Build menu/Player panel #785
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
Update Instructions and text in Build menu/Player panel #785
Conversation
""" WalkthroughThis update refines and expands the game's English language resource file, enhances the HelpModal UI with new sections and improved styling, and introduces additional CSS classes for consistent image and icon presentation. The changes focus on clarifying gameplay mechanics, adding new UI elements, and unifying the visual appearance of help and info panels. Changes
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches🧪 Generate Unit Tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/client/styles.css (1)
433-436
: Duplicate emoji-icon class definitionThe emoji-icon class is defined twice (also at lines 413-416), which is redundant and could lead to maintenance issues.
-#helpModal .emoji-icon { - mask: url("../../resources/images/EmojiIconWhite.svg") no-repeat center / - cover; -}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
resources/lang/en.json
(4 hunks)src/client/HelpModal.ts
(13 hunks)src/client/styles.css
(3 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/client/HelpModal.ts (1)
src/client/LangSelector.ts (1)
translateText
(222-247)
🔇 Additional comments (28)
src/client/styles.css (4)
331-337
: Good addition of consistent image stylingAdding the
default-image
class ensures consistent display of help modal images with appropriate dimensions and scaling behavior.
339-351
: Well-structured specialized image classesThe specialized image classes for info panels and player icons provide appropriate sizing and display properties based on content type, improving UI consistency.
400-402
: Good addition of chat icon stylingAdding the chat icon mask supports the new quick chat functionality mentioned in the PR objectives.
428-431
: Good addition of donate gold icon stylingThe donate-gold-icon mask supports the ally gold donation feature mentioned in the PR.
resources/lang/en.json (12)
36-36
: Improved leaderboard description with troops informationThe updated description now includes troops alongside land and gold, providing more complete information to players.
43-47
: Good addition of event panel descriptionsThese new descriptions thoroughly explain the event panel functionality, including alliance requests, attacks, retreats, and quick chat messages as mentioned in the PR objectives.
51-51
: Enhanced player info overlay descriptionThe updated description now provides clearer information about player types, attitudes, and defensive assets.
57-57
: Updated radial menu closure methodChanged from using a close button to right-clicking, matching the PR objective of replacing the radial menu's close button with a right-click close function.
60-60
: Improved clarity with "Boat (transport ship)" terminologyThe parenthetical clarification helps new players understand that boats are transport ships, addressing the PR objective of clarifying terminology.
63-64
: Updated enemy info description with "stopped trading" terminologyChanged "embargo" to "stopped trading" for clarity while explaining the trading mechanics, consistent with the PR objective of replacing "embargo" with "stop trading".
71-71
: Enhanced traitor role descriptionThe updated description now clarifies defense debuff effects and trade consequences of betrayal, aligned with PR objectives regarding traitor role clarifications.
84-84
: Updated port description to be more inclusiveRemoved the previous limitation to allies, making it clear that ports send trade ships to generate gold for all connected countries (unless trade is stopped). This aligns with the PR objective of refining build menu descriptions.
86-86
: Terminology update from "Battleships" to "Warships"The change maintains consistency in terminology throughout the game interface, as mentioned in the PR objectives.
90-90
: Enhanced SAM launcher hit chance descriptionThe description now provides specific hit chances for different missile types, addressing the PR objective of adjusting SAM launcher hit chance information.
102-103
: Updated player icon descriptionsThe embargo icon description has been updated while maintaining the term "embargo" for the icon (consistent with PR objectives), and a new alliance request icon description has been added.
403-403
: Changed player panel terminology from "Embargo against you" to "Stopped trading with you"This change aligns with the PR objective of clarifying terminology while making the interface more intuitive for players.
src/client/HelpModal.ts (12)
89-92
: Improved key layout for movement controlsThe WASD keys are now displayed on separate lines, making the layout clearer and more visually organized.
119-120
: Better formatting for ALT+R key combinationImproved formatting for the graphics reset key combination makes it more readable.
134-142
: Consistent styling with font-bold and default-image classesAdded font-bold to section headers and default-image class to images, creating a more cohesive visual hierarchy and consistent image sizing throughout the help modal.
Also applies to: 153-161, 182-198
180-214
: Excellent addition of Events sectionThis new section thoroughly documents the event panel functionality with images and detailed descriptions, addressing the PR objective of updating instructional content for the event panel.
245-262
: Good addition of Player Overlay sectionThe new Player Overlay section with explanatory image helps users understand player information display, aligned with the PR objectives of updating player info text.
271-284
: Enhanced radial menu with ally-specific viewAdded an additional image showing the ally-specific radial menu, which helps users understand the difference between enemy and ally interactions as mentioned in the PR objectives.
305-311
: Updated radial menu optionsReplaced the cancel icon with alliance and betray icons, which reflects the current functionality where the menu is closed by right-clicking instead of using a dedicated close button, as specified in the PR objectives.
338-341
: Added chat icon to info menuThe addition of the chat icon supports the quick chat functionality mentioned in the PR objectives.
354-359
: Added trade control to info menuThe new trade icon explains how to start/stop trading with other players, aligning with the PR objective of updating trade information.
389-392
: Added donate gold icon to ally info menuThis addition clearly explains the ally gold donation feature mentioned in the PR objectives.
471-552
: Improved player icons section with new layout and iconsRestructured the player icons section with a more organized layout and added new icons for embargo and alliance requests. This provides clearer visual examples of in-game indicators.
481-485
: Updated crown icon image pathChanged from number1.webp to crown.webp, which better represents the icon's purpose and aligns with its description.
Fixed the texts |
## Description: Overwritten images (same file name) from PR #785 took more than a day to all be shown in Instructions (helpModal) on .dev. Prevent this from happening on commit to prod by renaming them. There's talk about cache busting but that isn't implemented (yet) for now. Two of the 7 renamed ones:  ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: tryout33
## Description: New images in Instructions where needed for: - event panel: wasn't mentioned yet - infopanel changed: quick chat, donate gold, stop/start trading etc - player icons: traitor, embargo, requesting alliance - radial menu: now differs between enemy/ally - leaderboard: was changed - options: time display was changed, cookie preferences button is now visible so kept that in the new image Some justifcations of part of the textual changes: - Trade: info was already behind and now updated to include changes from PR #707 - Retreats: weren't yet mentioned. Added this to new info about Event panel. Including #699, and not-yet-but-soon merged PR #740 and #705 - Radial Menu: close button has been replaced, explain that right-clicking closes it now. - Traitor: being a traitor and its consequences, like the changed defense debuff and effects on trade. - SAM: launcher hit chanches % changed. - Port: Battleships > Warships and other changes. - Warship: made more clear that only enemy trade ships/warships/boats are captured/destroyed. Made 'attack-click' more clear. - Boat: the word Boat was used, not Transport ship. While on server and in code it is called a Transport (ship) too. Tried to clear this up. Since it is now explained n Instructions, it doesn't have to be clarified per se elsewhere. Like in Build menu for Warship it says "Captures trade ships, destroys ships and boats" which can stay this way as it is now assumed knowledge that boat = transport. - More uniform capitalisation for 'Openfront' terms: capitalization was used differently across terms like Info panel and build menu, Alternate view and Alternate View. Other instances are more ambiguous like "Small explosive bomb that destroys territory, buildings, ships and boats" which i kept as is. - Embargo: the word 'embargo' was deliberately removed earlier, because it wasn't always understood by target audience (#147). But some remnants were left. Using 'stop trading' in all but one spot now: it's used as one-word explanation for the Dollar stop sign player icon, just like other icons also have short 'Ally' 'Traitor' etc. So the players who do use the word embargo still have one reference left. - Build menu: left Warship description as is (see 'Boat:' above). Updated Port description from "Sends trade ships to allies to generate gold" to "Sends trade ships to generate gold". Trade is not only with allies anymore. And there's more details that are in Instructions like the effects stop/start trading, that don't have to be in the Build menu. This lessens the chances of having to change the Port description in Build menu again. - Player info: changed "Embargo against you" to "Stopped trade with you" (see 'Embargo:' above). Keys that need to be (re)translated in MLS: - NEW keys: info_chat, info_trade, ally_donate_gold, build_menu_desc, icon_embargo, icon_request, ui_playeroverlay, ui_playeroverlay_desc, ui_events, ui_events_desc, ui_events_alliance, ui_events_attack, ui_events_quickchat - UPDATED keys: info_enemy_desc, ally_betray, build_port_desc, build_warship_desc, build_sam_desc, icon_crown, icon_traitor, radial_boat, radial_build, build_menu.desc.port, embargo, option_settings, build_defense_desc, radial_desc, ui_leaderboard_desc Font looks weird in screenshots because of zoom 40% in browser to capture it all:       ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: tryout33 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **New Features** - Added new UI elements and icons for alliance requests, embargo status, and gold donation in the help modal and player info panels. - Introduced detailed sections in the help modal for events, player overlays, and expanded build menu explanations. - **Improvements** - Enhanced and clarified descriptions for leaderboard, event panels, player overlays, ally betrayal, and build menu items. - Improved visual grouping, layout, and styling consistency in the help modal and across UI icons. - **Style** - Updated and unified image and icon styles for consistent appearance in the help modal. - Added new CSS classes for modal images and icons; removed fixed-size radial menu image style. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Description:
New images in Instructions where needed for:
Some justifcations of part of the textual changes:
Trade: info was already behind and now updated to include changes from PR Feat : Auto remove embargoes that were automatically created #707
Retreats: weren't yet mentioned. Added this to new info about Event panel. Including Feat : focus unit when clicking on warnings in chat #699, and not-yet-but-soon merged PR Feat : focus attack average position and some movement camera fixes #740 and Boat retreat #705
Radial Menu: close button has been replaced, explain that right-clicking closes it now.
Traitor: being a traitor and its consequences, like the changed defense debuff and effects on trade.
SAM: launcher hit chanches % changed.
Port: Battleships > Warships and other changes.
Warship: made more clear that only enemy trade ships/warships/boats are captured/destroyed. Made 'attack-click' more clear.
Boat: the word Boat was used, not Transport ship. While on server and in code it is called a Transport (ship) too. Tried to clear this up. Since it is now explained n Instructions, it doesn't have to be clarified per se elsewhere. Like in Build menu for Warship it says "Captures trade ships, destroys ships and boats" which can stay this way as it is now assumed knowledge that boat = transport.
More uniform capitalisation for 'Openfront' terms: capitalization was used differently across terms like Info panel and build menu, Alternate view and Alternate View. Other instances are more ambiguous like "Small explosive bomb that destroys territory, buildings, ships and boats" which i kept as is.
Embargo: the word 'embargo' was deliberately removed earlier, because it wasn't always understood by target audience (feat: rename embargo to start/stop trading #147). But some remnants were left. Using 'stop trading' in all but one spot now: it's used as one-word explanation for the Dollar stop sign player icon, just like other icons also have short 'Ally' 'Traitor' etc. So the players who do use the word embargo still have one reference left.
Build menu: left Warship description as is (see 'Boat:' above). Updated Port description from "Sends trade ships to allies to generate gold" to "Sends trade ships to generate gold". Trade is not only with allies anymore. And there's more details that are in Instructions like the effects stop/start trading, that don't have to be in the Build menu. This lessens the chances of having to change the Port description in Build menu again.
Player info: changed "Embargo against you" to "Stopped trade with you" (see 'Embargo:' above).
Keys that need to be (re)translated in MLS:
Font looks weird in screenshots because of zoom 40% in browser to capture it all:





Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
tryout33
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Improvements
Style