Commit Graph

6585 Commits

Author SHA1 Message Date
joseph 55ffa76b4c settings: Add missing class to labels in stream settings.
Some labels in stream settings were missing the class name for settings
labels. Add the missing class name to the labels.

Fixes part of #21769.
2024-11-19 18:37:02 -08:00
joseph ca650368bc settings: Open group setting typeahead when its label has been clicked.
Add an event listener so that clicking on its label will open the
typeahead.

Fixes part of #21769.
2024-11-19 18:37:02 -08:00
joseph 9aaa7719fa settings: Focus on the input when its label has been clicked.
Our user type field utilizes the contenteditable div which isn't a
labelable element, so clicking on its label doesn't do anything. Add
an event listener so that clicking on the label will focus on the input.

The cursor will always be placed at the start of the input if the field
is accessed in this way. This is the browser's default behavior.

Fixes part of #21769.
2024-11-19 18:37:02 -08:00
joseph e237faabf5 settings: Open the date picker when its label has been clicked.
Flatpickr isn't a native input element, so clicking on its label
doesn't do anything. Add an event listener so that clicking on the
label will open the date picker.

Fixes part of #21769.
2024-11-19 18:37:02 -08:00
joseph 4ab519214a test: Ensure input field is visible before attempting to click on it.
There is an case of flakiness in the test where we attempt to click on
an input field before it's even visible. Make sure the input field is
visible before attempting to click on it.
2024-11-19 18:37:02 -08:00
joseph f1da8a9151 settings: Fix labels using full width of the modal.
Currently, the labels are using the full width of the modal, which results
in a clickable area that is too large. This commit fixes the issue by
setting the width of the labels to just fit its content.
2024-11-19 18:37:02 -08:00
joseph 8332c7d93b settings: Refactor the labels in stream settings.
This commit changes refactors all the labels in stream settings and
corrects the attribute values to fix the interaction between labels and
select/button elements.

Fixes part of #21769.
2024-11-19 18:37:02 -08:00
joseph ee66488fbf settings: Refactor labels in organization settings.
This commit changes refactors all the labels in organzation settings and
corrects the attribute values to fix the interaction between labels and
select/button elements.

Fixes part of #21769.
2024-11-19 18:37:02 -08:00
joseph cef901367e settings: Refactor the labels in personal settings.
This commit changes refactors all the labels in personal settings and
corrects the attribute values to fix the interaction between labels and
select/button elements.

Fixes part of #21769.
2024-11-19 18:37:02 -08:00
joseph 93e5b7ac55 settings: Remove duplicate class attribute from label element. 2024-11-19 18:37:02 -08:00
Anders Kaseorg d05eb63e7c introduce_zulip_view_modal: Fix invalid @partial-block usage.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-19 17:15:22 -08:00
evykassirer 60763763b2 stream_settings_ui: Convert module to typescript. 2024-11-19 14:01:10 -08:00
evykassirer 9e3cceb551 stream_settings_ui: Consistently return boolean from switch_rows.
This probably worked before because JQuery objects are truthy,
but the one caller of this function seems to expect it to
return boolean.
2024-11-19 14:01:10 -08:00
evykassirer ffef153a14 stream_list: Remove unused parameter passed to rename_stream. 2024-11-19 14:01:10 -08:00
evykassirer 919cebe0f9 components: Let toggle label be optional.
`stream_settings_ui` has only `label_html` and no `label`,
so we need fix this type to be able to convert that module
to typescript.
2024-11-19 14:01:10 -08:00
evykassirer dc0e82deef buddy_list: Move arrow toggle to the left of the header text. 2024-11-19 13:54:40 -08:00
evykassirer 89379c2ca0 right_sidebar: Create variable for left margin. 2024-11-19 13:54:40 -08:00
Maneesh Shukla c2335ebc72 settings: Add user counts to role filter.
This commit enhances the user role filter dropdown by displaying the
count of users for each role in the format "Role Name (count)" (e.g.,
"Owners (3)").Additionally, it shows the total user count in the
"All roles" option, formatted as "All roles (total_count)" for easy
visibility of the overall user base.

Fixes: #18618.
2024-11-19 13:45:15 -08:00
vivek-tripathi-9005 d3ac1d5cb1 notifications: Add help link for "Followed topics" in triggers table.
Previously, the Notification triggers table in Settings lacked a
direct link to documentation for 'Followed topics'.

This commit updates the AllNotifications type to include an optional
'help_link' field and adds conditional rendering in the template to
show the help icon only if 'help_link' is present.The corresponding
test has been updated to verify the presence of the help link.
This enables direct links to relevant docs, improving usability.

