Skip to content

HTTP: the environment picker keeps the right margin of Save #1671

Done

Description

@vmillet-dev

Context — In the HTTP area, the environment picker at the right end of the tabs strip sits 10 px from the window's edge, while the request line below it (Send, Code, Save) and the rail toggle on the left of the same strip stand 20 px from theirs: the picker looks pushed against the right edge, out of line with « Save » under it. Reported on 1.2.1.

Change — The end of the tabs strip (New request and the environment picker) keeps the same right margin as the request line, so the picker's right edge lines up with « Save ».

To do

  • Use BAR_INSET (gap::PANEL, 20 px) for the strip's right end, as its left end and the request panel use.
  • Narrow the tabs' scroll area by as much, so the last tab still stops before « New request ».

Tests — kittest in http/tests.rs: the right edges of http-environment-picker and http-save are equal (to the pixel) with a request open, in comfortable and compact density. e2e 31_http_environments captures the strip (no new step).


Technical analysis

Cause. ui/src/http/tabs.rs, show: the end of the strip is the rectangle bar.right() - end_width - 10.0 .. bar.right() - 10.0 (lines 125-128), and the tabs' scroll area stops at bar.right() - end_width - 20.0 (line 82). The left end places the rail toggle at bar.left() + BAR_INSET (20 px). The request panel below is framed by inner_margin(gap::margin(gap::PANEL, gap::BLOCKS)) (http/request/mod.rs:198), so « Save », the last control of the request line, ends 20 px from the edge. The 10 px comes from the reference (request-tabs.component.scss, .strip-end { padding: 0 10px }), whose request line was framed the same way: the misalignment existed there too, and the report asks to fix it.

Fix. Replace the literal 10.0 of lines 126-127 by BAR_INSET and the 20.0 of line 82 by BAR_INSET + gap::INSET (the 10 px kept between the last tab and « New request »). No literal gap stays in the function (theming sweep: gaps come from tokens).

Risk. Very low: two coordinates. The strip loses 10 px for its tabs at a narrow window; they already scroll.

Activity

  1. added
    bug
    on Nov 27, 2026
  2. added a commit that references this issue on Nov 27, 2026
  3. vmillet-dev commented on Nov 27, 2026

    @vmillet-dev
    OwnerAuthor

    Fixed by #1677, merged into dev/1.2.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions