Skip to content

Conversation

VariableVince
Copy link
Contributor

@VariableVince VariableVince commented May 17, 2025

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 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:

  • 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:
Instructions 1
Instructions 2
Instructions 3
Instructions 4
Instructions 5

afbeelding

Please complete the following:

  • I have added screenshots for all UI updates
  • I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced
  • 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

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.

Copy link
Contributor

coderabbitai bot commented May 17, 2025

"""

Walkthrough

This 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

File(s) Change Summary
resources/lang/en.json Expanded and clarified UI and gameplay descriptions, added new sections for event panels, player overlays, and icons, updated terminology, and improved consistency across various descriptions.
src/client/HelpModal.ts Improved layout and styling, added new sections (Events, Player Overlay), expanded icon explanations, updated images, and unified content presentation in the help modal. No logic or control flow changes.
src/client/styles.css Removed .radial-menu-image class, added new classes for consistent image/icon sizing and masking in the help modal, and introduced specific icon masks for chat and donate gold icons.

Poem

In the HelpModal’s gentle light,
New icons shimmer, bold and bright.
Descriptions clear, the panels grow,
With CSS, a stylish flow.
Troops and trades now plainly told—
A rabbit’s guide, both wise and bold!
🐰✨
"""

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit 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.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit 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 Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


📜 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 b4bbfff and 2220592.

📒 Files selected for processing (1)
  • resources/lang/en.json (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • resources/lang/en.json
✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Commit Unit Tests in branch update-instructions
  • Post Copyable Unit Tests in Comment

🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need 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)

  • @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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @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: 0

🧹 Nitpick comments (1)
src/client/styles.css (1)

433-436: Duplicate emoji-icon class definition

The 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

📥 Commits

Reviewing files that changed from the base of the PR and between 07122f6 and 3d905cb.

📒 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 styling

Adding the default-image class ensures consistent display of help modal images with appropriate dimensions and scaling behavior.


339-351: Well-structured specialized image classes

The 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 styling

Adding the chat icon mask supports the new quick chat functionality mentioned in the PR objectives.


428-431: Good addition of donate gold icon styling

The 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 information

The updated description now includes troops alongside land and gold, providing more complete information to players.


43-47: Good addition of event panel descriptions

These 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 description

The updated description now provides clearer information about player types, attitudes, and defensive assets.


57-57: Updated radial menu closure method

Changed 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)" terminology

The 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" terminology

Changed "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 description

The 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 inclusive

Removed 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 description

The 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 descriptions

The 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 controls

The WASD keys are now displayed on separate lines, making the layout clearer and more visually organized.


119-120: Better formatting for ALT+R key combination

Improved formatting for the graphics reset key combination makes it more readable.


134-142: Consistent styling with font-bold and default-image classes

Added 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 section

This 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 section

The 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 view

Added 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 options

Replaced 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 menu

The addition of the chat icon supports the quick chat functionality mentioned in the PR objectives.


354-359: Added trade control to info menu

The 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 menu

This addition clearly explains the ally gold donation feature mentioned in the PR objectives.


471-552: Improved player icons section with new layout and icons

Restructured 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 path

Changed from number1.webp to crown.webp, which better represents the icon's purpose and aligns with its description.

@VariableVince
Copy link
Contributor Author

Fixed the texts

@github-project-automation github-project-automation bot moved this from Triage to Final Review in OpenFront Release Management May 18, 2025
@evanpelle evanpelle merged commit 01ef525 into openfrontio:main May 18, 2025
6 checks passed
@github-project-automation github-project-automation bot moved this from Final Review to Complete in OpenFront Release Management May 18, 2025
@VariableVince VariableVince deleted the update-instructions branch May 18, 2025 21:11
evanpelle pushed a commit that referenced this pull request May 18, 2025
## 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:

![afbeelding](https://github.com/user-attachments/assets/71f95659-71ce-4504-9b21-bd02e67c0786)


## 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
scottanderson pushed a commit that referenced this pull request May 18, 2025
## 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:
![Instructions
1](https://github.com/user-attachments/assets/d349bb12-f0ec-407d-b29f-68b25cf98dc1)
![Instructions
2](https://github.com/user-attachments/assets/0d7753b7-99a6-41f3-99d7-182cf1ef57f3)
![Instructions
3](https://github.com/user-attachments/assets/9087f2e3-8e8e-4c77-8ec4-a2410e15d3d3)
![Instructions
4](https://github.com/user-attachments/assets/132c5b61-d211-4fbe-82a9-508feef1ad37)
![Instructions
5](https://github.com/user-attachments/assets/decde07b-9c63-4520-a845-109810c106a4)


![afbeelding](https://github.com/user-attachments/assets/10d12b20-48e9-406e-b3a3-01dbf5a76642)

## 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 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

4 participants