mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #4334] [MERGED] feat: duplicate global environment under team workspaces #4758
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#4758
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/4334
Author: @jamesgeorge007
Created: 9/9/2024
Status: ✅ Merged
Merged: 9/25/2024
Merged by: @jamesgeorge007
Base:
next← Head:feat/duplicate-global-environment-team-workspace📝 Commits (7)
e1d759ffeat: duplicate global environment under team workspaces5e66642refactor: helper function abstracting error messages1cfc6e5chore: cleanupe39469echore: hide tippy after clicking duplicatebaea5e6feat: add loading state for environment context menu actionsb93899bchore: add- Duplicatesuffix for duplicated environment entriesa2e51dfchore: cleanup📊 Changes
9 files changed (+135 additions, -111 deletions)
View changed files
📝
packages/hoppscotch-backend/src/team-environments/team-environments.service.ts(+1 -1)📝
packages/hoppscotch-common/src/components/environments/Add.vue(+6 -19)📝
packages/hoppscotch-common/src/components/environments/Selector.vue(+6 -18)📝
packages/hoppscotch-common/src/components/environments/index.vue(+50 -4)📝
packages/hoppscotch-common/src/components/environments/my/Environment.vue(+29 -15)📝
packages/hoppscotch-common/src/components/environments/teams/Details.vue(+3 -16)📝
packages/hoppscotch-common/src/components/environments/teams/Environment.vue(+20 -25)📝
packages/hoppscotch-common/src/components/environments/teams/index.vue(+2 -13)➕
packages/hoppscotch-common/src/helpers/error-messages/index.ts(+18 -0)📄 Description
The duplicate global environment action was specific to the personal workspace, where the entries were added and hidden while at a team workspace with #4245. This PR re-enables the action under team workspaces and extends support. Also, the following changes are added alongside applicable to team workspaces:
- Duplicatesuffix for duplicated environment entries.Closes HFE-575.
Preview
https://github.com/user-attachments/assets/c406ff47-b191-4857-a1ea-06ca4bd6b567
What's changed
duplicateGlobalEnvironmentLoading(keeps track of the n/w call status and dismisses the context menu) &showContextMenuLoadingState(Indicates the context menu is to be displayed during the n/w call in a team workspace) and defines a new eventduplicate-global-environmentunder theEnvironmentsMyEnvironmentcomponent.Environmentscomponent to trigger thecreateTeamEnvironmentGQL mutation with the global environment variables in scope.getEnvActionErrrorMessageabstracting the error messages reused for environment-related actions.- Duplicatesuffix to duplicated environment names under team workspaces.Notes to reviewers
Please ensure to cross-check the error message updates once with the newly added helper function.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.