Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error responses are unexpectedly collapsed when user clicks outside their area #5357

Open
hkosova opened this issue Dec 6, 2024 · 0 comments
Labels
bug Issues reporting bugs. product/docs Fern Docs which builds and hosts a developer documentation site

Comments

@hkosova
Copy link

hkosova commented Dec 6, 2024

CLI Version (from fern.config.json)

0.45.0 (didn't check other versions)

Minimal API Specification

Docs must be configured with display-errors: true.

openapi: 3.1.0
info:
  title: Error responses
  version: 1.0.0

paths:
  /foos:
    get:
      summary: Get foo
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: string
                example: Success!
        '400':
          description: Oops
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

components:
  schemas:
    Error:
      type: object
      properties:
        code:
          type: integer
          example: 42
        message:
          type: string
          description: User-friendly error message.
          example: Lorem ipsum

Steps to Reproduce

  1. Open the API reference.
  2. Click the 400 response to expand it.
  3. Also expand the properties of the error object
  4. Click a blank area on the page.

Actual UI Behavior

  • Error response is unexpectedly collapsed. All of its nested properties that were previously expanded are also auto-collapsed.
  • Error response example is auto-replaced with success response example.
unexpected-collapsing.mov

Expected UI Behavior

  • Error response accordions stay expanded until the user explicitly collapses them.
    • I suggest not auto-collapsing errors even if the user expands another error - to reduce unnecessary interaction costs.
  • (Optional) Response example snippet continues displaying the error response, unless the user clicked within the content area of success response description.

Environment Details

Chrome on macOS 15

@hkosova hkosova added bug Issues reporting bugs. product/docs Fern Docs which builds and hosts a developer documentation site labels Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues reporting bugs. product/docs Fern Docs which builds and hosts a developer documentation site
Development

No branches or pull requests

1 participant