28 Commits

Author SHA1 Message Date
Sahil Batra
feaaf9ff03 drodpown: Do not use fa-ban icon for disabled option. 2025-10-20 16:30:06 -07:00
Sahil Batra
46f338f54f dropdown-widget: Fix alignment of disabled option.
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.
2025-10-20 16:30:06 -07:00
Karl Stolley
be53f22fff layout: Tweak dropdown for correct icon-label alignment. 2025-09-03 17:37:14 -07:00
Karl Stolley
dc87f418f3 dropdown_lists: Provide uniform .dropdown-list-item-name structure. 2025-08-12 12:41:31 -07:00
Karl Stolley
3cb8247d76 dropdown_lists: Conditionally present grouped buttons.
Co-Authored-By: Kunal Sharma <v.shm.kunal@gmail.com>
2025-08-12 12:41:31 -07:00
Karl Stolley
1b62a7579e dropdown_lists: Structure all name text with a span. 2025-08-12 12:41:31 -07:00
Karl Stolley
4c129e73b7 dropdown_lists: Simplify selected item-text class. 2025-08-12 12:41:31 -07:00
Niloth P
7022811349 integrations: Add URL option and UI for mapping messages to Zulip channels.
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>
2025-08-07 17:19:03 -07:00
Sahil Batra
524442bf44 streams-ui: Add UI to update and archive channel folders.
This commit adds edit and delete buttons in the dropdown
list for folder.

Fixes #35498.
2025-08-04 13:22:11 -07:00
Sahil Batra
da53d5b978 dropdown-widget: Handle button click in a separate click handlers.
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.
2025-08-04 13:22:11 -07:00
Sahil Batra
e7cb472188 dropdown-widget: Pass aria-label for icon buttons in options.
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.
2025-08-04 13:22:11 -07:00
Sahil Batra
e643d7e6fd dropdown-list-widget: Allow customization for "Disable" option.
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.
2025-06-10 11:51:58 -07:00
Aditya Kumar Kasaudhan
9971b08cce dropdown_widget: Rename active class to current_user_setting.
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.
2025-05-30 13:31:37 -07:00
Karl Stolley
d5822a04be decorated_channels: Present names in DOM nodes. 2025-04-22 11:26:12 -07:00
Karl Stolley
3671a6a39c decorated_channels: Rename privacy-icon class. 2025-04-22 11:26:12 -07:00
Karl Stolley
1c55004cda decorated_channels: Rename partial as 'decorated_channel'. 2025-04-22 11:26:12 -07:00
Vector73
9c5535f447 saved_snippets: Use intent="neutral" for edit icon. 2025-03-17 11:03:25 -07:00
Vector73
b31024be47 saved_snippets: Add support for editing saved snippets.
Fixes #33708.
2025-03-13 10:58:36 -07:00
whilstsomebody
865d847492 dropdown_widget: Fix dropdown highlighting in inbox/conversations menu.
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
2025-03-11 12:11:50 -07:00
Sayam Samal
06abc0bcff saved_snippets: Improve saved snippets UI.
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.
2025-03-04 10:36:15 -08:00
Vector73
66113365a5 saved_snippets: Add new feature for saved snippets.
Fixes #31227.
2024-10-01 11:48:15 -07:00
Shubham Padia
9de064dc3e css: Use classname for setting-disabled-option icon.
Having the selector there affects the performance. See
https://chat.zulip.org/#narrow/stream/6-frontend/topic/CSS.20selector.20performance/near/1845719
for more details.
2024-09-03 10:18:29 -07:00
Aman Agrawal
861ac92747 inbox: Add description to FILTERS dropdown. 2023-11-22 23:38:52 -08:00
Aman Agrawal
69d59acc5a inbox: Focus currently selected option in dropdown. 2023-11-10 10:22:18 -08:00
Aman Agrawal
67ba59f6e8 dropdown_list: Remove not useful role=menuitem.
Since the parent `ul` has doesn't have role=menu and `ul/li` elements
don't need a be specified a role anyway. We don't need it.
2023-10-20 12:36:39 -07:00
Aman Agrawal
6efcb7a349 dropdown_widget: Refactor to use Class. 2023-07-27 14:10:08 -07:00
Aman Agrawal
012f91eaba dropdown_widget: Show "No search results" instead of an empty list. 2023-05-10 12:00:18 -07:00
Aman Agrawal
a196b949f7 dropdown_widget: Implement dropdown widget using tippy.
This will soon replace DropdownListWidget.
2023-05-09 14:11:26 -07:00