Skip to content

Build a params builder UX (form-based + raw-JSON) for ApiUsage test calls #150

Description

@greatest0fallt1me

Description

This is a UI/UX issue. The current ApiUsage parameters input is a single freeform JSON textarea that punishes mistakes. Build a form-based params builder that lets users add typed key/value rows with a one-click "Switch to raw JSON" escape hatch, and keep both modes synchronized.

Requirements and Context

  • Reference: src/ApiUsage.tsx parameters block
  • Each row exposes: key input, type selector (string/number/boolean), value input, remove button
  • "Add parameter" button below the rows; live count of params shown next to the heading
  • Switching from form -> raw should serialize current rows; raw -> form should attempt to parse and surface errors inline
  • Must be secure, tested, and documented
  • Should be efficient and easy to review

Suggested Execution

  1. Fork the repo and create a branch
    git checkout -b feature/api-usage-params-builder
  2. Implement changes
    • src/components/ParamsBuilder.tsx — new component owning rows state
    • src/ApiUsage.tsx — host the builder, lifted state for current params
    • src/index.css.params-builder__row grid styles with token-driven borders
  3. Test and commit
    • Manually add/remove/edit rows and verify the serialized JSON matches
    • Toggle to raw, mutate, toggle back — assert errors are surfaced inline
    • npm test

Example commit message

feat: add form-based params builder to ApiUsage

Acceptance Criteria

  • Form and raw modes round-trip without data loss
  • Invalid raw JSON surfaces a non-blocking inline error
  • Tab order flows key -> type -> value -> remove per row
  • Empty state shows "No parameters yet" with an Add CTA

Guidelines

  • Follow WCAG 2.1 AA on row inputs (visible labels, error association)
  • Use design tokens, no inline hex
  • Clear documentation and inline comments
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

Labels

GRANTFOX OSSGrantFox open-source campaign taskMAYBE REWARDEDMay be rewarded under the GrantFox campaignOFFICIAL CAMPAIGNOfficial GrantFox campaign issueStellar WaveIssues in the Stellar wave programaccessibilityWCAG 2.1 AA accessibilitydesignVisual/design-system workenhancementNew feature or improvementui/uxUI/UX design, usability, and visual polish

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions