Skip to content
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

How to show errors in the editor #9062

Closed
weinand opened this issue Jul 11, 2016 · 9 comments
Closed

How to show errors in the editor #9062

weinand opened this issue Jul 11, 2016 · 9 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality

Comments

@weinand
Copy link
Contributor

weinand commented Jul 11, 2016

Followup from #8836:

@isidorn we have already examples for how to show these kind of errors.
When trying to open a huge file, the error is shown like this:

2016-07-11_11-22-21

We should align with that approach; ideally we should share the implementation.

@weinand weinand added feature-request Request for new features or functionality debug Debug viewlet, configurations, breakpoints, adapter issues labels Jul 11, 2016
@weinand weinand added this to the July 2016 milestone Jul 11, 2016
@isidorn isidorn added the ux User experience issues label Jul 19, 2016
@isidorn
Copy link
Contributor

isidorn commented Jul 19, 2016

The current code is special for showing binary editors so it can not be reuesed nicely atm.
I will bring this up in the UX meeting tomorrow

@isidorn
Copy link
Contributor

isidorn commented Jul 22, 2016

Will wait for @bpasero to be back so we can discuss and not urgent -> August

@stevencl
Copy link
Member

stevencl commented Aug 3, 2016

We discussed during our UX meeting and agreed that this seems like the right approach.

@bpasero
Copy link
Member

bpasero commented Aug 6, 2016

This editor UI is used for files that are binary or have other limitations when opening, I am not sure we should reuse the same for your case. You are free to create your own editor input and editor and open it and you have DOM access to do whatever you want in there. There are some actions that target this editor that might expect it to be about a real file on disk and it does not sound like your scenario is about that.

@stevencl
Copy link
Member

stevencl commented Aug 9, 2016

Is this an implementation issue or a UX issue? I'll add it to the agenda for tomorrow in case it is UX.

@bpasero bpasero removed the ux User experience issues label Aug 12, 2016
@isidorn isidorn modified the milestones: September 2016, August 2016 Aug 26, 2016
@isidorn
Copy link
Contributor

isidorn commented Sep 6, 2016

@bpasero so I can create my own editor the same way you do for the binary resource editor. However I am not sure how to wire in my editor, since you just register it for certain mime types here.
Optimally I would just like to use the editor service and tell it to use my custom editor, since it should also belong to a group and so on but that API is missing so is there some nice alternative?

@bpasero
Copy link
Member

bpasero commented Sep 7, 2016

@isidorn you can bring in new editors to the workbench without having to register a mime. The way it works is that you register an editor and then make sure that you have at least one editor input support this editor. I suggest you add your own editor and input to show a message (or anything you need to show).

The HTML preview editor is a good example: https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/html/browser/html.contribution.ts#L21

It connects an editor with an input. Everytime this input is opened via our APIs, this editor is being used and so you control the entire lifecycle end to end.

@isidorn isidorn closed this as completed in 1a227a7 Sep 7, 2016
@isidorn
Copy link
Contributor

isidorn commented Sep 7, 2016

@bpasero thanks a lot for the pointers! I remembered that we used this approach for the repl before it was a panel.

We are now using a custom editor to render debug errors.
Open to feature requests on how to style these errors better since we are now in charge of rendering this.

screen shot 2016-09-07 at 18 16 41

@bpasero
Copy link
Member

bpasero commented Sep 7, 2016

@isidorn maybe at the minimum try to copy the styles from the binary editor 👍

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

4 participants