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

[Bug] Missalignment of suggestion details widget #3373

Closed
1 task done
scebotari66 opened this issue Oct 18, 2022 · 7 comments · Fixed by microsoft/vscode#198730
Closed
1 task done

[Bug] Missalignment of suggestion details widget #3373

scebotari66 opened this issue Oct 18, 2022 · 7 comments · Fixed by microsoft/vscode#198730
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug suggest

Comments

@scebotari66
Copy link

scebotari66 commented Oct 18, 2022

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Yes

Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.41.0#XQAAAAK3CAAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscxENr3d8FMVJpPoRyBdi9M1_G4fz_GHkPnDw5FYv-hVPgAMoHABKlIQi4n62ngTJKgw_lB7UqM528p93eRQnjoQEYDROpybsGpmMY30rRB_zqBBRr2P8BcL6VoRPcFBP8vuHFMmQBIvpZ30h3mwtJjTJARuemYc_E2vVnPno_tjKO1C3WL07AMeVx1e4tyY0vHYHawRhyPTybHclOE6_I0gd0P4buT5vwdjeILuwtYKNzuShe7SaMw8x8puQGut6HYseICrym1wro7mpFbSu_T7R7skYT0_L5xafyGBsAuSn8HiAro1jsfIADWhKSdC42ENKJ0RCMBGoKlix_DYs2xXKqOfZMPNSKOWDkUdoOGSOAw9DpEL1VvU5JQQTsQQ28nn48G4TeOgy0ynwqZIRhSCi6kmBV__5i2cB1TeOOPKkQ7p6ALq4lNZd4HV5IcDk21AupS28ioiTDEJ01uyY8Fq5vmqPMaq6G4Y-FrsQ4ybeLtEA99N_CK4xpxgDvr9kQpCwcDBvltBUVbAGZK85dLn6D5EpRI2ABqXpfjxTAIqndQ8G_9EQDRogRyG6K_QJVs0_hUjcI6cuBT6I0J3jUfLb9XvQKWnFnNxoWYtFIeyq8ZqXTD7X30dD8HuRQ8sIhGeYCjrYfg_GVCcvRW41fVteuTe2BaMTHlX6afsXEOIZcmMtvBR6BfRfpVrv2U1tNYGcHL6MgU3atV3tFoEuYvOmWyoi74kbRetavf34ZwdUwFV2ataL3RotMX9Bq6WJwNqllg9m-5tABWmz26mxI5IqYZeP4QeKZNSG3lgAsG3Qv-HoeCRDC9-rt_-tqg_0J2xPdLiQeOyXxbVQwgFZ7Gdhj7xnKRzVxleOMDSW4Dg-5k0_zn4oXpYLBYh4jgo85IhcI5eaAcSRgDgenx_d6rw7q6PM_t7Gm5Y3PqwM9oTn4GUruLgY8dU6Nm9zhQ6PPSj0aGYdNqltpgrZTYIe7rWwnkjH9r_nKQei9iyV5DDgqS4qsIvI1cnA9uunHhDnWSgGs6N_NeevwhAi90HmkBErHYEHY4KnjfBozG-RLqT1FM8xxl3sl7vt_KegGw1kiAINzHoA2yJZMM4gb1fCizrNuCl03NTBZGLPCHKQR2kxTknGlUwkUG-PDwrtB91XFIJPCR4P_nDersmN0tThTjpXwd2dKlfjQJxI3_dQEKAA

Thanks @LyqXMU

Reproduction Steps

Inside the "dependencies" object type lodash.
After the suggestion appears, click on the "Read more" arrow to see the suggestion's documentation.
image

Actual (Problematic) Behavior

The suggestion details widget is not aligned correctly

image

Expected Behavior

The suggestion details widget should be aligned below the suggestions widget

image

Additional Context

image

