Skip to content

Web: sub-community drill-down dropdown on community breadcrumbs#9229

Open
kevinortiz43 wants to merge 6 commits into
developfrom
web/feature/community-subcommunity-dropdown
Open

Web: sub-community drill-down dropdown on community breadcrumbs#9229
kevinortiz43 wants to merge 6 commits into
developfrom
web/feature/community-subcommunity-dropdown

Conversation

@kevinortiz43

@kevinortiz43 kevinortiz43 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Adds a searchable dropdown as the last item inside the community-page breadcrumbs. It lists the current community's direct sub-communities and navigates to the selected one.

Fixes #5545

  • New SubCommunitiesDropdown — a MUI Button + Menu with a search field and a filterable item list.
  • Reuses the existing useListSubCommunities / listCommunities query and its pages are drained via fetchNextPage so all children load, then the count gates rendering.
  • Responsive: on mobile the breadcrumb row stacks above a centered Join/Leave button

Testing

Verified against online staging (next.couchershq.org) with Playwright, logged in:

  • Added SubCommunitiesDropdown.test.tsx (5 tests). Added a listCommunities mock to DiscussionPage.test.tsx since it renders the shared sub-header

Web frontend checklist

  • There are no console warnings when running the app
  • Added tests where relevant
  • Clicked around my changes running locally and it works
  • Checked Desktop, Mobile and Tablet screen sizes

For maintainers

  • Maintainers can push commits to my branch
  • Maintainers can merge this PR for me

This PR was created with the Couchers PR skill.

Adds a searchable MUI dropdown next to the community-page breadcrumbs that
lists the current community's direct sub-communities and navigates to the
selected one, letting users move down the geographic tree (not just up via
the existing breadcrumb links). The dropdown is hidden on leaf communities,
its label is derived from the children's node type, and it reuses the
existing ListCommunities query. Also mocks that query in DiscussionPage's
test since it renders the shared community sub-header.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kevinortiz43
kevinortiz43 requested a review from nabramow as a code owner July 3, 2026 14:47
@CouchersBot

CouchersBot commented Jul 3, 2026

Copy link
Copy Markdown
Member

Mobile

Install the Dev Tool (iOS via TestFlight, iOS Simulator, or Android .apk) here.

Scan the QR with your phone camera, or tap Open in Dev Tool on the device, to open this branch in the installed Dev Tool dev client.

    iOS         Android    
    QR to open the iOS build         QR to open the Android build    
    Open in Dev Tool         Open in Dev Tool    
Deep links

iOS

couchers-devtool://expo-development-client/?url=https%3A%2F%2F6ac80885--ota.preview.couchershq.org%2Fios%2Fmanifest

Android

couchers-devtool://expo-development-client/?url=https%3A%2F%2F6ac80885--ota.preview.couchershq.org%2Fandroid%2Fmanifest

Web (Vercel)

View the Vercel web preview for this branch.

Backend

Schema Schema diff Sample emails

Other

Protos Backend coverage Web coverage

@nabramow

nabramow commented Jul 6, 2026

Copy link
Copy Markdown
Member

When I have my language set to a longer language like German, and go in mobile view, the breadcrumbsa re overlapping with the button, we need to come up with a design solution for this:

Screenshot 2026-07-06 at 10 35 13

@nabramow

nabramow commented Jul 6, 2026

Copy link
Copy Markdown
Member

Two things here:

  1. As I type in this search, the width of the menu increases. It should stay the same width the whole time.
  2. On mobile view, the placeholder text is cut off initially. Maybe it needs to be something shorter? Just "Location" perhaps?
Screenshot 2026-07-06 at 10 36 56

@nabramow

nabramow commented Jul 6, 2026

Copy link
Copy Markdown
Member

This also looks a little weird on mobile. Maybe we do conditional design for mobile and make the breadcrumbs the first row and the button the second row. I think there's not enough space for both on the same screen. So can do some kinda 'display: flex, flex-direction: row' for mobile only.

Screenshot 2026-07-06 at 10 39 15

Open to other ideas I just feel something needs to be a bit different here for mobile view.

@jesseallhands jesseallhands 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.

I really like how this is looking! Great job!

I agree with the points Nicole made. I would suggest that the "leave community"/"join community" button not only appears in a separate row below the breadcrumbs on mobile, but also is a button with a single line of text rather than a button with 2 rows of text since two rows result in it taking up more real estate.

@kevinortiz43

Copy link
Copy Markdown
Contributor Author

I think when I checked the android version I didn't think to check the other languages. let me fix or see what I can do @nabramow

- Mobile: stack the join/leave button onto its own row below the breadcrumbs so
  long translated labels (e.g. German) no longer overlap the dropdown trigger.
- Keep the join/leave button label on a single line.
- Give the search menu a fixed width so it no longer reflows while typing.
- Shorten the mobile search placeholder to "Location".

Addresses review feedback on #9229.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kevinortiz43

Copy link
Copy Markdown
Contributor Author

@nabramow I have fixed the mobile width for German, and other languages. Can you double check.

@nabramow

nabramow commented Jul 9, 2026

Copy link
Copy Markdown
Member

@kevinortiz43 I fear this still looks a bit awkward on mobile. For example with the "select area" having a gap in space on the left, and the way it's going on 3 lines. What if we:

  1. Also make the fontSize slightly smaller on mobile view only so the text fits more
  2. Center the "Leave community" button
  3. Do something so that if it wraps to the next line, there's not a space to the left?
Screenshot 2026-07-09 at 10 42 31

Also wondering if @jesseallhands has any better ideas. I think a slightly smaller font will help it wrap a bit though.

@kevinortiz43

Copy link
Copy Markdown
Contributor Author

@nabramow I think decreasing the font size should help but I am wondering if for mobile would it be worth calling the countries by their abbreviations. Such as EU for Europe, AFR for Africa, etc.

Address review feedback on the sub-community dropdown: on mobile the
breadcrumb chain now stays on a single line and scrolls horizontally
instead of wrapping (the "Select area" dropdown no longer drops to its
own line), the breadcrumb font is slightly smaller, and the join/leave
button sits on its own centered row below.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Let the community breadcrumb wrap whole crumbs onto the next line on
mobile rather than horizontally scrolling, so a long current-community
name is never truncated and the "Select area" dropdown stays visible.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kevinortiz43

Copy link
Copy Markdown
Contributor Author

@nabramow I think the issue is specifically europa africa and middle east is way too long. I tried setting it up in one line but it looks bad.
image

This is the fix I did.

image image image

@kevinortiz43

kevinortiz43 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@nabramow this is the other recommendation we can do for 320px

image

@nabramow

Copy link
Copy Markdown
Member

@kevinortiz43 I think the smaller font where it goes 2 rows instead of 3 is okay and left-aligns.

The "Join/Leave Community" button centered looks fine enough, but don't center the tabs, leave that as it is.

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.

Communities Breadcrumbs - add dropdown for more specific communities

4 participants