[PR #489] feat(headers): add optional dropdown to pick header names and values #3338

Open
opened 2026-07-15 02:02:37 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mountain-loop/yaak/pull/489
Author: @WkdXeqtr
Created: 6/30/2026
Status: 🔄 Open

Base: mainHead: feature/header-value-dropdowns


📝 Commits (5)

  • 772d93f feat(headers): add optional dropdown to pick header names and values
  • 637b158 Merge branch 'main' into feature/header-value-dropdowns
  • 0afa15b Merge branch 'main' into feature/header-value-dropdowns
  • 8a52837 Merge branch 'main' into feature/header-value-dropdowns
  • 02c001b Merge branch 'main' into feature/header-value-dropdowns

📊 Changes

9 files changed (+242 additions, -11 deletions)

View changed files

📝 apps/yaak-client/components/HeadersEditor.tsx (+37 -9)
📝 apps/yaak-client/components/Settings/SettingsInterface.tsx (+8 -0)
📝 apps/yaak-client/components/core/Editor/genericCompletion.ts (+9 -1)
📝 apps/yaak-client/components/core/PairEditor.tsx (+79 -1)
apps/yaak-client/hooks/useHeaderDropdownsEnabled.ts (+23 -0)
apps/yaak-client/lib/data/acceptLanguages.ts (+15 -0)
apps/yaak-client/lib/data/cacheControl.ts (+16 -0)
apps/yaak-client/lib/data/headerValuePresets.ts (+7 -0)
apps/yaak-client/lib/data/userAgents.ts (+48 -0)

📄 Description

Summary

I'm migrating from Advanced REST Client (ARC), where header fields had a dropdown
of common names and values, so you could pick one without knowing the exact string
up front. Yaak already has inline autocomplete for headers - this PR adds an
optional dropdown on top of it, so the same suggestions are discoverable by
clicking, not only by typing.

It is fully opt-in and off by default
(Settings -> Interface -> Editor -> "Header suggestion dropdowns"), so nothing
changes unless you turn it on. When enabled, a small chevron appears on the header
name and value inputs; picking an item inserts it. Inline autocomplete is left
untouched.

The dropdown reuses Yaak's existing header suggestion data (header names, mime
types, encodings, ...) and adds a few common value lists (Cache-Control,
Accept-Language, User-Agent). For values that are long or hard to remember, like
User-Agent, it shows a short label (e.g. "Chrome 120 - Windows") but inserts the
full string, using the completion's apply field so inline autocomplete shows the
same labels.

Submission

  • This PR is a bug fix or small-scope improvement.
  • If this PR is not a bug fix or small-scope improvement, I linked an approved feedback item below.
  • I have read and followed CONTRIBUTING.md.
  • I tested this change locally.
  • I added or updated tests when reasonable.

Approved feedback item (required if not a bug fix or small-scope improvement):


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mountain-loop/yaak/pull/489 **Author:** [@WkdXeqtr](https://github.com/WkdXeqtr) **Created:** 6/30/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feature/header-value-dropdowns` --- ### 📝 Commits (5) - [`772d93f`](https://github.com/mountain-loop/yaak/commit/772d93f5afb7c1a4842d74e9fd6feeb7d1b8fe38) feat(headers): add optional dropdown to pick header names and values - [`637b158`](https://github.com/mountain-loop/yaak/commit/637b158ede6221ea70f71bf3a15be0b96948afc0) Merge branch 'main' into feature/header-value-dropdowns - [`0afa15b`](https://github.com/mountain-loop/yaak/commit/0afa15b8357d57bb02a6167e8fa24577481262e6) Merge branch 'main' into feature/header-value-dropdowns - [`8a52837`](https://github.com/mountain-loop/yaak/commit/8a52837419a119f4b4ba7dff2fe3fe6c8635fe82) Merge branch 'main' into feature/header-value-dropdowns - [`02c001b`](https://github.com/mountain-loop/yaak/commit/02c001b9f68c9bbeb4b879f917a1025e68935e2c) Merge branch 'main' into feature/header-value-dropdowns ### 📊 Changes **9 files changed** (+242 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `apps/yaak-client/components/HeadersEditor.tsx` (+37 -9) 📝 `apps/yaak-client/components/Settings/SettingsInterface.tsx` (+8 -0) 📝 `apps/yaak-client/components/core/Editor/genericCompletion.ts` (+9 -1) 📝 `apps/yaak-client/components/core/PairEditor.tsx` (+79 -1) ➕ `apps/yaak-client/hooks/useHeaderDropdownsEnabled.ts` (+23 -0) ➕ `apps/yaak-client/lib/data/acceptLanguages.ts` (+15 -0) ➕ `apps/yaak-client/lib/data/cacheControl.ts` (+16 -0) ➕ `apps/yaak-client/lib/data/headerValuePresets.ts` (+7 -0) ➕ `apps/yaak-client/lib/data/userAgents.ts` (+48 -0) </details> ### 📄 Description ## Summary I'm migrating from Advanced REST Client (ARC), where header fields had a dropdown of common names and values, so you could pick one without knowing the exact string up front. Yaak already has inline autocomplete for headers - this PR adds an optional dropdown on top of it, so the same suggestions are discoverable by clicking, not only by typing. It is fully opt-in and off by default (Settings -> Interface -> Editor -> "Header suggestion dropdowns"), so nothing changes unless you turn it on. When enabled, a small chevron appears on the header name and value inputs; picking an item inserts it. Inline autocomplete is left untouched. The dropdown reuses Yaak's existing header suggestion data (header names, mime types, encodings, ...) and adds a few common value lists (Cache-Control, Accept-Language, User-Agent). For values that are long or hard to remember, like User-Agent, it shows a short label (e.g. "Chrome 120 - Windows") but inserts the full string, using the completion's `apply` field so inline autocomplete shows the same labels. ## Submission - [x] This PR is a bug fix or small-scope improvement. - [ ] If this PR is not a bug fix or small-scope improvement, I linked an approved feedback item below. - [x] I have read and followed [`CONTRIBUTING.md`](CONTRIBUTING.md). - [x] I tested this change locally. - [x] I added or updated tests when reasonable. Approved feedback item (required if not a bug fix or small-scope improvement): <!-- https://yaak.app/feedback/... --> ## Related <!-- Link related issues, discussions, or feedback items. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-07-15 02:02:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/yaak#3338