newchange - #312
Closed
micmusjnr20 wants to merge 8 commits into
Closed
Conversation
|
@micmusjnr20 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
APISidebarNav.tsx and RedocViewer.tsx import their own .module.css files that were never committed, so the API reference page could not render at all (webpack fails to resolve the modules). Add the missing stylesheets with all class names referenced by each component. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
…de toggle On screens <= 1024px the sidebar and Redoc viewer overlapped because the fixed-height wrapper and overflow:hidden layout clipped both panes. Reorder the flex column so main content comes first (order 1) and the sidebar stacks below it (order 2), let content flow instead of clipping, and collapse the sidebar by default with a new toggle button in the search bar (aria-expanded/aria-controls) to show/hide it. The sidebar remains always-visible on desktop where the toggle is hidden. The page wrapper now uses min-height so mobile content flows past the fold. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
The project had no tsconfig, and 30 type errors prevented `tsc` from passing. Repair them: remove the `Record<string, CSSProperties>` annotations that made style helpers non-callable, move a `transition` prop into style on an SVG rect, fix null-handling and a dead shadowed method in redocDeepLink, and add the missing @site path mapping. Introduce a root tsconfig.json so `npm run type-check` can verify the whole project. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
Add a jsdom-based Vitest setup (matchMedia polyfill + jest-dom) and tests for the API reference page covering: the <= 1024px stylesheet stacks main content before the sidebar in a column with the sidebar hidden by default; the toggle button is hidden on desktop; clicking the toggle expands/collapses the sidebar on mobile; and the sidebar is visible by default on desktop. The RedocViewer (CDN-loaded) and @docusaurus/Link are stubbed so tests run headless. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
webpack >= 5.106 validates ProgressPlugin options strictly, which breaks webpackbar 6 (used by Docusaurus 3.9.2) and fails every build on Node >= 23; pin webpack to 5.105.0 via npm overrides until the project upgrades Docusaurus. Add vitest/jsdom/@testing-library devDependencies and npm scripts for tests and type-checking. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
fix: mobile API reference layout — sidebar stacks below content with show/hide toggle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #391
Closes #392
Closes #393
Closes #394
Summary
Fixes the API reference page (
/api) on small screens: the sidebar and the main Redoc content previously overlapped and were clipped instead of stacking, making the page unusable on phones. The sidebar now stacks below the main content on mobile and is collapsed by default, with a "Show endpoints / Hide endpoints" toggle button to expand it on demand. On desktop the layout is unchanged and the sidebar stays visible.Problem
height: calc(100vh - 120px)withoverflow: hiddenon the inner layout, so on mobile the 40vh sidebar + 60vh main content were clipped inside a fixed-height box — the two panes overlapped/overflowed instead of stacking.APISidebarNav.tsxandRedocViewer.tsximported.module.cssfiles that were never committed, so the page could not render at all (webpack "module not found" on build).Changes
Mobile layout (acceptance criteria 1 & 2)
src/components/ApiReference.module.css— at≤ 1024pxthe layout becomes a flex column with the main content first (order: 1) and the sidebar stacked below it (order: 2);overflow: visibleso nothing is clipped or overlapped; sidebar isdisplay: noneby default and shown via.sidebarOpen(max-height 60vh, scrollable).src/components/IntegratedApiReference.tsx— newsidebarOpenstate: collapsed by default on mobile (viamatchMedia('(max-width: 1024px)')), always open on desktop, and kept in sync on breakpoint changes. New toggle button in the search bar witharia-expanded/aria-controlsand clear label text ("Show endpoints" / "Hide endpoints").src/pages/api.tsx— wrapperheight→min-heightso mobile content flows past the fold.Prerequisite fixes (page could not render)
src/components/APISidebarNav.module.cssandsrc/components/RedocViewer.module.csswith all class names referenced by the components.Tests & checks (acceptance criteria 3 & 4)
npm test, 5 tests, all passing):aria-expandedtracks state.tsconfig.json+npm run type-check(tsc --noEmitpasses after fixing 30 pre-existing type errors — wrongRecord<string, CSSProperties>annotations making style helpers non-callable, atransitionprop on an SVG<rect>, null-handling and a dead shadowed method inredocDeepLink.ts, missing@sitepath mapping).Build
npm run buildnow passes. webpack>= 5.106validatesProgressPluginoptions strictly, which breaks webpackbar 6 (used by Docusaurus 3.9.2) — pinnedwebpack@5.105.0via npmoverridesuntil the project upgrades Docusaurus (the upstream fix landed in 3.10.1, but 3.10 turns on Rspack under this project'sfuture.v4flag, which is too risky for the custom webpack plugin).Testing
Notes
feature/api-dashboard-enhancementsbecause the files being fixed only exist on that branch (they are not inmainyet). Once the feature branch is merged tomain, this PR can be retargeted tomain.dashboard/sub-app has its own pre-existing type errors (itsnode_modulesis not installed in this environment) and is untouched by this change.