Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: duplicate global environment under team workspaces #4334

Merged
merged 7 commits into from
Sep 25, 2024

Conversation

jamesgeorge007
Copy link
Member

@jamesgeorge007 jamesgeorge007 commented Sep 9, 2024

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:

  • Loading states addition for duplicate regular & global environment actions via the context menu.
  • Adds a - Duplicate suffix for duplicated environment entries.

Closes HFE-575.

Preview

duplicate-global-environment-team-workspaces.mov

What's changed

  • Adds new props 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 event duplicate-global-environment under the EnvironmentsMyEnvironment component.
  • Relevant additions under the root Environments component to trigger the createTeamEnvironment GQL mutation with the global environment variables in scope.
  • Adds a new helper function getEnvActionErrrorMessage abstracting the error messages reused for environment-related actions.
  • Add - Duplicate suffix 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.

@jamesgeorge007 jamesgeorge007 marked this pull request as ready for review September 9, 2024 05:49
@jamesgeorge007 jamesgeorge007 changed the title feat: duplicate global environments under team workspaces feat: duplicate global environment under team workspaces Sep 9, 2024
@jamesgeorge007 jamesgeorge007 force-pushed the feat/duplicate-global-environment-team-workspace branch 5 times, most recently from 14a348b to f2117bf Compare September 10, 2024 11:38
Copy link
Member

@nivedin nivedin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

Copy link
Contributor

@balub balub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the FE does not subscribe to the environment-created subscription, I need to reload the screen for the newly created environment to pop up.

WhatsApp.Video.2024-09-11.at.12.44.47_6383bb3c.mp4

@jamesgeorge007 can you confirm ??

@jamesgeorge007
Copy link
Member Author

I think the FE does not subscribe to the environment-created subscription, I need to reload the screen for the newly created environment to pop up.

WhatsApp.Video.2024-09-11.at.12.44.47_6383bb3c.mp4
@jamesgeorge007 can you confirm ??

Discussed separately, it was found specific to the local environment setup.

Copy link
Contributor

@balub balub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@jamesgeorge007 jamesgeorge007 force-pushed the feat/duplicate-global-environment-team-workspace branch from 1716558 to 9d5e07a Compare September 23, 2024 08:26
@jamesgeorge007 jamesgeorge007 force-pushed the feat/duplicate-global-environment-team-workspace branch from 9d5e07a to a2e51df Compare September 24, 2024 10:52
@jamesgeorge007 jamesgeorge007 merged commit 5742968 into next Sep 25, 2024
1 check passed
@jamesgeorge007 jamesgeorge007 deleted the feat/duplicate-global-environment-team-workspace branch September 25, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants