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

fix: environment edit modal save #7371

Merged
merged 2 commits into from May 14, 2024

Conversation

oahmed-OS
Copy link
Contributor

This PR is an improvement of #7330

Background

For environment override modifications, the current behavior did not persist these changes consistently. This is not consistent with the expected behavior of persisting changes as the user closes and re-opens the modal after submitting some change.

This was caused by two issues:

  • onBlur was not firing consistently on modal close
  • Updated values was not loaded in debug route collection and was not re-rendered on change

Changes

  • Capture save on hide rather then on blur
  • Patch environment data using useRequestGroupPatcher
  • add smoke test

Closes #5612

@jackkav
Copy link
Contributor

jackkav commented May 14, 2024

Thanks for the PR, nice job on the playwright test!
You are correct the reason is because the patcher wasn't running so things which depend on this change didn't get reloaded.
It couldn't hurt to do save on both blur and on hide.

@jackkav jackkav self-assigned this May 14, 2024
Copy link
Contributor

@jackkav jackkav left a comment

Choose a reason for hiding this comment

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

🚀 If you have any suggestions to improve the developer experience or documentation please share.

@jackkav jackkav force-pushed the fix/environment-modal-save branch from 6881712 to f5d9aa9 Compare May 14, 2024 06:28
@jackkav jackkav enabled auto-merge (squash) May 14, 2024 06:28
@jackkav jackkav merged commit bb7916c into Kong:develop May 14, 2024
7 checks passed
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.

Environment variables at folder level not saving state
2 participants