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(Global Environments): Introduce a new top level file type called global environments. #7511

Merged
merged 16 commits into from
Jun 18, 2024

Conversation

gatzjames
Copy link
Contributor

@gatzjames gatzjames commented Jun 7, 2024

Highlights:

  • Adds a new workspace type environment
  • Collections can now use Global environments alongside collection environments
  • Global environments can be synced using Cloud Sync / Git Sync
  • Global environments apply on top of Base environments using the same hierarchy model

Next steps:

  • Enable globals API in pre-request/after-response scripts
  • Test Import/Export and make sure imports with globals work as expected
  • Environment Settings
  • Review the objects that need to be created for envs (e.g. filter out CookieJar or other stuff that don't make sense)

New Environment picker UI:

image

Global Environments in the Project view:

image

Updates to Models

  • Workspace now has a new type environment
  • A workspace can have an active Global Environment (workspaceMeta has a new property activeGlobalEnvironmentId that references that)

@gatzjames gatzjames self-assigned this Jun 7, 2024
@gatzjames gatzjames requested a review from a team June 7, 2024 09:07
@gatzjames gatzjames force-pushed the feat/global-env branch 3 times, most recently from a20fd61 to 750f9c0 Compare June 7, 2024 14:56
@jackkav
Copy link
Contributor

jackkav commented Jun 10, 2024

can you include some screen shots in the description please. I think the ux is a bit contentious. I would also like to see a clear the environment model addressing the current inconsistencies in order to code review this approach.

@gatzjames gatzjames force-pushed the feat/global-env branch 3 times, most recently from 7058467 to 0f08cd2 Compare June 13, 2024 08:01
Copy link
Contributor

@ihexxa ihexxa left a comment

Choose a reason for hiding this comment

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

Went through some parts like data model, rendering and the UI part is not checked yet.

};

export const scopeToBgColorMap: Record<string, string> = {
design: 'bg-[--color-info]',
collection: 'bg-[--color-surprise]',
'mock-server': 'bg-[--color-warning]',
unsynced: 'bg-[--hl-md]',
environment: 'bg-[--color-font]',
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Should it be --color-font or color-bg?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep it's correct we want the color-font for bg here. Agree that it's counter intuitive but there are cases were we need the font color as bg 🫣

@gatzjames gatzjames force-pushed the feat/global-env branch 2 times, most recently from f9653fd to b98088b Compare June 13, 2024 12:04
@gatzjames gatzjames force-pushed the feat/global-env branch 2 times, most recently from 9113f83 to 40b0bea Compare June 17, 2024 12:42
Copy link
Contributor

@ihexxa ihexxa left a comment

Choose a reason for hiding this comment

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

Tend to move forward but there are many details in the component so it may deserve more detailed check.

Copy link
Contributor

@ihexxa ihexxa left a comment

Choose a reason for hiding this comment

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

LGTM we've discuss several topics like relationship syncing, ux consistency and overall it looks to me. We will also apply it to the scripting feature, have more tests on it and move to the importing/exporting implementation.

@ihexxa ihexxa merged commit f86e00b into Kong:develop Jun 18, 2024
7 checks passed
gatzjames added a commit that referenced this pull request Jun 18, 2024
…e called global environments. (#7511)"

This reverts commit f86e00b.
gatzjames added a commit that referenced this pull request Jun 19, 2024
…file type called global environments. (#7511)""

This reverts commit 8a0f455.
stefancruz pushed a commit to stefancruz/insomnia that referenced this pull request Jun 30, 2024
… global environments. (Kong#7511)

* add new workspace type 'environment'

* new route for environments and set/get for them

* update environment picker UI

* update workspace environment modal ui to match env view

* global environment request rendering

* type checks

* ui overflow fix

* update e2e

* auto-lint issue

* type-checks

* Update aria label

* create env from project view

* changes

* save

* environment picker component

* update e2e
stefancruz pushed a commit to stefancruz/insomnia that referenced this pull request Jun 30, 2024
stefancruz pushed a commit to stefancruz/insomnia that referenced this pull request Jun 30, 2024
…file type called global environments. (Kong#7511)""

This reverts commit 8a0f455.
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.

None yet

3 participants