Split out from #81.
Background
The CellContextMenu component already exists on URL bar / param / header inputs (right-click → copy / paste / clear). Extend it with text-transform utilities that act on the current selection when one is present, otherwise on the full cell value.
Proposed change
Add a Transform selection submenu (or four top-level items, TBD by feel during implementation):
- URL-encode —
encodeURIComponent semantics
- URL-decode —
decodeURIComponent with try/catch (malformed URLs leave selection untouched and toast an error)
- Base64 encode — UTF-8 safe, no padding mangling
- Base64 decode — symmetric inverse
- Stringify — escape for embedding in a JSON string literal:
"foo" → \\\"foo\\\"
- Destringify — symmetric inverse:
\\\"foo\\\" → "foo"
Where it should be available
- URL bar
- Param key + value cells
- Header key + value cells
- Body editor (raw / json / xml / html / javascript modes — CodeMirror selection)
- Form-urlencoded fields
- Multipart text parts
GraphQL editor follows the same CodeMirror-selection rules.
Acceptance criteria
Out of scope
- User-defined transforms (plugin system). See #C-issue for the parking lot.
- Format converters (JSON ↔ YAML, XML ↔ JSON). Track separately if requested.
Parent: #81
Split out from #81.
Background
The CellContextMenu component already exists on URL bar / param / header inputs (right-click → copy / paste / clear). Extend it with text-transform utilities that act on the current selection when one is present, otherwise on the full cell value.
Proposed change
Add a
Transform selectionsubmenu (or four top-level items, TBD by feel during implementation):encodeURIComponentsemanticsdecodeURIComponentwith try/catch (malformed URLs leave selection untouched and toast an error)"foo"→\\\"foo\\\"\\\"foo\\\"→"foo"Where it should be available
GraphQL editor follows the same CodeMirror-selection rules.
Acceptance criteria
Out of scope
Parent: #81