confluentinc / vscode

Confluent for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=confluentinc.vscode-confluent
Apache License 2.0
9 stars 5 forks source link

Creating code with template does not automatically open new code #312

Open roberto-molinari opened 6 days ago

roberto-molinari commented 6 days ago

Type: Bug

I used the "Generate Project from Template" feature to make a python consumer. After I entered all the info in the template, and picked a location to save the file to (in my case, I created a new folder for the code the template was generating), I clicked save.

When the modal dialog closed, I was expecting to see the code that was just generated and saved be in the VS Code view, but it wasn't. I had to navigate back to the folder I had created to find it.

Seems like a bug

Extension version: 0.16.3 VS Code version: Code 1.93.1 (Universal) (38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40, 2024-09-11T17:20:05.685Z) OS version: Darwin arm64 23.6.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 Pro (8 x 2400)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off| |Load (avg)|10, 8, 6| |Memory (System)|16.00GB (0.26GB free)| |Process Argv|--crash-reporter-id a94e9292-2792-4272-bb61-f29756bd22e9| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805:30301674 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 a9j8j154:30646983 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonnoceb:30805159 asynctok:30898717 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 0ee40948:31013168 a69g1124:31058053 dvdeprecation:31068756 dwnewjupytercf:31046870 impr_priority:31102340 nativerepl1:31139838 refactort:31108082 pythonrstrctxt:31112756 flighttreat:31134774 wkspc-onlycs-t:31132770 wkspc-ranged-t:31125599 autoexpandse:31133494 ei213698:31121563 ```
noeldevelops commented 6 days ago

Hmm thanks for the feedback! We have a notification window (bottom right) that opens up after save with the option to open the code in a new VSCode window - did you happen to notice if it popped up for you?

Maybe there's a way to make that message more prominent. I will take a look.

roberto-molinari commented 6 days ago

I did not look for or see that notification, I just assumed the new file would be opened and put into focus.

derek1ee commented 2 days ago

I don't think we should just open the new project w/o asking, as there are different ways in which the user may want to open it:

  1. Open in new window
  2. Open in current window (replace currently opened workspace)
  3. Add to current workspace

That being said, one option to consider here how Azure Function implemented this. Their entire project creation experience is surfaced via Quick Picks, with the last step asking how the user want to open the project to be created:

Screenshot 2024-10-01 at 1 03 13 PM

The nice thing about this approach is that the quick pick menu continuously captures users' attention.

Vs. the current implementation here, which requires user's attention/focus to move across long distance:

  1. Starting on the left menu to initiate the command.
  2. Moving to quick picks to select project type.
  3. Back to main editor to enter creds.
  4. Notification on lower right to open project.
Screenshot 2024-10-01 at 1 10 11 PM
noeldevelops commented 14 hours ago

Hey @derek1ee sorry I missed this comment - I was never notified. :( I paired up with @katehollowayconfluent this morning and I'm opening up a PR shortly that should resolve this ambiguity without forcing the files to open up.

FWIW we did start off with the quickpick for project generation and eventually moved it into a webview form because we didn't like the UX with the quickpick - the lengthiness of some templates & answers can be very tedious there, a user may have to leave the window to gather the info and lose the flow, and users can't see what Qs are coming next to make info gathering more efficient (and maybe some other issues I can't remember?).