microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.55k stars 899 forks source link

Going into WYSIWYG mode breaks insert link functionality for split view #15077

Open Charles-Gagnon opened 3 years ago

Charles-Gagnon commented 3 years ago

Stable/Insiders/RC1 (not regression from 1.27)

  1. Create new text cell in Notebook (helps to have "default to WYSIWYG" mode turned off)
  2. Click link icon to insert new link - works as expected
  3. Switch to "Rich Text View"
  4. Switch back to Split View
  5. Click link icon to insert new link

Expected :

Link is inserted

Actual :

Nothing added

This error is in console :

ERR Cannot read property '0' of null: TypeError: Cannot read property '0' of null
    at Object.t.insertFormattedMarkdown (file:///C:/Users/chgagnon/AppData/Local/Programs/Azure Data Studio/resources/app/out/vs/workbench/workbench.desktop.main.js:2010:314)
    at b.onInsertButtonClick (file:///C:/Users/chgagnon/AppData/Local/Programs/Azure Data Studio/resources/app/out/vs/workbench/workbench.desktop.main.js:4313:79)
    at async HTMLLIElement.<anonymous> (file:///C:/Users/chgagnon/AppData/Local/Programs/Azure Data Studio/resources/app/out/vs/workbench/workbench.desktop.main.js:4307:406)
chlafreniere commented 3 years ago

Given that this isn't a regression and we haven't heard any customers talk about it, I'm less likely to try to push this in unless the fix really is quite targeted. I've asked @VasuBhog to do a quick investigation here.

chlafreniere commented 3 years ago

@VasuBhog is this related to your outstanding PRs, or is this a different problem?

VasuBhog commented 3 years ago

My current open PRs are focused on run parameters action. I had worked on ensuring the selected link for markdown/split-view work properly as well (which is fixed). This issue is entirely different as we were having issues with the editorControl being undefined when inserting the link. (can look into this further later this week)

chlafreniere commented 3 years ago

@VasuBhog thanks for clarifying. Ah yes, I remember now. If you realistically think it can get done this week, great, and if not, no problem at all. I'm just trying to figure out which milestone to put it in (May or Backlog)