New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always open editor even in error cases #142875
Comments
Any customer of As such, moving to respective component owners whether this option should apply or not. It is currently used only in a very few selected places because it is quite a heavy interrupt of the user flow, but may make sense in certain contexts. |
To clarify: I assigned Jackson for whether any normal click on an entry in the explorer should trigger this and Logan for the "Open with.." flow. |
I went ahead and added the modal flow for |
Makes good sense to me that errors encountered when opening from the explorer should show a blocking dialog, given the strong user intention to open the file. |
The error editor only appears for editors that have been opened before and are thus restored in order to preserve the users view state:
I am not entirely convinced we should change this condition to always open an error editor, I would actually prefer the modal dialog in this case. Nevertheless, the more I think about it the more we are getting slightly inconsistent:
The original reason for having @misolori @daviddossett maybe you have thoughts. #130971 is slightly related. |
I'm fine with the modal but it doesn't fix the problem of your explorer position getting messed up as Kai demonstrates in the recording above. |
I think the explorer just automatically reveals the editor when it changes and in this case the editor changes briefly to the faulty one and then back. |
For notebooks, especially a Jupyter notebook, common errors during file opening is corrupted JSON. Showing a modal dialog in this case is better than a notification but users still have no way out until they learn about "Reopen editor with ..." from the context menu to open it in text editor and fix the corruption. Considering this, a "Retry" on the error editor doesn't help too much as it retries with the same editor type and mostly you get the same error message. Should we add "Try another editor" in the warning text or modal dialog so users can find a way out to get the data fixed? |
I like this idea. Could also reuse the "Reopen editor with..." text as the button text to be consistent with the context menu option? |
The downside is most editor errors are issues regardless of error type. This is just a special case it seems |
@lramos15 we can offer different warning text and buttons based on scenarios, in notebook opening in a text editor is a good way out (agree it's a special case) but we don't want to build our own modal dialog or error editor. Instead this should be the same error dialog/editor users see, but with different context. For example, we can try catch in notebook land and return
|
You can actually control the buttons shown in the error dialog when opening, we do that to offer a "Create File" action in case you open a missing file and text editor does this by creating a vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditor.ts Lines 193 to 209 in ddf1226
Maybe worth exploring this for notebooks? |
@bpasero thanks Ben, it's exactly what I was looking for. I adopted the |
Moving to April. |
We can always try out the editor error for now, since we already use a similar pattern, and then if it's not enough we can move to trying out the modal dialog. |
Will see if I can get to it, otherwise Backlog or out of scope. |
Exploring this a bit, the change is pretty straight forward: instead of showing the error pane only when restoring an editor, also show it in all other cases, such as opening an editor. The example below demonstrates the flow, assuming there is a link to a file that does not exist. This would normally only bring up a modal dialog asking to create the file, but would now open the error pane. Unclear to me though what to do with the error toast or even error dialog:
|
I vote for this one. It will prevent the error from blocking the user and then I think in the future when the error pane is cleaned up a bit more with @misolori's mockups it will be even easier for the user to take action within the pane. For now I would just expect |
I actually find the flow for "Create File" specifically quite nice because I heard from users that work like this:
If we stop showing the dialog, this flow becomes harder. My vote would be: show modal dialog in selected cases where we have meaningful actions but never show the notification toast error that only conveys the error message but no action other than retry. |
This landed and will be tweaked. |
@bpasero in the demo case that you show (creating a file from a link to a non-existent file), why do we show the editor area error message if they cancel? We are now showing a modal dialog and they have been told the error and opted to cancel. |
I think we still do the right thing showing the placeholder, because the user cancelled the dialog that asks for creating the file. The dialog is not asking about the error placeholder. |
I'm just not sure what I'm ever going to do with the placeholder in this case. After clicking cancel, I've already chosen not to take the only action that the placeholder provides. |
The original motivation for having an editor visible is coming from Kai's original steps: when you carefully select a file in the explorer in some deep hierarchy and an editor opens but then closes due to error, we by default select the previous file in the explorer so you lost your selection. The error editor placeholder tries to help for that case mainly, preserve UI state and stability. |
ipynb
file-> error notification
-> the explorer immediately selects the file from step 2. In a small workspace this is not an issue but in a larger on it is. The
ipynb
file might scroll out of the view port.For me, the error notification here is the wrong tool. This should be a modal dialog.
Recording of step 7 and the consequences:
The text was updated successfully, but these errors were encountered: