Skip to content

JetBrains: Constrain the maximum size of the context menu dropdown

Administrator requested to merge ps/fix-search-context-dropdown-max-height into main

Created by: philipp-spiess

Closes #35916 (closed)

This PR adds a constraint to the maximum height of the search context dropdown element. This is necessary because when we render it inside our JetBrains window, we only have limited height available (a problem that the web client luckily doesn't have--yet?).

Unfortunlaty this is not a complete fix as we calculate the available offset based on the hardcoded position on where the dropdown opens inside the JetBrains extension. For a full fix we'd need to pass in the top offset that the DropdownMenu calculates but I haven't find an easy way to do this in the docs.

Changes to the upstreams components:

  • I added a display: flex to the search menu container so that it responds to a changed max-height. This does not change the visual appearance so I thought upstreaming this is fine?
  • I added a way to pass-through a className property to the search menu container so that a caller can constraint it's size.

Test plan

Upstream (SearchContextMenu/>)

Before After
before after

JetBrains

https://user-images.githubusercontent.com/458591/173836245-ea6fe38e-3d0b-40ad-8759-d156d2147e59.mov

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading