Skip to content

feat: Expand maps button#4431

Open
bijx wants to merge 3 commits into
mainfrom
expand-maps-button
Open

feat: Expand maps button#4431
bijx wants to merge 3 commits into
mainfrom
expand-maps-button

Conversation

@bijx

@bijx bijx commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Description:

QoL fix w.r.t. "All" maps category. Maps used to all be shown in a big list, now the category sections need to be expanded one by one. Categories are super clean and useful, but to visually see and pick maps when you're not certain which one you want to play becomes challenging (to click and expand each category manually). This just adds a simple "Expand All" and "Collapse All" button to the all category list on Solo and Private Match screens.

Screen.Recording.2026-06-27.190000.mp4

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

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

bijx

@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

MapPicker adds a new allCategories getter and toggleExpandAll() method to manage expand/collapse state. The renderExpandToggle() uses these, and render() restructures the tab area to show the toggle only on the "all" tab. Two i18n keys are added.

Changes

MapPicker Expand/Collapse All

Layer / File(s) Summary
allCategories getter, toggleExpandAll, and i18n keys
src/client/components/map/MapPicker.ts, resources/lang/en.json
New allCategories getter returns mapCategoryOrder without "featured". New toggleExpandAll() sets expandedCategories to either empty or full set. Two new translation keys collapse_all and expand_all are added.
renderExpandToggle and render() tab area update
src/client/components/map/MapPicker.ts
renderExpandToggle() now maps over this.allCategories and calls toggleExpandAll(). The render() tab area wraps the tablist in a flex row and shows the expand toggle only when activeTab === "all".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

📂 All open, all shut—just one little tap,
Categories fold neatly or fill every gap.
allCategories gathered, no "featured" in sight,
A toggle that flips with clean TypeScript delight.
Expand, collapse, compose—keep the logic tight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description matches the code changes, covering the new expand/collapse all controls and the added localization string.
Title check ✅ Passed The title matches the main feature change: adding expand/collapse all behavior for maps.

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.

@bijx bijx changed the title Expand maps button feat: Expand maps button Jun 27, 2026
@bijx bijx added this to the v33 milestone Jun 27, 2026

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

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/client/components/map/MapPicker.ts`:
- Around line 78-83: The toggleExpandAll logic in MapPicker is treating any
non-empty expandedCategories Set as “all expanded,” so a partially expanded
state collapses instead of expanding the remaining categories. Update
toggleExpandAll and the related label/rendering logic to compare
expandedCategories.size against allCategories.length, and only collapse when
every category is expanded; otherwise expand all remaining categories.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0ec7531b-03cf-4ff3-8cef-65cc870b4053

📥 Commits

Reviewing files that changed from the base of the PR and between 6b95a23 and 0893677.

📒 Files selected for processing (2)
  • resources/lang/en.json
  • src/client/components/map/MapPicker.ts

Comment thread src/client/components/map/MapPicker.ts
@github-project-automation github-project-automation Bot moved this from Triage to Development in OpenFront Release Management Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development

Development

Successfully merging this pull request may close these issues.

1 participant