mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #5193] [MERGED] feat: preserve response viewer scroll position per tab #5098
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#5098
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/5193
Author: @jarvis2754
Created: 6/24/2025
Status: ✅ Merged
Merged: 7/28/2025
Merged by: @jamesgeorge007
Base:
next← Head:contrib📝 Commits (10+)
8f4731cfeat: add scroll position memory per tab in Response viewc5389caMerge branch 'hoppscotch:main' into contrib6672d0ffeat: add scroll persistence and cleanup, remove hardcoded scroller referencesdf08e5echore: Germani18nstring entry additions (#5142)4fabff1fix(desktop): prevent navigation on file drops (#5176)3578cc3feat(desktop): native tab keyboard shortcuts (#5190)93c4634fix: output raw numbers in JSON filter (#5152)3a183a9chore: resolve global env in team env and tooltip UI update (#5187)b401b79fix(common): auto unescape utf-8 issue in the request body (#5185)e5675d6refactor(backend): enhance auth strategies with type safety and better error handling (#5066)📊 Changes
11 files changed (+381 additions, -11 deletions)
View changed files
📝
packages/hoppscotch-common/src/components/http/RequestTab.vue(+5 -1)📝
packages/hoppscotch-common/src/components/http/Response.vue(+3 -4)📝
packages/hoppscotch-common/src/components/lenses/ResponseBodyRenderer.vue(+2 -0)📝
packages/hoppscotch-common/src/components/lenses/renderers/HTMLLensRenderer.vue(+14 -1)📝
packages/hoppscotch-common/src/components/lenses/renderers/JSONLensRenderer.vue(+13 -1)📝
packages/hoppscotch-common/src/components/lenses/renderers/RawLensRenderer.vue(+13 -1)📝
packages/hoppscotch-common/src/components/lenses/renderers/XMLLensRenderer.vue(+12 -2)➕
packages/hoppscotch-common/src/composables/useScrollerRef.ts(+113 -0)📝
packages/hoppscotch-common/src/pages/index.vue(+9 -1)➕
packages/hoppscotch-common/src/services/__tests__/scroll.service.spec.ts(+99 -0)➕
packages/hoppscotch-common/src/services/scroll.service.ts(+98 -0)📄 Description
feat: Add per-tab scroll position memory in Response view (#5027)
Description
This commit implements per-tab scroll position saving in the Response viewer.
Changes
scrollStore.tsto manage scroll positions across tabsResponse.vue:.cm-scrollerscrollTop for each tab IDRequestTab.vueto passtabIdtoResponse.vueHow it works
Each tab has a unique
tab.id.When a user scrolls the response body, the scroll position is saved in a global
Map<tabId, scrollTop>.When the tab is reopened or re-rendered, the scroll is restored using a
ResizeObserver.Closes #5027
Please let me know if there is any problem with the code.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.