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

Long quick info has no scrollbar #40674

Closed
ghost opened this issue Dec 21, 2017 · 4 comments
Closed

Long quick info has no scrollbar #40674

ghost opened this issue Dec 21, 2017 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@ghost
Copy link

ghost commented Dec 21, 2017

  • VSCode Version: Code - Insiders 1.20.0-insider (3aed233, 2017-12-20T06:12:56.284Z)
  • OS Version: Linux x64 4.4.0-21-generic
  • Extensions: none

Steps to Reproduce:

  1. Paste this text:
declare function update<T>(a: T, b: Partial<T>): void;
update({
    a: 0,
    b: 0,
    c: 0,
    d: 0,
    e: 0,
}, {
    b: 3,
});
  1. Hover over update.
  2. Expected to get a scrollbar. Instead the text just gets cut off.
@weinand
Copy link
Contributor

weinand commented Dec 21, 2017

Yes this is a regression in Insiders:

2017-12-21_23-49-22

Here the behaviour in Stable:

2017-12-21_23-43-49

@joaomoreno
Copy link
Member

joaomoreno commented Dec 22, 2017

Broken by bfe83a8 🤔 cc @jrieken

@joaomoreno joaomoreno added this to the Backlog milestone Dec 22, 2017
@joaomoreno
Copy link
Member

Turns out there is a different between TPromise.join and Promise.all, very similar to the difference between promise ctors:

  • In the TPromise version, the join then callback gets called as soon as signalInnerHTML fires. When renderMarkdown returns, all colorized code is in the hover DOM. The hover widget tells the scrollbar to scan the DOM to compute the content height and everything works fine.
  • In the Promise version, the join then callback only gets called on the next execution frame... so the hover widget tells the scrollbar to scan the DOM before any of the colorized code is placed in the DOM.

As a fix for this particular issue, I've added a codeBlockRenderCallback option to the markdown render function, which gets called every time colorised code gets inserted into the DOM. Ugly, but effective. @mjbvz

@mjbvz mjbvz modified the milestones: Backlog, December 2017/January 2018 Dec 22, 2017
@mjbvz mjbvz added the bug Issue identified by VS Code Team member as probable bug label Dec 22, 2017
@mjbvz
Copy link
Contributor

mjbvz commented Dec 22, 2017

Thanks @joaomoreno! That approach looks like it will work.

The whole reason these are async is the call to getOrCreateMode. Not sure if that can be avoided

@RMacfarlane RMacfarlane added the verified Verification succeeded label Feb 1, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants