Commit Graph

61697 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 a19287d581 streams: Optimize fetching setting values for web public subs.
This commit updates code to fetch the group setting values
efficiently for web public subscription objects.
2024-11-19 13:26:42 -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
Sahil Batra f4c00ce053 streams: Fix setting values passed in never subbed dicts.
This commit fixes the code to pass AnonymousSettingGroupDict
value instead of group ID when the setting is set to anonymous
groups in never subscribred streams subscription dicts.
2024-11-19 13:26:42 -08:00
Lauryn Menard 919636be37 docs: Document generate-webhook-url-basic macro.
Fixes the create a channel macro point to link to an integration
doc that is still using that macro.
2024-11-19 13:02:01 -08:00
Lauryn Menard 22e3c80329 docs: Remove out of date or redudant macro information.
The `SITE` variable mentioned in the removed text seems to no
longer be part of the integrations system.

Removed the second bullet point documenting the macro to create
an incoming webhook instruction.
2024-11-19 13:02:01 -08:00
oscar 9d1ca5476a integration-docs: Remove create channel for generate webhook URL docs.
Updates text of generate-webhook-url-basic.md to replace the use of
the "Create the channel" step.

Removes {!create-channel.md!} from all the integrations docs that
also include {!generate-webhook-url-basic.md!}.

Fixes #32269.
2024-11-19 13:02:01 -08:00
Lauryn Menard bc01485c01 billing: Remove invoice option for users with fixed price plan offer.
Currently, the user selected invoice option requires manual license
management, and a fixed-price plan offer requires automatic license
management.

If we're offering a fixed-price plan and the user wants to pay by
invoice, then the current system in place require us to create the
invoice in Stripe first and then input it manually via the support
page for the customer.
2024-11-19 12:42:11 -08:00
Anders Kaseorg c48ef926e1 mypy: Add types-defusedxml.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-19 11:09:34 -08:00
Anders Kaseorg 532aee926c requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-19 11:09:34 -08:00
Anders Kaseorg a3eae0b6f0 python-warnings: Remove python-binary-memcached exemption.
The fix was merged upstream in 0.31.3.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-19 11:09:34 -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
jitendra-ky ca14366e38 import: Replace generic Exception with CommandError.
This change improves error handling in `do_import_realm` by replacing
the use of a generic Exception with CommandError. The updated approach
provides clearer, user-friendly error messages when there is a version
mismatch between the exported data and the Zulip server.

Fixes #32292.
2024-11-18 18:35:14 -08:00
Tim Abbott ffa7e0ac08 docs: Simplify Docker trade-offs discussion. 2024-11-18 16:37:50 -08:00
Tim Abbott 18246ebd9f i18n: Update translation data from Transifex. 2024-11-18 16:12:31 -08:00
Tim Abbott d8e02923e2 docs: Update changelog for changes merged into main. 2024-11-18 16:12:31 -08:00
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
Sahil Batra d5a391a56b streams: Optmize code to send events on creating stream.
This commit updates code to effectively compute the setting
values when creating stream object to be sent in stream creation
events.
2024-11-18 11:55:19 -08:00
Sahil Batra 7adc83d2a0 streams: Optimize code for computing stream objects.
This commit updates code to optimize code for computing stream
objects to be sent with stream creation event and in response
for 'GET /streams/{stream_id}' endpoint by optimizing number
of queries while computing values for group permission settings.

This change does not benefit much currently as we only have one
stream group permission setting, but is important before we add
more stream permission settings.

There are a couple of places left where we can still optimize
the code and that would be done in further commits.
2024-11-18 11:55:19 -08:00
Sahil Batra 2cc0f482e1 streams: Refactor code to compute setting group values.
This commit adds a new function to compute setting group
values for a list of streams, so we can avoid having duplicate
code for computing setting group IDs from streams.
2024-11-18 11:55:19 -08:00
Sahil Batra b20c24c09d streams: Compute object only when needed.
This commit updates code to compute the values for group permission
settings in send_stream_creation_events_for_previously_inaccessible_streams
only when we need to send the events. This helps us in avoiding
unnecessary DB queries.
2024-11-18 11:55:19 -08:00
Sahil Batra f2158c42a7 streams: Do not call "locals()" inside loop.
There is no need to call "locals()" inside the loop for
stream permission settings. It should just be called once
to get values of all the settings passed to the endpoint.

It was fine as we only had one group permission setting
for stream, but is a good fix before we add more settings.
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