feat: improve REST API reference scanability - #1034
Conversation
Vercel PreviewPreview URL: https://docs-portal-701emgk7s-agora-gdxe.vercel.app |
This reverts commit 68e8823.
|
After visual review, we do not want to continue with the current custom schema UI direction as the final design. The intended direction is to follow the current Fumadocs OpenAPI visual grammar and interaction model—information density, field semantics, nested-schema navigation, filtering, and responsive composition—while applying the Agora design system for color, typography, spacing, borders, radii, focus treatment, and dark mode. There is valuable work in this PR that should be retained as implementation reference, especially the sticky examples rail, syntax highlighting, response organization, quieter anchors, locale-aware behavior, and regression coverage. However, the custom field renderer has diverged too far from Fumadocs and produces an overly heavy and long mobile experience. In the reviewed 480 px route, the page was approximately 10,203 px tall versus approximately 5,325 px on the current production page. The replacement work and acceptance criteria are now tracked in #1041 so another contributor or agent can pick it up independently:
Please treat this PR as implementation and test reference for #1041 rather than as the accepted final field-design direction. This comment does not close the PR or discard its reusable work. |
|
Implemented the Fumadocs-aligned schema direction in 2cf8d3f (with design context in 8e42347).
Verification:
|
|
Re-reviewed the final PR head ( Rendered coverage included representative endpoints from Cloud Recording, Cloud Transcoding, Media Gateway, RTC, and Speech-to-Text, with desktop, 1200 px, and 480 px light/dark checks. I verified deep request/response schemas, property filters, field permalinks, endpoint copy, bounded code-sample scrolling, responsive rail behavior, and document-level overflow. I found no blocking UI or behavior regressions across that coverage. Verification on the final head:
The final implementation stays on the official Fumadocs One scope confirmation remains for @Jiayi-Ye02: commits |
|
Follow-up review on the updated head ( Nested object schemas now render recursively inline across request bodies, response bodies, and object-shaped parameters. Nested The implementation remains on the official Fumadocs Rendered verification covered the deep Conversational AI Join schema at 1440 px and 480 px, plus representative Cloud Recording, RTC, and Speech-to-Text REST endpoints. I found no document-level horizontal overflow, schema popovers, or object-type trigger buttons. The accepted tradeoff is page length: the Conversational AI route grows to approximately 41,873 px on desktop and 51,697 px on mobile because all nested fields are present and searchable. Verification:
The repository-wide test run still reports unrelated pre-existing content-audit failures outside this renderer change. The new Vercel Preview checks are currently queued/in progress, not failed. The earlier content-scope question remains open for @Jiayi-Ye02: please confirm whether |
|
Implemented the two merge-blocking follow-ups in
Verification:
The full From this review's scope, the two blockers are resolved and the PR is ready for merge once the current CI/deploy checks finish successfully. |
shczhen
left a comment
There was a problem hiding this comment.
Approved. The dotted-path native find behavior and semantic status-color tokens are now addressed, and the focused tests, type checks, production build, and responsive browser verification are satisfactory.
|
Re-reviewed the latest head ( I found merge-blocking regressions in the new increment, so I am not approving this head yet:
Verification on the exact head:
A focused test run reports 255/256 passing because the generated-language code-viewport assertion does not observe the effect-applied attribute in this local test environment. I reproduced the same failure at the previously approved fixed point, while the deployed DOM has the expected attribute, so I am not attributing that failure to this increment. Once the three items above are resolved, I can re-review and approve. |
|
Resolved in
Verification:
|
Summary
Verification
bun run test src/styles/app-css-regressions.test.ts src/components/openapi/OpenApiFieldRow.test.tsx src/components/openapi/OpenApiSchemaTree.test.tsx src/components/openapi/FumadocsOpenApiContent.test.tsx src/components/openapi/OpenApiCodePreview.test.tsx src/components/openapi/OpenApiExamplesRail.test.tsx src/components/openapi/OpenApiResponses.test.tsx src/lib/openapi/anchors.test.ts src/lib/openapi/response-view.test.ts src/lib/openapi/schema-tree.test.tsbun run types:checkbunx biome checkon all 20 changed files