mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 09:16:03 +03:00
[PR #5616] [MERGED] fix(common): environment variables not detected in request body editors #5283
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#5283
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/5616
Author: @chhaviG22
Created: 11/25/2025
Status: ✅ Merged
Merged: 12/9/2025
Merged by: @jamesgeorge007
Base:
patch← Head:fix/env-variable-detection-request-body📝 Commits (7)
7305bd5fix: environment variables not detected in request body editors1a97381Merge branch 'main' into fix/env-variable-detection-request-bodyce2da25fix: variables reactivity issued6d1b7fchore: cleanupdf4139fchore: cleanup6ba776afix: collection var value bug6d017b4chore: reset inherited properties on delete📊 Changes
3 files changed (+62 additions, -24 deletions)
View changed files
📝
packages/hoppscotch-common/src/components/collections/index.vue(+6 -0)📝
packages/hoppscotch-common/src/helpers/collection/collection.ts(+6 -0)📝
packages/hoppscotch-common/src/helpers/editor/extensions/HoppEnvironment.ts(+50 -24)📄 Description
This PR fixes an issue where environment variables were not being detected and highlighted in request body editors (JSON, XML, GraphQL, etc.), while they worked correctly in the URL/endpoint field.
Problem
<<variable>>syntax were not being recognized in request body editorsSolution
Updated the
HoppEnvironment.tsCodeMirror extension to properly handle environment variable detection and highlighting in request body editors by:What's Changed
HoppEnvironmentPluginclass inpackages/hoppscotch-common/src/helpers/editor/extensions/HoppEnvironment.tsImpact
Testing
Summary by cubic
Fixes environment variables not being detected and highlighted in request body editors (JSON, XML, GraphQL). Updates the HoppEnvironment CodeMirror plugin to correctly aggregate request, collection, and environment variables across editor contexts.
Written for commit
6d017b4038. Summary will update automatically on new commits.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.