Fixes: #32033.
2024-11-19 13:36:12 -08:00
Sahil Batra 7c6110e47a stream_data: Fix code to check permission for unsubscribe others.
We no longer allow admins to unsubscribe others from stream if
they are not allowed as per the can_remove_subscribers_group
setting.
2024-11-19 13:26:42 -08:00
Anders Kaseorg a9d0054efa templates: Remove redundant {{#with this}} blocks.
By definition, `this` is already the current context.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-19 10:53:36 -08:00
Aman Agrawal 666c1e1d95 settings: Fix flaky test.
We wait for settings overlay to be fully visible before
running rest of the tests. Without this, tests were flaky due
to settings overlay not being present when running tests.
2024-11-19 16:14:58 +05:30
Aman Agrawal 4e7bb6c57a message_edit: Show confirm dialog to explain the behaviour. 2024-11-18 15:06:26 -08:00
Aman Agrawal 98265fd149 message_edit: Fix edit last msg hotkey unintentionally marks msgs read.
Fixes #17737

If you write a message in a narrowed view, then go back to an unnarrowed
view, there may now be many unread messages between your new current
position and the message you just wrote. If you then accidentally press
`←`, all of those messages will be marked read unexpectedly, causing you
to lose your place while catching up.

So, we disable the hotkey in this scenario to fix this bug.
2024-11-18 15:06:26 -08:00
Aman Agrawal dd58698c02 message_edit: Rename variable for clarity. 2024-11-18 15:06:26 -08:00
Aman Agrawal c16f3c5eca message_edit: Remove incorrect `from_scroll` value.
Since it is important that the message being edited is visible,
it is safe to ignore `from_scroll` here which is also an
unlikely possibility here.
2024-11-18 15:06:26 -08:00
Karl Stolley f4554613a0 compose: Delegate max-length tooltip to body. 2024-11-18 12:44:24 -08:00
Anders Kaseorg 8b37781b34 templates: Fix @partial-block invocations for explicitPartialContext.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-18 12:38:50 -08:00
Sahil Batra cde4c335b1 group-settings: Refactor code to set up permission setting widgets.
This commit refactors code to set up permission setting widgets
by looping over list of settings.
2024-11-18 11:55:19 -08:00
Sahil Batra 3af84d6e69 group-settings: Use group_setting_value_pill_input template.
We now use group_setting_value_pill_input template for user
group permission settings to avoid duplicate code.
2024-11-18 11:55:19 -08:00
evykassirer b066f58c54 stream_muting: Convert module to typescript. 2024-11-18 11:13:36 -08:00
evykassirer a60beda676 settings_panel_menu: Convert module to typescript. 2024-11-18 11:13:10 -08:00
evykassirer 6093aa4b23 settings_sections: Convert module to typescript. 2024-11-18 10:35:21 -08:00
Aman Agrawal b39347a946 portico: Fix multiple landing pages broken.
Since postcss tries to preserve specificity of selectors which
are defined in in a group, a `:not(#does-not-exist)` selector
was added to the non ID selectors (solutions-page and case-study-page).

This caused the CSS styles to override other styles due to
unexpectedly increased specificity.

To fix it, we remove the ID selector `#why-zulip-page` from the
group.
2024-11-18 10:32:53 -08:00
evykassirer a8abcf5210 right_sidebar: Add missing right margin to header. 2024-11-17 11:54:08 -08:00
Sahil Batra 5d1de4c037 stream-settings: Use new pills UI for can_remove_subscribers_group. 2024-11-16 17:11:08 -08:00
Sahil Batra 46defdfcfb stream-settings: Avoid duplicate IDs for setting elements.
We previously had same ID for setting elements in stream
creation and stream edit form. This commit adds "new_"
prefix before the setting name to avoid duplicate IDs.
2024-11-16 17:11:08 -08:00
evykassirer 005a27a9cf buddy_list: Move header_text calculation to where it's used.
Non-functional change.
2024-11-16 17:01:26 -08:00
vivek-tripathi-9005 c032bd9e78 streams: Move subscriber count from channel pills to channel cards.
Previously, the number of subscribers was displayed on channel pills.

This commit removes the subscriber count from the channel pills and
adds it to the channel cards. The count is styled similarly to the
number of group members in group cards, with the text 'N subscribers'
(or '1 subscriber' for single subscribers).

Fixes: #32235.
2024-11-16 10:49:29 -08:00
Anders Kaseorg e172c717f7 webpack: Enable explicitPartialContext for handlebars-loader.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-15 20:41:59 -08:00
Anders Kaseorg 44c50b3e64 settings: Fix display of status emoji in “User list style”.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-15 20:40:35 -08:00
Tim Abbott f7fe96f814 blueslip: Include message for abnormal traces.
`ResizeObserver loop completed with undelivered notifications` errors
have originalEvent.error=null; in that case, it's worth including the
`message` in what we display.

I think we probably want `message` in every case where this code path
is relevant, so I just append it unconditionally.
2024-11-15 17:06:17 -08:00
Sahil Batra 6bd322ac5d group-settings: Fix live-update of group permission settings.
This commit fixes code to correctly enable the permission
settings when a user gains permission to manage the group.
2024-11-15 16:36:37 -08:00
Sahil Batra d2b29cef2d state_data: Move group_setting_value_schema to types.ts.
This is needed to avoid import cycles in next commit.
2024-11-15 16:36:37 -08:00
evykassirer 5f124ad117 right_sidebar: Simplify and shorten heading titles.
Part of fixing #32268.
2024-11-15 12:49:29 -08:00
evykassirer 5e211d4ac4 right_sidebar: Use all caps for headings.
Part of fixing #32268.
2024-11-15 12:49:29 -08:00
evykassirer c9096c6308 right_sidebar: Change header styling to match left sidebar.
Fixes #32268.
2024-11-15 12:49:29 -08:00
Anders Kaseorg e90d1e9985 webpack: Enable knownHelpersOnly for handlebars-loader.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-15 12:34:58 -08:00
Anders Kaseorg c63b215729 webpack: Fix knownHelpers list for handlebars-loader.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-15 12:34:58 -08:00
Harsh e0bd3713cc message_feed: Add channel-settings-link to bookend.
To replace the previous subscribe/subscribe buttons, we add a button
to visit channel settings (if not subscribed) or manage channel
settings (if subscribed) to trailing bookends.

Fixes #32125.
2024-11-14 16:25:42 -08:00