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 issue where editing a Nunjucks variable/tag didn't update environment variables #6011

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

tlund101
Copy link

@tlund101 tlund101 commented Jun 2, 2023

This is a small PR that fixes behavior when setting environment variables via the tag/variable modal.
Reproduction steps:

  1. Create a new environment
  2. Add a property whose value is a variable (e.g. I used a timestamp)
  3. Create a request using the new property, observe the request is using your property correctly
  4. Edit the environment again, and click the value to open the tag modal
  5. Change the value to something different/invalid, close the modal by clicking Done
  6. Close the environment modal by clicking Done
  7. Observe the property in your request did not change

This is somewhat of a naive solution, so I'm open to suggestions to fix this better. Notably, why is this component not simply saving onChange if there are no errors instead of onBlur if there are no errors?

@jackkav
Copy link
Contributor

jackkav commented Jul 11, 2023

We save onBlur because saving onChange will cause all the background components to re-render on every keypress.

@tlund101
Copy link
Author

We save onBlur because saving onChange will cause all the background components to re-render on every keypress.

Thanks for the insight. I've modified the PR to change the CodeEditor instead to call OnBlur when something changes but it isn't in focus. Let me know what you think.

@CLAassistant
Copy link

CLAassistant commented Jan 2, 2024

CLA assistant check
All committers have signed the CLA.

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