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

Inline Results Widget #83

Closed
mikeball opened this issue Jul 31, 2016 · 4 comments
Closed

Inline Results Widget #83

mikeball opened this issue Jul 31, 2016 · 4 comments
Assignees
Milestone

Comments

@mikeball
Copy link

The ability to add inline blocks of html and have the editor display and not overlay other lines allows extensions to build very rich and interactive experiences, versus just writing something to a console.

An issue for this feature was created in the main vscode project (microsoft/vscode#3220) but I suspect that the functionality to add this feature would need to be added to Monaco, so I've created an issue here. Please see the comments on vscode issue for additional discussion.

Here's an example of what the inline results might look like

Atom has also implemented a similar feature called Block Decorations which appears to be used by a plugin already.

@alexdima
Copy link
Member

The editor has the view zone API: editor.changeViewZones((accessor) => { ... })

@alexdima alexdima added this to the Backlog milestone Aug 16, 2016
@alexdima alexdima self-assigned this Aug 16, 2016
@jrieken jrieken closed this as completed Aug 30, 2016
@mattgodbolt
Copy link
Contributor

I'd be interested in this too. I can't see how changeViewZones works (there doesn't appear to be much documentation on what this function does or how it could allow placement of inline blocks).

It's not clear if ContentWidgets could cover this use case either.

My use case: implementing inline error widgets much like these: https://godbolt.org/g/6Y90j3 (I'm currently using the CodeMirror editor but am considering moving to Monaco).

@alexdima
Copy link
Member

alexdima commented Jan 13, 2017

@mattgodbolt
You can set error/warning markers on a model and the editor's built-in Error widget can kick in via F8:

image

That widget is implemented by using both a view zone and an overlay widget. The trick is to listen to the view zone's callbacks in order to align the overlay widget on top of the view zone.

@mattgodbolt
Copy link
Contributor

That's fantastic: thanks @alexandrudima

@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants