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: prevent app restart when editor setting change [INS-3668] #7268

Merged
merged 5 commits into from
Apr 19, 2024

Conversation

CurryYangxx
Copy link
Member

@CurryYangxx CurryYangxx commented Apr 15, 2024

Close #6389

There is a historical logic when nunjucksPowerUserMode and showVariableSourceAndValue change the app will restart,in order to modify how variables are displayed

useRestartSetting('showVariableSourceAndValue');

The purpose of this PR is to use other way to refresh editor

Changes:

  • add a hook to listen showVariableSourceAndValue and nunjucksPowerUserMode variable change
    • one-line editor
    • code editor
  • extract the init and clean up logic to external function
  • run cleanup and init to reinitialize codeMirror editor
  • delete old app restart logic

@CurryYangxx CurryYangxx marked this pull request as draft April 15, 2024 09:06
@CurryYangxx CurryYangxx changed the title WIP: prevent app restart when setting change WIP: prevent app restart when showVariableSourceAndValue setting change [INS-3668] Apr 15, 2024
@CurryYangxx CurryYangxx force-pushed the fix/editor-setting-change branch 4 times, most recently from 0189706 to 9da2522 Compare April 19, 2024 07:39
@CurryYangxx CurryYangxx changed the title WIP: prevent app restart when showVariableSourceAndValue setting change [INS-3668] WIP: prevent app restart when editor setting change [INS-3668] Apr 19, 2024
@CurryYangxx CurryYangxx marked this pull request as ready for review April 19, 2024 07:59
@CurryYangxx CurryYangxx requested a review from a team April 19, 2024 07:59
@CurryYangxx CurryYangxx changed the title WIP: prevent app restart when editor setting change [INS-3668] fix: prevent app restart when editor setting change [INS-3668] Apr 19, 2024
jackkav
jackkav previously approved these changes Apr 19, 2024
@jackkav jackkav merged commit 77b2874 into develop Apr 19, 2024
2 of 5 checks passed
@jackkav jackkav deleted the fix/editor-setting-change branch April 19, 2024 10:14
jackkav added a commit to jackkav/insomnia that referenced this pull request May 3, 2024
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.

On Macbook, the shortcut to launch environment variables caused insomnia crashed
2 participants