Conversation
3328356 to
abc4578
Compare
msujew
left a comment
There was a problem hiding this comment.
The change works well on Chromium based browsers, but breaks on FireFox, since we do a bit of monkey-patching:
theia/packages/terminal/src/browser/terminal-widget-impl.ts
Lines 644 to 661 in abc4578
_onIntersectionChange doesn't seem to be a method in the renderService anymore.
|
I was able to get it to work again by replacing the existing code with this: const renderService: any = (this.term as any)._core._renderService;
const originalFunc: (entry: IntersectionObserverEntry) => void = renderService._handleIntersectionChange.bind(renderService);
const replacement = function (entry: IntersectionObserverEntry): void {
if (entry.target.ownerDocument !== document) {
// in Firefox, the intersection observer always reports the widget as non-intersecting if the dom element
// is in a different document from when the IntersectionObserver started observing. Since we know
// that the widget is always "visible" when in a secondary window, so we refresh the rows ourselves
renderService._pausedResizeTask.flush();
renderService.refreshRows(0, renderService._rowCount - 1);
} else {
originalFunc(entry);
}
};
renderService._handleIntersectionChange = replacement; |
@msujew good catch and thank you for the suggestion! I'll add you as a co-author whenever we merge :) |
msujew
left a comment
There was a problem hiding this comment.
I'll tentatively approve. There is still one edge case on FireFox that seems to experience a regression: When maximizing a secondary terminal widget, the renderer becomes quite sluggish, only updating every few seconds.
However, I couldn't figure out what causes it or how to resolve it, so I'll approve anyway. I think it's a rare enough issue. Maybe @tsmaeder can chime in and see how to fix it?
|
@msujew if I look at the relevant code change in |
Yep, just using the correct method fixed the error in the console, but terminals still experienced a render issue. Any terminal didn't re-render anymore after popping it out to a secondary window. |
|
I think this is worth investigating: if you look at the code in RendererService.ts, I think the only time the |
f572553 to
9e63a03
Compare
tsmaeder
left a comment
There was a problem hiding this comment.
Putting a block on this one so nobody accidentally merges it: I believe we have a performance problem with incremental updates after the library update.
The commit bumps `xterm` and related addons to their latest versions to benefit from additional improvements and bug fixes. Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
|
@msujew can you remember what the exact rendering issue was on firefox? For me, there are rendering issues when I resize the external window, but they are the same on chrome and on firefox. |
Sure, go ahead! |
- reestablished patch for intersection observer - enabled scroll bars on Firefox Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
9e63a03 to
538dc95
Compare
Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
|
@msujew I fixed the tests. Could you give this one another review? |
msujew
left a comment
There was a problem hiding this comment.
Yep, perfect. Works good now. No sluggishness on Firefox anymore.
What it does
The pull-request bumps
xtermand related addons to their latest versions to benefit from additional improvements and bug fixes.How to test
split terminalworks as expectedReview checklist
Reminder for reviewers