Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

Persist user's choice for "Don't Show Again" for "New File" command #142

Merged
merged 2 commits into from
Aug 23, 2019

Conversation

jonathanwangg
Copy link
Contributor

Description:

In this PR, we are saving the user's choice as part of the extension's globalState. What this means is that the InformationMessage (i.e. the pop-up on the bottom right) will not show again after the user clicks "Don't Show Again" and re-opens VS Code. Previously, if they selected "Don't Show Again" and then re-opened VS Code, they would get the same pop up again.

Type of change

  • New feature (non-breaking change which adds functionality)

Limitations:

None

Testing:

  • Try to click "Don't Show Again" and then use the "New File" command. You should not see the pop-up any more. After closing and reloading the Extension Development Host, run the "New File" command. You should still not see pop-up (which means the setting was persisted in the extension's globalState).

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Copy link
Contributor

@Christellah Christellah left a comment

Choose a reason for hiding this comment

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

Works as expected :)

Copy link
Member

@LukeSlev LukeSlev left a comment

Choose a reason for hiding this comment

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

Good stuff buddy

@jonathanwangg jonathanwangg merged commit ef73290 into dev Aug 23, 2019
@jonathanwangg jonathanwangg deleted the users/t-jowang/store-user-choice branch August 26, 2019 09:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants