-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Editor preview #3373
Editor preview #3373
Conversation
@caseyflynn-google you are missing the You are also missing the I noticed you introduced a lot of code as part of your PR, but it would also be nice if you included some unit tests as to not to decrease Theia's overall test coverage. |
@caseyflynn-google cool! really like that optional and not invasive I've noticed following glitches:
|
|
||
protected onResize(msg: Widget.ResizeMessage): void { | ||
if (this.editorWidget_) { | ||
if (msg.width < 0 || msg.height < 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried just to forward a message to an editor?
MessageLoop.sendMessage(this.editorWidget_, msg);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated to pass the message, but we will still need to set the size until autoSizing is working. if you like we can move the code to the editor widget.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that the editor widget already handles it: https://github.com/theia-ide/theia/blob/e8dd128c25294b23741cc345067952ef7cd85864/packages/editor/src/browser/editor-widget.ts#L75-L81
autoSizing
property is not for editors, but for such widgets like REPL, where the editor should be resized if content is changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way I read / interpreted this is the resize will not be performed here: https://github.com/theia-ide/theia/blob/e8dd128c25294b23741cc345067952ef7cd85864/packages/monaco/src/browser/monaco-editor.ts#L291 due to autoSizing being false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not work well in diff editors and when decorations overlapping with folding decorations. - wrong PR
Fixed.
I believe this is the current behavior.
Fixed.
I am not really sure how to accomplish this, any suggestions would be appreciated. |
Done. |
Got this fixed. |
68dba24
to
ca26b20
Compare
@caseyflynn-google please look at build failures, it seems you forgot to push changes to travis file. It is auto-updated to cache a new extension by travis. |
@marcdumais-work @svenefftinge Is it possible to add @caseyflynn-google as a Eclipse Theia committer? |
Sure, would be great to have you Casey! Are you interested? |
Sure, sounds like a good idea, at least eventually. Someone would need to nominate him through the Eclipse Foundation tool for that effect, providing a solid case to justify the nomination, to the current committers' satisfaction. Usually it means listing significant contributions to the project, and making the case of how they warrant the person being made a committer (e.g. some mix of quantity/quality/complexity/rarity of the documented contributions). I have not followed closely enough to know whether that's arguably the case, here, yet. More details: https://wiki.eclipse.org/Development_Resources/HOWTO/Nominating_and_Electing_a_New_Committer |
d68c307
to
95b7b3f
Compare
@@ -0,0 +1,7 @@ | |||
# Theia - Editor Preview Extension | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have a description of what this extension brings. Maybe some bits from the overview part from this comment could be copied: #1252 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@caseyflynn-google impressive (first I think?) contribution. Good analysis of the problem in #1252. I just tried the PR on Gitpod, and I think I'll use it daily once merged. I see that beyond the immediately apparent feature, you've added infrastructure to make it easier to support preview for other widgets - even nicer. Thanks! Just a heads-up: this PR is getting close to the 1000 LoC limit. Over that we will need to submit a CQ, which would delay a bit merging. It looks like it's almost ready to merge, in any case? |
Glad to hear this is a useful feature!
I think this is ready to merge. I will add additional documentation in the README.md after this has merged to keep it under the 1000 LoC limit. |
Absolutely. |
95b7b3f
to
63e7a29
Compare
Signed-off-by: Casey Flynn <caseyflynn@google.com>
63e7a29
to
f2a2e51
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@svenefftinge the build still fails due to some leftovers, should we revert? |
Seems related to this commit:
|
build error: |
Fix: #3555 |
Fix #1252 Add support for a preview code editor.