vscode-ibmi icon indicating copy to clipboard operation
vscode-ibmi copied to clipboard

Connecting to IBM i system disables "workbench.editor.enablePreview" setting

Open Max-E-Million opened this issue 1 year ago • 3 comments
trafficstars

Describe the bug After installing the extension and connecting to a system I am missing the previewing of files, I'll try to explain. Previously when left-clicking on a Python (.py)-File in the VSCode Explorer, VSCode would open the file in a "temporary tab", meaning if you left-clicked on a different file, the tab from the one before would vanish. This was indicated by the font of the tab-title being in italic.

To make an opened tab stay, you would have to double-left-click on the desired file.

This is great if you have lots of files in your projects and have to browse through them, trying to find the right one. If every file I browse through remains in an opened tab, I have to manually close all the ones I didn't need, which can be quite a lot.

This here seems to be the setting in question. If I re-enable this, it works as before. "Code for i" seems to overwrite this somehow or something?

grafik

To Reproduce

  1. Install "Code for i" Extension
  2. In the VSCode menu select "File -> Preferences -> Settings"
  3. Search for the setting "workbench.editor.enablePreview"
  4. If not already enabled, enable it
  5. Keep settings window tab open, connect to any IBM i system
  6. Watch how setting gets disabled

Expected behavior Don't automatically disable the preview-feature when installing the extension.

Screenshots See above

Environment (please complete the following information): VSCode 1.89.1

Other installed extensions:

  • kelvin.vscode-sshfs-1.26.1
  • mkloubert.vscode-deploy-reloaded-0.89.0
  • ms-python.debugpy-2024.6.0-win32-x64
  • ms-python.python-2024.4.1
  • ms-python.python-2024.6.0
  • ms-python.vscode-pylance-2024.5.1
  • ms-toolsai.jupyter-2024.4.0-win32-x64
  • ms-toolsai.jupyter-keymap-1.1.2
  • ms-toolsai.jupyter-renderers-1.0.17
  • ms-toolsai.vscode-jupyter-cell-tags-0.1.9
  • ms-toolsai.vscode-jupyter-slideshow-0.1.6
  • visualstudioexptteam.intellicode-api-usage-examples-0.2.8
  • visualstudioexptteam.vscodeintellicode-1.3.1

Max-E-Million avatar May 17 '24 06:05 Max-E-Million

After some further testing, the above mentioned setting seems to get disabled every time you connect to any IBM i system.

For further visualization I could provide a video of the effect, unfortunately I cannot blur out sensitive data like system and user names with my capture software so I can't post this here, but I could DM this to you.

Max-E-Million avatar May 17 '24 07:05 Max-E-Million

Hi @Max-E-Million , according to the code, this preference is indeed explicitly disabled when connecting 😐 https://github.com/codefori/vscode-ibmi/blob/88681a637b13a765bdad56762d2b8534420bee96/src/api/IBMi.ts#L901

And the reason why seems to be here: https://github.com/codefori/vscode-ibmi/issues/928#issuecomment-1295444916

@worksofliam can we assume the bug you mentioned in VSCode has been fixed and it's now safe to leave previews enabled? 😅

sebjulliand avatar May 17 '24 07:05 sebjulliand

@sebjulliand I doubt it has changed since that is really how preview mode works.

I can play around with it in the coming days and see if anything has changed.

worksofliam avatar May 17 '24 12:05 worksofliam