posit-dev / positron

Positron, a next-generation data science IDE
Other
2.53k stars 79 forks source link

Cannot scroll through all options in dialog (cut off by Positron window size) #3061

Open juliasilge opened 5 months ago

juliasilge commented 5 months ago

Positron Version:

2024.05.0 (Universal) build 1157

Steps to reproduce the issue:

  1. Bring up some data in the Data Explorer that has a lot of columns, such as with View(nycflights13::flights)
  2. Resize the Positron window to be pretty small
  3. Try to scroll through the column names in a column filter
  4. You cannot scroll through all of them with your mouse, and if you try with arrow keys, you can't see what you might be selecting.

https://github.com/posit-dev/positron/assets/12505835/60070b30-a928-4785-922f-e64c1dad01d6

What did you expect to happen?

I expected to be able to scroll through all the options in a menu. This looks related to the problem I describe for the New Project Wizard in https://github.com/posit-dev/positron/issues/2982#issuecomment-2099365183, so maybe this is a problem for all our dialogs.

Were there any error messages in the output or Developer Tools console?

None that look related.

sharon-wang commented 5 months ago

The dropdowns used in the New Project modal use the general-purpose DropDownListBox component, which is based on a ModalPopup component. The dropdowns related to filtering the data grid use a different component also based on ModalPopup.

We'll need to expand on the ModalPopup to support resizing according to different window sizes, which I think this issue focuses on. This issue and the behaviour mentioned in #2982 cover the vertical overflow of dropdown content. There are also some instances of horizontal overflow of content, but I don't recall which usages of the dropdown components are affected 😓

We may want to open a separate issue for the DropDownListBox to include scroll and search support (that functionality is only available in the data grid filter dropdowns currently).

CC @softwarenerd for awareness! I think we also discussed pulling the data grid filter dropdown functionality into a more general-purpose component, so both DropDownListBox and something like DropDownComboBox can be used outside of the data grid.

juliasilge commented 5 months ago

There is a similar problem with dialogs that go out of the Positron window horizontally:

Screenshot 2024-05-09 at 5 20 42 PM