dropdown_list_widget: Set dropdown menu wide enough to fit options.

We now set the width of dropdown menu opened for dropdown-list-widget
elements such that it is enough for all the options. For smaller
screens the dropdown menus are wide since the settings panel and
modal content can be scrolled horizontally.
This change is done only for dropdown-list-widget elements in
"Organization settings" panel and in bot-owner widget in bot edit
modal.

We don't do this change for move topic modal now as it cannot be
scrolled horizontally and appears beneath the button due to position
property.
This commit is contained in:
Sahil Batra 2023-03-08 16:28:11 +05:30 committed by Tim Abbott
parent 7d9fe8fd23
commit bd9d1b9158
3 changed files with 14 additions and 9 deletions

View File

@ -842,3 +842,15 @@ div.overlay {
font-size: 1em;
}
}
#settings_content,
#stream_settings,
#edit_bot_modal {
.dropdown-list-widget .dropdown-list-wrapper {
width: fit-content;
span {
width: fit-content;
}
}
}

View File

@ -1515,6 +1515,8 @@ $option_title_width: 180px;
.dropdown-search > input[type="text"] {
margin: 9px;
/* 100% - 2* (9px (margin) + 1px (border) + 6px (padding)) */
width: calc(100% - 32px);
}
.dropdown-menu {

View File

@ -998,15 +998,6 @@ div.settings-radio-input-parent {
min-width: 325px;
max-width: 100%;
}
ul.dropdown-menu {
width: 325px;
input {
/* 325 - 2* (9px (margin) + 1px (border) + 6px (padding)) */
width: 293px;
}
}
}
}