The root cause of the problems lies in the fact that the suggestion details widget has fixed css value for position.
And it assumes that it is positioned relative to the viewport. But this is not always the case (see related issues #2503 and #2793).

Excerpt from MDN web docs (emphasis mine) regarding fixed positioning:

The element is removed from the normal document flow, and no space is created for the element in the page layout. It is positioned relative to the initial containing block established by the viewport, except when one of its ancestors has a transform, perspective, or filter property set to something other than none (see the CSS Transforms Spec), or the will-change property is set to transform, in which case that ancestor behaves as the containing block.

So when you have an ancestor element with one of the mentioned properties that forms a containing block, the suggestion details widget gets misaligned.

The problems exists also for the suggestions widget if fixedOverflowWidgets is enabled (see mentioned related issues). But by default the suggestions widget is absolute positioned. And you can also use the overflowWidgetsDomNode to place the elements outside so that fixed will be relative to the viewport.

You don't have such options for the suggestion details widget.

@kristw
Copy link

kristw commented Nov 6, 2022

I just run into a similar issue for the hints when fixedOverflowWidgets is enabled.

@hediet hediet added bug Issue identified by VS Code Team member as probable bug inline-completions suggest and removed inline-completions labels Dec 13, 2022
@jrieken jrieken removed the bug Issue identified by VS Code Team member as probable bug label Feb 24, 2023
@whitemiaool
Copy link

+1

2 similar comments
@YemreGurses
Copy link

+1

@LyqXMU
Copy link

LyqXMU commented Aug 29, 2023

+1

@hediet
Copy link
Member

hediet commented Aug 29, 2023

Please update the playground example to include a link to an example where it reproduces. Thanks!

@LyqXMU
Copy link

LyqXMU commented Aug 29, 2023

Please update the playground example to include a link to an example where it reproduces. Thanks!

Playground Link:
https://microsoft.github.io/monaco-editor/playground.html?source=v0.41.0#XQAAAAK3CAAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscxENr3d8FMVJpPoRyBdi9M1_G4fz_GHkPnDw5FYv-hVPgAMoHABKlIQi4n62ngTJKgw_lB7UqM528p93eRQnjoQEYDROpybsGpmMY30rRB_zqBBRr2P8BcL6VoRPcFBP8vuHFMmQBIvpZ30h3mwtJjTJARuemYc_E2vVnPno_tjKO1C3WL07AMeVx1e4tyY0vHYHawRhyPTybHclOE6_I0gd0P4buT5vwdjeILuwtYKNzuShe7SaMw8x8puQGut6HYseICrym1wro7mpFbSu_T7R7skYT0_L5xafyGBsAuSn8HiAro1jsfIADWhKSdC42ENKJ0RCMBGoKlix_DYs2xXKqOfZMPNSKOWDkUdoOGSOAw9DpEL1VvU5JQQTsQQ28nn48G4TeOgy0ynwqZIRhSCi6kmBV__5i2cB1TeOOPKkQ7p6ALq4lNZd4HV5IcDk21AupS28ioiTDEJ01uyY8Fq5vmqPMaq6G4Y-FrsQ4ybeLtEA99N_CK4xpxgDvr9kQpCwcDBvltBUVbAGZK85dLn6D5EpRI2ABqXpfjxTAIqndQ8G_9EQDRogRyG6K_QJVs0_hUjcI6cuBT6I0J3jUfLb9XvQKWnFnNxoWYtFIeyq8ZqXTD7X30dD8HuRQ8sIhGeYCjrYfg_GVCcvRW41fVteuTe2BaMTHlX6afsXEOIZcmMtvBR6BfRfpVrv2U1tNYGcHL6MgU3atV3tFoEuYvOmWyoi74kbRetavf34ZwdUwFV2ataL3RotMX9Bq6WJwNqllg9m-5tABWmz26mxI5IqYZeP4QeKZNSG3lgAsG3Qv-HoeCRDC9-rt_-tqg_0J2xPdLiQeOyXxbVQwgFZ7Gdhj7xnKRzVxleOMDSW4Dg-5k0_zn4oXpYLBYh4jgo85IhcI5eaAcSRgDgenx_d6rw7q6PM_t7Gm5Y3PqwM9oTn4GUruLgY8dU6Nm9zhQ6PPSj0aGYdNqltpgrZTYIe7rWwnkjH9r_nKQei9iyV5DDgqS4qsIvI1cnA9uunHhDnWSgGs6N_NeevwhAi90HmkBErHYEHY4KnjfBozG-RLqT1FM8xxl3sl7vt_KegGw1kiAINzHoA2yJZMM4gb1fCizrNuCl03NTBZGLPCHKQR2kxTknGlUwkUG-PDwrtB91XFIJPCR4P_nDersmN0tThTjpXwd2dKlfjQJxI3_dQEKAA

Reproduction Steps

Input 'lo', and click the arrow to show details

@denny99
Copy link

denny99 commented Oct 11, 2023

I can confirm this issue. With the fixed overflow widgets, its totally misaligned

image

@jrieken jrieken added *duplicate Issue identified as a duplicate of another issue(s) bug Issue identified by VS Code Team member as probable bug and removed *duplicate Issue identified as a duplicate of another issue(s) labels Dec 6, 2023
jrieken added a commit to microsoft/vscode that referenced this issue Dec 14, 2023
yiliang114 pushed a commit to yiliang114/vscode that referenced this issue Jan 3, 2024
…Code

Fixed issue Misalignment of suggestion details widget (microsoft/monaco-editor#3373)
@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2024
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 suggest
Projects
None yet
8 participants