Skip to content

feat: #112 Add more mercenary team options#113

Merged
ianpaschal merged 1 commit intodevelopfrom
feat-112-add-more-mercenary-team-options
Jul 9, 2025
Merged

feat: #112 Add more mercenary team options#113
ianpaschal merged 1 commit intodevelopfrom
feat-112-add-more-mercenary-team-options

Conversation

@ianpaschal
Copy link
Owner

@ianpaschal ianpaschal commented Jul 8, 2025

Summary by CodeRabbit

  • New Features

    • Added support for new custom flag codes: Landsknechte, Mercenaries, Pirates, and United Nations, including unique flag styles and names.
    • Updated country selection options to include these new teams.
  • Refactor

    • Improved styling by migrating flag styles to a CSS module and updating component logic for handling custom flag codes.
  • Chores

    • Updated spellchecker settings to recognize "Landsknechte".

@vercel
Copy link

vercel bot commented Jul 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
combat-command ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 8, 2025 7:43pm

@coderabbitai
Copy link

coderabbitai bot commented Jul 8, 2025

Walkthrough

This change introduces new codes and names for mercenary teams ("Landsknechte," "Mercenaries," "Pirates") and "United Nations" throughout the codebase. It updates display logic, flag rendering, and country options to support these entities, including new styles and code refactoring to accommodate the additions.

Changes

Files/Paths Change Summary
.vscode/settings.json Added "Landsknechte" to cSpell recognized words.
src/components/generic/FlagCircle/FlagCircle.module.scss Added new SCSS module for circular flag styles, including custom flag backgrounds for new codes.
src/components/generic/FlagCircle/FlagCircle.scss Removed old global SCSS stylesheet for FlagCircle.
src/components/generic/FlagCircle/FlagCircle.tsx Switched to CSS modules, added support for new custom codes, updated logic and classes for custom flags.
src/utils/common/getCountryName.ts Updated to return new names for codes: 'xx-lkt', 'xx-mrc', 'xx-prt', 'un'; refactored lookup logic.
src/utils/common/getCountryOptions.ts Replaced 'merc' with new codes for mercenary teams and UN in country options.

Possibly related issues

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error https://github.com/npm/cli/issues
npm error A complete log of this run can be found in: /.npm/_logs/2025-07-08T19_42_55_048Z-debug-0.log

✨ Finishing Touches
  • 📝 Generate Docstrings

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

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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 85245b1 and d89885d.

⛔ Files ignored due to path filters (4)
  • src/components/generic/FlagCircle/customFlags/1x1/xx-lkt.svg is excluded by !**/*.svg
  • src/components/generic/FlagCircle/customFlags/1x1/xx-prt.svg is excluded by !**/*.svg
  • src/components/generic/FlagCircle/customFlags/4x3/xx-lkt.svg is excluded by !**/*.svg
  • src/components/generic/FlagCircle/customFlags/4x3/xx-prt.svg is excluded by !**/*.svg
📒 Files selected for processing (6)
  • .vscode/settings.json (1 hunks)
  • src/components/generic/FlagCircle/FlagCircle.module.scss (1 hunks)
  • src/components/generic/FlagCircle/FlagCircle.scss (0 hunks)
  • src/components/generic/FlagCircle/FlagCircle.tsx (2 hunks)
  • src/utils/common/getCountryName.ts (1 hunks)
  • src/utils/common/getCountryOptions.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • src/components/generic/FlagCircle/FlagCircle.scss
🔇 Additional comments (7)
.vscode/settings.json (1)

11-11: LGTM: Spell checker update for new terminology.

Adding "Landsknechte" to the spell checker dictionary aligns with the new mercenary team code xx-lkt introduced in this PR.

src/utils/common/getCountryOptions.ts (1)

49-55: All new country codes handled consistently across the codebase

Verified that:

  • In src/utils/common/getCountryOptions.ts (lines 49–55)
  • In src/utils/common/getCountryName.ts (codes mapped with if (code === ...))
  • In src/components/generic/FlagCircle/FlagCircle.tsx (flag icons for each code)

the codes xx-lkt, xx-mrc, xx-prt, and un are correctly referenced. No missing usages detected—ready to merge.

src/components/generic/FlagCircle/FlagCircle.module.scss (1)

28-30: xx-prt.svg files verified
Found in:

  • src/components/generic/FlagCircle/customFlags/1x1/xx-prt.svg
  • src/components/generic/FlagCircle/customFlags/4x3/xx-prt.svg

No further action required.

src/utils/common/getCountryName.ts (2)

4-15: Excellent handling of new mercenary team codes.

The new cases are clearly defined and the naming is consistent with the codes added to getCountryOptions.ts.


16-19: Good simplification of subdivision logic.

The refactored logic using includes('-') is cleaner and more maintainable than the previous nested structure.

src/components/generic/FlagCircle/FlagCircle.tsx (2)

21-28: Excellent migration to CSS modules with proper data attribute usage.

The component correctly uses CSS modules and the data-code attribute aligns perfectly with the CSS selectors in the module file.


4-4: Good migration from global CSS to CSS modules.

The change from global stylesheet to CSS modules improves maintainability and avoids potential style conflicts.

@ianpaschal ianpaschal merged commit e681f8d into develop Jul 9, 2025
4 checks passed
@ianpaschal ianpaschal deleted the feat-112-add-more-mercenary-team-options branch July 9, 2025 05:20
ianpaschal added a commit that referenced this pull request Jul 18, 2025
* Update update-project-status.yml

* Update updateProjectStatus.js

* fix: Toast text does not wrap (#87)

* fix: #86 Sanitize sign in/sign up inputs (#91)

* feat: #32 Auto generate avatars & refactor users (#90)

* feat: Improve <TournamentDetailPage/> default tab

* feat: Improve <TournamentCard/> styling

* Update mockData.ts

* feat: #94 Improve <AccordionItem/> disabled state (#97)

* feat: #95 Hide completed pairings from match check-in (#96)

* bug: #93 Preserve <TournamentPairingsGrid/> internal state (#98)

* feat: #101 Add player count to roster (#103)

* feat: Show full player names when tournaments require it

* feat: Add activePlayerCount to deep tournaments

* feat: Sort tournament competitors by name

* task: #100 Clean-up .card mixin (#102)

* feat: #99 Improve tournament competitor edit dialog (#104)

* feat: #106 Improve signIn error handling (#107)

* Update convex/_model/tournamentCompetitors/queries/getTournamentCompetitorsByTournament.ts

* Update convex/_model/users/_helpers/checkUserTournamentForcedName.ts

* feat: Hide players with 0 matches from rankings

* feat: #112 Add more mercenary team options (#113)

* feat: #110 Add manual table assignments (#111)

* fix: Ensure round 0 rankings can be included

* Refactor tournament actions (#114)

* refactor: Improve tournament actions

* chore: Clean-up Convex errors

* fix: Do not try to clean up current round timer on tournament end

* fix: Don't allow players to be removed from tournament

* chore: Update test tournament banner image

* Update TournamentCard.tsx

* fix: Ensure round 0 rankings can be included

* fix: Fix end tournament round context menu behavior

* chore: Improve mock match result creation

* feat: Allow matchResult.playedAt to be date string or number

* feat: #115 Hide match result battle plans (#116)

* feat: Set page title based on <PageWrapper/> title prop

* fix: Use <IdentityBadge/> to fix player name spacing on match results

* fix: Correctly include match results relevant to a tournament
ianpaschal added a commit that referenced this pull request Jul 24, 2025
* Update update-project-status.yml

* Update updateProjectStatus.js

* fix: Toast text does not wrap (#87)

* fix: Sanitize sign in/sign up inputs (#91)

#86

* feat: #32 Auto generate avatars & refactor users (#90)

* feat: Improve <TournamentDetailPage/> default tab

* feat: Improve <TournamentCard/> styling

* Update mockData.ts

* feat: Improve <AccordionItem/> disabled state (#97)

#94

* feat: Hide completed pairings from match check-in (#96)

#95

* bug: Preserve <TournamentPairingsGrid/> internal state (#98)

#93

* feat: #101 Add player count to roster (#103)

* feat: Show full player names when tournaments require it

* feat: Add activePlayerCount to deep tournaments

* feat: Sort tournament competitors by name

* task: Clean-up .card mixin (#102)

#100

* feat: #99 Improve tournament competitor edit dialog (#104)

* feat: #106 Improve signIn error handling (#107)

* Update convex/_model/tournamentCompetitors/queries/getTournamentCompetitorsByTournament.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update convex/_model/users/_helpers/checkUserTournamentForcedName.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat: Hide players with 0 matches from rankings

* feat: #112 Add more mercenary team options (#113)

* feat: #110 Add manual table assignments (#111)

* fix: Ensure round 0 rankings can be included

* Refactor tournament actions (#114)

* refactor: Improve tournament actions

* chore: Clean-up Convex errors

* fix: Do not try to clean up current round timer on tournament end

* fix: Don't allow players to be removed from tournament

* chore: Update test tournament banner image

* Update TournamentCard.tsx

* fix: Ensure round 0 rankings can be included

* fix: Fix end tournament round context menu behavior

* chore: Improve mock match result creation

* feat: Allow matchResult.playedAt to be date string or number

* feat: #115 Hide match result battle plans (#116)

* feat: Set page title based on <PageWrapper/> title prop

* fix: Use <IdentityBadge/> to fix player name spacing on match results

* fix: Correctly include match results relevant to a tournament

* feat: #57 Implement basic dashboard (#119)

* fix: Remove double border on dashboard sections

* fix: Add key to dashboard tournaments

* feat: Improve <TournamentPairingRow/> styling

* fix: Remove extraneous error message

* fix: Improve <Form/> isDirty calculation

* fix: Render all competitors in <TournamentCompetitorForm/>

* fix: Also show empty state if rankings are empty

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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