mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #5435] [MERGED] feat(common): add erase response functionality with keybindings #5204
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5204
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5435
Author: @12fahed
Created: 10/3/2025
Status: ✅ Merged
Merged: 11/26/2025
Merged by: @jamesgeorge007
Base:
next← Head:feat/clear-response📝 Commits (10+)
842a139feat: clear response button for html & json renderer6cd3980chore: disable clear response for examples3ad9021refactor: relocate clear response (erase) action button to more menu for JSON Rendererfd527b1feat: add "clear response" option in "more option" inside tippy menu for RAW rendererbee549frefactor: move "clear response" button to tippy more option for HTML renderercdfb4d6feat: add "clear response" option in "more option" inside tippy menu for XML renderer43687f4chore: add clear response for image lense07a2e00chore: disable clear response for saved example2806233chore: add clear response for Audio lense6bbad10chore: add clear response for PDF lense📊 Changes
11 files changed (+326 additions, -28 deletions)
View changed files
📝
packages/hoppscotch-common/locales/en.json(+1 -0)📝
packages/hoppscotch-common/src/components/lenses/renderers/AudioLensRenderer.vue(+45 -3)📝
packages/hoppscotch-common/src/components/lenses/renderers/HTMLLensRenderer.vue(+43 -6)📝
packages/hoppscotch-common/src/components/lenses/renderers/ImageLensRenderer.vue(+43 -2)📝
packages/hoppscotch-common/src/components/lenses/renderers/JSONLensRenderer.vue(+14 -1)📝
packages/hoppscotch-common/src/components/lenses/renderers/PDFLensRenderer.vue(+44 -3)📝
packages/hoppscotch-common/src/components/lenses/renderers/RawLensRenderer.vue(+37 -4)📝
packages/hoppscotch-common/src/components/lenses/renderers/VideoLensRenderer.vue(+45 -3)📝
packages/hoppscotch-common/src/components/lenses/renderers/XMLLensRenderer.vue(+45 -5)📝
packages/hoppscotch-common/src/helpers/actions.ts(+1 -0)📝
packages/hoppscotch-common/src/helpers/keybindings.ts(+8 -1)📄 Description
Closes #5431
This PR adds the ability to clear/erase API responses in the HTML lens renderer with both button click and keyboard shortcut support. Users can now quickly clear response data when needed without having to make a new request.
What's changed
eraseResponse()function that emitsupdate:responsewith null to clear responseKeytype definition to include "delete" keygetPressedKey()function to handle delete key detectiongetSpecialKey()Notes to reviewers
v-if="response.body")action.clearfor consistency with the rest of the applicationBefore Changes
No option to clear the response Body
After Changes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.