The alignment of icon and text of the disabled option in
dropdown widget was somewhow broken due to an extra span
element present which broke the grid layout used for
rendering the icon and text properly.
This also makes the layout consistent with other options
shown with icon.
This was due to e643d7e6fd which resulted in space
between icon and text. We could have fix that by using
"~" character to remove whitespace in handlebar templates
but making the layout consistent felt a better choice.
This commit adds a "mapping" URL option preset that adds "Matching Zulip
channel" option to the stream dropdown widget. When that option is
chosen from the dropdown, it adds another parameter to the integration
URL -- "&mapping=channels".
This "mapping" parameter is meant to be used by integrations like Slack
to identify whether the user wants to map Slack channels to different
Zulip channels or different topics within a single channel.
This adds an icon for the `mapping`s' drop down option in the "Where to
send notification" drop down field.
Co-authored-by: Pieter CK <pieterceka123@gmail.com>
Co-authored-by: Lauryn Menard <lauryn@zulip.com>
This commit refactors code for DropdownWidget to handle clicks
on edit and delete buttons in a separate click event handler
and not in the handler for selecting one of the items in
dropdown.
This is important to make sure that selected value stored for
dropdown widget is not updated on clicking the icon.
This commit updates code to pass aria-label for icon buttons
in dropdown widget options so that they can be used in
dropdown_list.hbs template instead of directly defining them
in the template file.
We currently show buttons in saved snippets dropdown only
so defining the labels in template file worked correctly
but it is good to pass them as variables so that it is
simpler to add buttons for other dropdowns when required.
We currently always show fa-ban icon and "Disable" text for
"Disabled" or "None selected" option in dropdown-list widget.
This commit adds code to provide an option for not showing the
fa-ban icon and having the option text be something other than
"Disable". This will be used in channel folder dropdown widget
where we want to have "None" text in the option without icon.
This commit renames `active` to `current_user_setting` and
`is_item_selected` to `is_current_user_setting` to clarify
it’s the user’s current choice, not hover, and to prevent
future naming conflicts.
Previously, the dropdown had a bug where the first item
was highlighted regardless of the selected option.
This commit fixes the bug, ensuring that the
selected option is now correctly highlighted.
Fixes: #33066
This commit improves the saved snippets UI through the following ways:
- Reduces the space between the saved snippet title and description for
a more interconnected feel.
- Changes the delete icon from the old font-awesome icons to using the
new icon button component.
- Adds line-clamping to the saved snippet description to display two
lines of text instead of one, presenting the user with more context.