microsoft / vscode-deploy-azure

VS code extension: Deploy To Azure, which helps set up CI/CD for deployment to Azure Resources.
MIT License
18 stars 19 forks source link

Workflow in tmp dir #191

Closed tiwarishub closed 3 years ago

tiwarishub commented 4 years ago

This change is done to show draft workflow files in Temp or tmp directory instead of adding them to local repo . Below is screenshot how workflow will be shown. image

Once user clicks on "Modify and Commit" button, we will remove the workflow files from tmp directory and add (deleted) for the active editor tabs, for example like this image In the above *-1365.yml files are deleted one.

Note :

A good user interface for user will be , we should close/hide the text editors for tmp files as those files are deleted but vscode does not expose any api for for open text editor which can be used to close a particular text editor. They only thing they provide is commands.executeCommand(workbench.action.closeActiveEditor) or commands.executeCommand('workbench.action.closeAllEditors') , which will not fulfil our scenarios. They have long pending feature request (almost 3 years), but it is still not delivered. https://github.com/microsoft/vscode/issues/21617 https://github.com/microsoft/vscode/issues/15178

If user discards the workflow, then we will move the workflow files from tmp directory to git repo directory. then will again will open those workflows,

image Please note from above pic is, now each created workflow file is there in two tabs of vscode, One with (deleted) and other one is which is moved.

image

Last , if user want to browse the committed workflow files, then we have added one information messages for that as well. image

bishal-pdMSFT commented 4 years ago

Cool description @tiwarishub ❤️

bishal-pdMSFT commented 4 years ago

Few suggestion based on description:

  1. Should we add .github folder in temp as well and keep same folder layout? This way it might easier for user to co-relate the structure of the files.
  2. Suggestion to try: Does vs code allow closing a editor by its handle? We would get the handle when we open the editor. Just a thought.
  3. The two notifications are looking pretty same and hence confusing. Can the workflow file related message be made part of same notification? We can add more text to convey this and may be make the file url as a hyperlink text.
tiwarishub commented 4 years ago

Few suggestion based on description:

  1. Should we add .github folder in temp as well and keep same folder layout? This way it might easier for user to co-relate the structure of the files.
  2. Suggestion to try: Does vs code allow closing a editor by its handle? We would get the handle when we open the editor. Just a thought.
  3. The two notifications are looking pretty same and hence confusing. Can the workflow file related message be made part of same notification? We can add more text to convey this and may be make the file url as a hyperlink text.
  1. Yes @bishal-pdMSFT , now workflow files will be in .github and manifest will be in dockerContent in tmp directory
  2. vscode only exposes export let activeTextEditor: TextEditor | undefined; , which is basically which is active editor. But in TextEditor type there is no way to close that editor (they had hide() function but now they have deprecated it because of its unusual behaviour ).
  3. Now i have removed 2 information box and made the commit link as hyperlink image
bishal-pdMSFT commented 3 years ago

For the notification message, I feel it is very obscure and not intuitive for user to understand that it will take to workflow file. We can add explicit text to tell user that a workflow file (with hypelink file name) has been pushed to their repo. Take @pulkitaggarwl 's help to get the string.

tiwarishub commented 3 years ago

Hi @pulkitaggarwl , Need your help in finalizing the information box to be shown to user for tmp directory changes , which we had discussed with you. Below are some of options , Please let us know if any one of them is fine or if have any suggestion for different one. Commit files url we have made hyperlink (in 2 and 3rd screenshot) , so that user can browse commited files as well

  1. image

  2. image

  3. image

pulkitaggarwl commented 3 years ago

image

This format. change "commit url link" to "commit url" and hyperlink "commit url"

tiwarishub commented 3 years ago

Changed commit URL image