Skip to content

add openfront copyright to loading screen - #2151

Merged
evanpelle merged 1 commit into
mainfrom
evan-openfront
Oct 8, 2025
Merged

evanpelle merged 1 commit into
mainfrom
evan-openfront

Conversation

@evanpelle

@evanpelle evanpelle commented Oct 8, 2025 •

Copy link
Copy Markdown
Collaborator

Description:

This will make the copyright notice more clear.

Screenshot 2025-10-07 at 6 03 44 PM

Please complete the following:

  • I have added screenshots for all UI updates
  • I process any text displayed to the user through translateText() and I've added it to the en.json file
  • I have added relevant tests to the test directory
  • I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced

Please put your Discord username so you can be contacted if a bug or regression is found:

evan

@evanpelle
evanpelle requested a review from a team as a code owner October 8, 2025 01:04
@coderabbitai

coderabbitai Bot commented Oct 8, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Adds a new translation key code_license in en.json and updates GameStartingModal to render a copyright line, a code license heading, and then the previous title text, along with a new .copyright style and adjusted content order.

Changes

Cohort / File(s) Summary
Localization: game_starting_modal
resources/lang/en.json
Added game_starting_modal.code_license: "Code licensed under AGPL-3.0". No removals or other key changes.
UI: GameStartingModal render + styles
src/client/GameStartingModal.ts
Added .copyright style block; updated render order: copyright → code license heading → previous title as paragraph; inserted new i18n key usage.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Modal as GameStartingModal
  participant I18N as i18n
  participant UI as DOM

  User->>Modal: Open modal
  Modal->>I18N: get("game_starting_modal.code_license")
  I18N-->>Modal: "Code licensed under AGPL-3.0"
  Modal->>UI: Render sections in order:
  Note right of UI: 1) Copyright line\n2) Code license heading\n3) Previous title as paragraph
  UI-->>User: Updated modal content visible
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

New words stitched into the modal’s gown,
A quiet license takes its crown.
Copyright first, then code’s decree,
Title follows, calm and free.
Small tweaks align the opening scene—
Clear, composed, and evergreen.

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly summarizes the primary change of adding a copyright notice to the loading screen in a concise and readable way. It directly reflects the modifications made to the GameStartingModal component and the related translation updates. The phrasing is specific enough for teammates to understand the key update without extraneous details.
Description Check ✅ Passed The description explains that the change improves the visibility of the copyright notice, includes a screenshot of the updated loading screen, and confirms that translation keys and tests have been added. This content directly relates to the modifications in GameStartingModal.ts and resources/lang/en.json. The details align with the actual UI and translation updates and are not off-topic, so the description passes the lenient relevance check.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@evanpelle evanpelle added this to the v26 milestone Oct 8, 2025
@evanpelle
evanpelle merged commit 0f79060 into main Oct 8, 2025
1 of 2 checks passed
@evanpelle
evanpelle deleted the evan-openfront branch October 8, 2025 01:06

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 469a14d and 442b56b.

📒 Files selected for processing (2)
  • resources/lang/en.json (1 hunks)
  • src/client/GameStartingModal.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Deploy to openfront.dev
🔇 Additional comments (1)
resources/lang/en.json (1)

252-252: LGTM!

The translation key is correctly added and the license text is appropriate.

Comment on lines +87 to +92

.copyright {
font-size: 32px;
margin-top: 20px;
opacity: 1;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Font size appears too large for a copyright notice.

The font-size: 32px for the copyright text is unusually large. Copyright notices are typically displayed in smaller text (e.g., 10-14px). Also, opacity: 1 is redundant since it's the default value.

Consider this adjustment:

 .copyright {
-  font-size: 32px;
+  font-size: 12px;
   margin-top: 20px;
-  opacity: 1;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.copyright {
font-size: 32px;
margin-top: 20px;
opacity: 1;
}
.copyright {
font-size: 12px;
margin-top: 20px;
}
🤖 Prompt for AI Agents
In src/client/GameStartingModal.ts around lines 87 to 92, the copyright selector
sets an oversized font-size (32px) and includes a redundant opacity: 1; change
the font-size to a smaller, conventional value (e.g., 12px–14px) appropriate for
legal/copyright text and remove the opacity declaration to clean up the CSS; if
spacing needs adjustment, tweak margin-top modestly rather than increasing font
size.

Comment on lines +98 to +100
<div class="copyright">© OpenFront</div>
<h5>${translateText("game_starting_modal.code_license")}</h5>
<p>${translateText("game_starting_modal.title")}</p>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Use translateText() for the copyright notice.

The copyright text © OpenFront is hardcoded but should be processed through translateText() and added to en.json, as per the PR checklist requirement: "Process all displayed text through translateText() and add it to en.json".

Apply this diff:

-<div class="copyright">© OpenFront</div>
+<div class="copyright">${translateText("game_starting_modal.copyright")}</div>

Then add this key to resources/lang/en.json in the game_starting_modal section:

 "game_starting_modal": {
   "title": "Game is Starting...",
+  "copyright": "© OpenFront",
   "code_license": "Code licensed under AGPL-3.0",
   "desc": "Preparing for the lobby to start. Please wait."
 },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div class="copyright">© OpenFront</div>
<h5>${translateText("game_starting_modal.code_license")}</h5>
<p>${translateText("game_starting_modal.title")}</p>
<div class="copyright">${translateText("game_starting_modal.copyright")}</div>
<h5>${translateText("game_starting_modal.code_license")}</h5>
<p>${translateText("game_starting_modal.title")}</p>
🤖 Prompt for AI Agents
In src/client/GameStartingModal.ts around lines 98 to 100 the copyright string
is hardcoded as "© OpenFront"; replace it with
translateText("game_starting_modal.copyright") so all displayed text goes
through translation, and then add a corresponding key "copyright": "© OpenFront"
under the game_starting_modal section in resources/lang/en.json.

This branch was previously deployed

1 inactive deployment
staging — 442b56b6 Deployed Oct 8, 2025 by openfrontio[bot]
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