Skip to content

Sync bruno-api-docs(oc-docs) updates from opencollection - #3

Merged
bijin-bruno merged 14 commits into
mainfrom
sync/opencollection-updates
Jul 24, 2026
Merged

Sync bruno-api-docs(oc-docs) updates from opencollection#3
bijin-bruno merged 14 commits into
mainfrom
sync/opencollection-updates

Conversation

@arpit-bruno

@arpit-bruno arpit-bruno commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Brings the oc-docs changes merged on opencollection after the extraction cut into this repo.

TODO before this merges:

  • Rename packages/oc-docs -> packages/bruno-api-docs
  • Rewrite README + contributing

sundram-bruno and others added 6 commits July 23, 2026 13:52
…139)

* feat(oc-docs): resizable, collapsible docs and playground sidebars

Both sidebars can be drag-resized from their right edge (200-480px,
sessionStorage-persisted per tab, restored on reload). Dragging past the
min collapses the sidebar VS Code-style; dragging back within the same
held gesture re-expands it, with the resize cursor held throughout.

Adds useResizableSidebar (sessionStorage width + collapse threshold) and
extends useDockResize with a leading edge and collapse/expand handoff on
window listeners so the drag survives the handle unmounting.

* feat(oc-docs): highlight sidebar resize handle on hover and drag

Draws a 2px border2 line on the resize handle while hovered or actively
dragging (kept lit for the whole held gesture via data-dragging, so it
does not flicker when the pointer outruns the handle at max width). No
transition, so the highlight tracks fast hover changes during a resize.

* refactor(oc-docs): reuse areaFor and read stored sidebar width once

Export areaFor from useStorage and call it from useResizableSidebar
instead of a duplicated SSR guard. Memoise the initial stored-width read
so it does not re-run on every render (once per pointer move during a
drag). Use the --z-sidebar token for the playground resizer z-index to
match AppShell.

* perf(oc-docs): coalesce sidebar/dock resize width writes to one per frame

Route the drag width update through requestAnimationFrame (cancel-prior)
so multiple pointermoves in a frame trigger at most one setSize, instead
of a re-render per dispatched move. Collapse/expand stay synchronous so
their timing is unchanged; the pending frame is cancelled on unmount.

* test(oc-docs): e2e for sidebar resize, collapse-on-overdrag and persist

Cover both sidebars: drag to widen, clamp at max, persist width across
reload (sessionStorage), overshoot-to-collapse with reopen, and
re-expand within the same held drag. Adds resize drag helpers to the
sidebar and playground page-object components.

* test(oc-docs): hoist e2e resize drag helpers into BaseComponent

Move the shared grab / movePointerToX / releasePointer trio (and the
drag-y state) onto BaseComponent so the sidebar and playground page
objects no longer duplicate them; each keeps only its handle-specific
grab wrapper.

* style(oc-docs): use rem for sidebar resize handle dimensions

Address PR review: express the resize handle width, offset and hover
line in rem instead of px, matching the repo's rem-based sizing.
* fix(oc-docs): tighten playground dock switcher padding to 1px

* fix(oc-docs): widen sidebar selected-item highlight left pad to 8px
* Make a common component for No content text
… the examples (#146)

* UI fix for heading and breadcrumb truncation

* Removed Try button from examples
… state (#144)

* fix(oc-docs): polish playground example heading and add empty request state

Render the example heading as the example name followed by a muted
' / Example' suffix, and reduce the name to 13px. Show a
'No headers, body, auth, variables, or scripts configured for this
request.' message in the Request pane when an example has no params,
headers or body.

* aligned Query heading with nearby content

* drag bar padding to 1rem as per figma

* drag bar margin to 1rem as per figma
@arpit-bruno
arpit-bruno force-pushed the sync/opencollection-updates branch from ec58380 to f32d085 Compare July 23, 2026 13:27
sundram-bruno and others added 7 commits July 23, 2026 19:18
…app (#141)

* feat(oc-docs): match playground method dropdown and url bar to Bruno app

Align the playground query bar's HTTP method control with the Bruno
app for visual parity:

- Method dropdown items now render as MethodBadge (bold, mono,
  uppercase, method-coloured) instead of plain text, matching the
  trigger badge.
- Constrain the method dropdown surface to 110-150px width, tighten
  item spacing (line-height, padding, margin) and surface padding.
- Match the dropdown surface background and border to the query bar
  (app base background and --border-color) so it blends in dark mode.
- Left-align the dropdown to the url box border with a 1px gap below
  it via Tippy offset.
- Abbreviate long methods in the url bar trigger (DELETE -> DEL,
  OPTIONS -> OPT) through a new MethodBadge `short` prop.
- Reduce the method trigger's left/right padding to match the docs
  url bar.

* refactor(oc-docs): move method dropdown styling out of shared MenuDropdown

Address review: the method-menu-dropdown overrides lived in the shared
MenuDropdown StyledWrapper. Move them to QueryBar via an Emotion Global
so the query-bar-specific styling is owned by QueryBar. A Global is
used (rather than QueryBar's nested StyledWrapper) because the dropdown
surface is portaled to <body>, so a nested selector can't reach it.

* fix(oc-docs): raise method dropdown item selector specificity

The method-menu-dropdown item overrides tied the base .dropdown-item
selector (0,2,0) and lost on source order, so items fell back to the
shared padding. Qualify with .dropdown to win the cascade.

* Improve the implementation in MenuDropdown

* style(oc-docs): add 2px top gap to compact method dropdown

* refactor(oc-docs): address review on MethodBadge

- Use the cx util for className composition instead of a manual
  filter/join.
- Assert MethodBadge short-mode output by rendered text (strip markup)
  rather than matching the raw HTML string.

---------

Co-authored-by: Vineet Sharma <vineet@usebruno.com>
… (#147)

* Change the color of texts/ checkbox to the background color
* Changed the tab component and resued the same from the app
…gination polish (#149)

* fix(oc-docs): full-height playground editors, uniform tab padding, pagination polish

- Body/Tests/Scripts editors in the request pane now fill the available
  height (opt-in fillHeight prop; folder/collection settings keep their
  fixed-height editors) and stop 1rem above the pane bottom
- request-pane tab panel scrolls internally so its padding-bottom is
  honoured on long content and the tab row stays fixed
- add uniform 1rem bottom padding to every playground tab panel from a
  single parent rule (request/folder/collection), resetting nested tabs
- pagination (PrevNext): inner padding 8px across breakpoints and bump
  the request-name line-height so descenders are no longer clipped

* fix(oc-docs): consistent playground page spacing and headings

- Uniform page spacing across all playground pages (request, folder,
  collection, environments, example, and WS/GraphQL/gRPC): 1.25rem left
  padding and 1.25rem top so every page's content starts at the same edge
- All page headings now render through the shared TitleLabel component at
  a single size/weight (theme md, 14px, 600) with a consistent line-height
  so titles look the same and their glyph tops align; the taller
  line-height also stops descenders (y, g, p) being clipped
- Heading-to-tabs spacing lives on the heading; removed the top margin
  previously on the tabs beneath folder and collection headings
- Markdown blockquote (the Note callout) is vertically centred: the last
  paragraph's bottom margin is dropped so top and bottom padding match
- Example page heading no longer shows the "/ Example" suffix
- Removed the now-unused style classes (collection title, env title,
  example name suffix)

* test(oc-docs): e2e coverage for fill-height request editors

- Add data-testids to the Body and Tests editors so all three fill-height
  editors are locatable
- Add a Playwright spec asserting the Body, Tests and pre-request Script
  editors stretch to fill the request pane, ending ~1rem above its bottom
@arpit-bruno
arpit-bruno marked this pull request as ready for review July 23, 2026 20:08
@bijin-bruno
bijin-bruno merged commit 2a0bf2a into main Jul 24, 2026
1 check failed
@arpit-bruno
arpit-bruno deleted the sync/opencollection-updates branch August 10, 2026 07:18
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.

5 participants