popover: Allow message actions menu to support larger max-width.

Previously, the option texts were split into 2 lines due to the lack of
space in the message menu. We want to fix this by increasing the max-width
of the menu so it can support the entire text in 1 line while also providing
additional space for longer text.

Since, 320px is the maximum supported supported width for mobile, we will
allow the max-width value to flex from 320px to 350px depending on the
window_width
This commit is contained in:
Joelute 2023-05-08 01:10:21 -04:00 committed by Tim Abbott
parent a97c4708e8
commit 17252cc526
1 changed files with 3 additions and 3 deletions

View File

@ -523,9 +523,9 @@ export function initialize() {
});
tippy_no_propagation(".actions_hover .zulip-icon-ellipsis-v-solid", {
// The is our minimum supported width for mobile. We shouldn't
// make the popover wider than this.
maxWidth: "320px",
// 320px is our minimum supported width for mobile. We will allow the value to flex
// to a max of 350px but we shouldn't make the popover wider than this.
maxWidth: "min(max(320px, 100vw), 350px)",
placement: "bottom",
popperOptions: {
modifiers: [