Skip to content

Collapse mobile category filters on dev tools page#18794

Open
pettinarip wants to merge 1 commit into
devfrom
mobile-collapsible-tool-filters
Open

Collapse mobile category filters on dev tools page#18794
pettinarip wants to merge 1 commit into
devfrom
mobile-collapsible-tool-filters

Conversation

@pettinarip

@pettinarip pettinarip commented Jul 14, 2026

Copy link
Copy Markdown
Member

Description

On mobile, the /developers/tools category filter rendered the full top-level category list expanded above the results, pushing content far down the page.

This wraps the mobile filter box in the existing Collapsible primitive, closed by default:

  • The trigger row shows the active selection and count ("Resource categories · 285" on the main page, or e.g. "Contract tooling · 73" on a category page) with a chevron that flips when open.
  • Inside the expanded panel, the "Resource categories" (all) link is hidden on the all-resources page where it duplicated the trigger label and linked to the current page; it remains on category pages as the way back to the unfiltered view (via new showAllLink prop on CategorySidebar).
  • Desktop sidebar is unchanged.

Verified at 390px viewport: collapsed by default, expands to the category tree, category navigation and subcategory filtering work, back-to-all reset works; desktop layout untouched. pnpm type-check and ESLint pass.

Preview: https://deploy-preview-18794.ethereum.it/developers/tools

The full top-level category list rendered expanded above the results on
mobile, pushing content far down the page. Wrap it in a Collapsible
(closed by default) whose trigger shows the active category and count.
@netlify

netlify Bot commented Jul 14, 2026

Copy link
Copy Markdown

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit e7fa846
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/6a563089ab84420008366870
😎 Deploy Preview https://deploy-preview-18794.ethereum.it
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 59 (🟢 up 3 from production)
Accessibility: 95 (no change from production)
Best Practices: 100 (no change from production)
SEO: 98 (no change from production)
PWA: 59 (🔴 down 1 from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@pettinarip pettinarip marked this pull request as ready for review July 14, 2026 12:55
@pettinarip pettinarip requested a review from wackerow as a code owner July 14, 2026 12:55
@github-actions

Copy link
Copy Markdown
Contributor

🔎 First-pass review — ✅ Looks mergeable

Wraps the mobile-only category filter box on /developers/tools in the existing Collapsible primitive (closed by default), with a trigger row that surfaces the active category + count and a chevron that flips on open. Desktop sidebar is untouched. Scope is tight (one file, +59/-30), conventions hold, and the refactor to a shared sidebarProps object keeps mobile/desktop in sync.

No blocking items. A couple of non-blocking notes are in the details.

Analysis

Lane: code (single file, app/[locale]/developers/tools/_components/ToolsCatalog.tsx).

Checked:

  • Collapsible/CollapsibleTrigger/CollapsibleContent are exported from src/components/ui/collapsible.tsx and imported correctly. Radix Collapsible.Root defaults to closed → matches "closed by default".
  • nf (line 209) and getCategoryLabel are in scope at the new trigger; counts use the numberFormat() wrapper per convention.
  • showAllLink={!!currentCategoryId} correctly hides the redundant "all resources" link on the all-resources page and keeps it as the back-to-all path on category pages. Desktop keeps the default showAllLink=true.
  • No unused vars/params introduced; no raw Intl.*; no new component where a prop suffices.

Non-blocking:

  • CollapsibleContent has no height/opacity transition, so the panel snaps open/closed. Fine, but a data-[state] animation would match the chevron transition if you want polish.
  • The desktop sidebar and mobile collapsible now render two CategorySidebar instances (both always mounted). Not a regression — it matches the prior structure — just noting the duplicated tree.

Checks: CI still running at review time; author reports type-check + ESLint pass locally. Routed for a quick design/UX glance on the mobile behavior.

Generated by PR Reviewer (team) for #18794 · 70.5 AIC · ⌖ 10.3 AIC · ⊞ 5.2K ·

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