vscode-sublime-keybindings icon indicating copy to clipboard operation
vscode-sublime-keybindings copied to clipboard

Sublime Extension prompt shown should not be stored in user settings

Open rebornix opened this issue 7 years ago • 0 comments

From @alexandrudima on June 27, 2017 9:20

Testing #29144

"sublimeTextKeymap.promptV3Features": true

This should not be a user-facing setting. Extensions should store state using the context object passed into the activate function.

Instead, I suggest the following:

  • contribute a command called: "Customize VS Code with Sublime Text settings"
  • this will ensure that the user can invoke the command palette and invoke the customize action independently of the prompt and repeatedly.
  • once user interaction has been made with the prompt (i.e. YES or NO, but not More info), the context.globalState passed in the activate method should be used to store the flag that the prompt should not be shown again.
    • when YES is pressed, invoke the command you have contributed and write to globalState that the prompt should not be shown again.
    • when NO is pressed, write to globalState that the prompt should not be shown again.
    • when More info is pressed, open the help page.

For testing purposes, I believe the extension global state can be cleared via Developer Tools > Application > Local Storage

Copied from original issue: Microsoft/vscode#29546

rebornix avatar Dec 01 '17 00:12 rebornix