Commit Graph

62888 Commits

Author SHA1 Message Date
Alya Abbott
a4e8b97e28 contributor docs: Document policy for non-code attributions. 2025-02-03 16:50:05 -08:00
Sahil Batra
f644c23e84 groups: Fix code to show newly added settings in permissions panel.
The newly added "can_create_write_only_bots_group" and
"can_create_bots_group" were not added in "Permissions" panel
of groups UI if the group has that permission and this commit
fixes it.

We also add a function called in ui_init.ts to make sure that
the settings data defined in settings_config.ts used for
"Permissions" panel contains all the group settings.
2025-02-03 13:42:02 -08:00
Sahil Batra
fd70e83980 streams: Fix incorrect setting value in stream creation event.
Value for "can_administer_channel_group" passed in stream
creation event was incorrect when there was no value passed
for the setting while creating the stream and thus the setting
was set to anonymous group containing stream creator as default.

This was because code for creating setting_groups_dict, which
is used to send setting values in the stream creation event,
incorrectly assumed that defaults for all settings is a system
group.

This was not noticed before because we pass all the settings
when creating streams using webapp, but can be reproduced
by creating streams using API without passing any value for
"can_administer_channel_group".
2025-02-03 13:42:02 -08:00
Maneesh Shukla
be8093197e compose: Add notice to confirmation banner.
This commit adds a note to the confirmation banner when a message is
scheduled for less than the MINIMUM_SCHEDULED_MESSAGE_DELAY_SECONDS.
The approach here is to use the flatpickr's onClose method.
onClose callback is triggered when the user selects a date. We compare
the selected date with the minDate set in the flatpickr and based on the
time set by the user we update the flag
minimum_scheduled_message_delay_minutes_note.

Fixes: #28503.

Co-authored-by: ankur prabhu <ankurprabhu0531@gmail.com>
2025-02-03 12:20:47 -08:00
Harsh Bansal
ee51474a05 compose (misc): Fix send message on enter in topic input.
This commit prevents sending the message when pressing
enter while on focus at topic input box.

The variable target_sel has a value of '#stream_messagee_recipient_topic'
instead of 'input#stream_message_reciepient_topic', which is one of the
reason of this bug.

Fixes: #32596
Co-Authored-By: Aman Agrawal <amanagr@zulip.com>
2025-02-03 12:18:58 -08:00
Niamh
9dfa477b7f docs: Add a missing word in mentoring guide. 2025-02-03 12:16:59 -08:00
Anders Kaseorg
7c2212caa3 node_cache: Work around corepack breakage due to npm key rotation.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-03 11:29:39 -08:00
Tim Abbott
42bc59b802 hash_util: Parse with operators for copy/paste. 2025-02-02 11:46:05 -08:00
Tim Abbott
dcd4d261c7 markdown: Document possible_linked_stream_names. 2025-02-02 10:06:22 -08:00
evykassirer
678106b1f3 user_profile: Use em to scale height of name heading with font size. 2025-02-01 18:54:29 -08:00
opmkumar
6789c9d648 search: Add "x" button to the filter of uploaded files table.
Creates a new `filter_text_input.hbs` file to enhance reusability of the
filter component.
The set_up_event_handlers function of `list_widget.ts` has been
modified to listen to the click event of the `.clear-filter` selector.
Additionally, the CSS for the input filter has been updated.

Referenced PR #19578.

Co-authored-by: Nikhil <59444243+nikhilmaske-2001@users.noreply.github.com>

Fixes #32599.
2025-02-01 18:51:36 -08:00
Niloth P
0c6bbe17e3 integrations: Remove arguments passing default logo path values. 2025-02-01 15:38:46 -08:00
Niloth P
249da6ec43 webhooks: Remove arguments passing default image_name values. 2025-02-01 15:38:46 -08:00
Niloth P
51839a72b9 HomeAssistant: Convert image instructions to code blocks.
Renamed the example screenshot to default image name as well.
2025-02-01 15:38:46 -08:00
Niloth P
fa0ea2aa2d webhooks: Remove second example screenshot from Sentry and Teamcity. 2025-02-01 15:38:46 -08:00
Niloth P
74d730f464 webhooks: Rename example screenshot images to match the default name.
The integrations - GoSquared, Greenhouse, OpsGenie and Zendesk - have
been using `000.png` as their example screenshots, renamed them to
match the default name `001.png`, to avoid passing them as arguments.
2025-02-01 15:38:46 -08:00
Niloth P
57054112a7 test_docs: Remove duplicate entry from test_zephyr_disallows_robots. 2025-02-01 15:38:46 -08:00
Niloth P
5892dac9fc test_docs: Add test to check all images in integration docs.
Instead of a separate `test_integration_doc_images` function, the test
is executed as part of `test_integration_doc_endpoints`, to optimize
performance by re-using the doc response.
2025-02-01 15:38:46 -08:00
Niloth P
ccb6c74e95 test_docs: Return response from DocPageTest._test.
Function call hierarchy:
`_test` -> `_check_basic_fetch` -> `get_doc` -> `client_get`

All the functions in the chain return the request returned by
`client_get`, except for `_test`.

Now, `_test` also returns the response from the URL on the root
subdomain when the ROOT_DOMAIN_LANDING_PAGE is set to False.

This enables us to re-use the fetched reponse in our test functions,
and limit each URL to a single call of `client_get`.
2025-02-01 15:38:46 -08:00
Niloth P
acfbf9f46b integrations: Remove unused logos and screenshots.
Remove images that are no longer referenced in the integration docs.

This is in preparation for adding a test that checks image links in
integration docs. This commit is required to make the test pass.
2025-02-01 15:38:46 -08:00
Niloth P
297c529b1b integrations: Move GIPHY logo to the default path.
Generated the bot avatar for GIPHY.
2025-02-01 15:38:46 -08:00
Alya Abbott
3b727d2b51 contributor docs: Fix a nit.
"Conjugation" applies to verbs, not nouns.
2025-01-31 17:46:17 -08:00
Tim Abbott
948e01c8f6 docs: Document plurals better in i18n guide. 2025-01-31 14:32:47 -08:00
Tim Abbott
bd08c0b980 docs: Explain web app translations before server, and use those terms.
This seems good for prioritizing what is important first, and should
make it easier to add the Flutter app in the future.
2025-01-31 14:32:47 -08:00
Alya Abbott
e0cf9d33b8 contributor docs: Reorganize internationalization documentation.
Pull forward content that's actionable for contributors, and
organize it in terms of how it will be applied.
2025-01-31 14:32:47 -08:00
Alex Vandiver
9b4b53ef29 slack: Mark content-type of imported attachments. 2025-01-31 14:29:57 -08:00
Alex Vandiver
33539568ae slack: Ensure a newline before attachment links.
The content `look![image](https://example.com)` does not render as a
link, nor an image upload (were it to `/user_uploads/...`).  The
`![...](...)` syntax is intended for inline images, but unsupported in
Zulip, and as such does not link or render as _anything_.

Ensure a newline between message content and any attachments.
2025-01-31 14:29:57 -08:00
Alex Vandiver
3325151f05 import_realm: Do not enqueue thumbnails on ImageAttachment creation.
This removes a race which parallels 6f20c15ae9, but in the import
path; thumbnails could have been generated while the message content
was being rendered, leaving them permanently with spinners.

The act of rendering the message markdown is what enqueues the
thumbnailing of referenced images; previously, images were enqueued at
least _twice_: once when the row was created, and again for every
message they were referenced in.
2025-01-31 14:29:57 -08:00
Alex Vandiver
90265a3503 import_realm: Clarify comment that we do still access S3. 2025-01-31 14:29:57 -08:00
Alex Vandiver
98362de185 models: Add content_type to ImageAttachment.
This means that only ImageAttachment row needs to be fetched, and
removes the need to pass around an extra parameter.  This
denormalization is safe, since in general Attachment rows are
read-only, so we are not concerned with drift between the Attachment
and ImageAttachment tables.

We cannot make content_type non-null, since while the both the
`content_type` column in Attachment and populating that from requests
predates the ImageAttachment table, we have both backfilled
ImageAttachment rows to consider, and imports may also leave files
with no `content_type`.  Any backfill of currently-null `content_type`
values will thus need to update both tables.

This change fixes a race condition when importing. ImageAttachment
rows are imported before rendering Messages, which are both before
importing Attachment rows; if the thumbnailing finished after the
Message was imported but before Attachment rows were imported, then
the re-rendering step would not know the image's content-type.
2025-01-31 14:29:57 -08:00
Prakhar Pratyush
0788942a68 message_link: Add support for empty string topic in syntax.
This commit adds support for empty string as a valid topic name
in syntax for linking to channel messages.

The server stores it after empty string is replaced with
`realm_empty_topic_display_name` and wrapped with an <em> tag.

The web client parses the rendered_content and updates
the topic_name part in the HTML with topic_name in user's language
+ wraps it in a <span> tag with 'empty-topic-display' css class.
2025-01-31 14:23:15 -08:00
Prakhar Pratyush
53dc5198c6 copy_and_paste: Fix missing empty string topic in message_link syntax.
Earlier, pasting a message_link for a message in empty string topic in
the compose area resulted in #**channel_name@100** syntax instead of the
correct #**channel_name>@100** syntax.

This commit fixes that bug.
2025-01-31 14:23:15 -08:00
Prakhar Pratyush
e08bf15682 stream_topic_link: Add support for empty string topic in syntax.
This commit adds support for empty string as a valid topic name
in syntax for linking to topics.

The server stores it after empty string is replaced with
`realm_empty_topic_display_name` and wrapped with an <em> tag.

The web client parses the rendered_content and updates
the topic_name part in the HTML with topic_name in user's language
+ wraps it in a <span> tag with 'empty-topic-display' css class.
2025-01-31 14:23:15 -08:00
Prakhar Pratyush
3759525807 markdown: Use handlebar to construct HTML that requires escaping.
This commit updates 'handleStreamTopic' & 'handleStreamTopicMessage'
to use handlebar templates for the rendering.

We avoid using JS template literals for constructing complex HTML
that requires escaping.
2025-01-31 14:23:15 -08:00
Alya Abbott
bf694430e9 contributor docs: Add a question about working on old issues. 2025-01-31 14:15:18 -08:00
Sourabh Patel
4f78ecdd47 left_sidebar: Auto-hide on clicking new topic or new direct message.
On smaller screens, where left_sidebar is hidden by default,
clicking the `New topic` and `New direct message` buttons did not
close the left_sidebar because these buttons are located within
the left_sidebar.
Clicking these buttons made the cursor to focus over the compose
but the compose remained half hidden by the left_sidebar.

This commit enables the left_sidebar to automatically hide
when these buttons are clicked by introducing the
auto-hide-left-sidebar-overlay class on these buttons.
2025-01-31 14:10:05 -08:00
Sourabh Patel
fa1f911c5d left_sidebar: Prevent left_sidebar to auto hide on clicking popovers.
Previously, clicking on left_sidebar popovers on smaller screens,
where the left_sidebar is hidden by default, caused the left_sidebar
to close automatically. This required users to repeatedly reopen
the sidebar if they wanted to perform multiple actions on the popover.

This commit resolves the issue by adding the
no-auto-hide-left-sidebar-overlay class to the left_sidebar popovers.

Fixes: #27625
2025-01-31 14:10:05 -08:00
Alya Abbott
a7ab90bf69 tooltips: Make tooltip for saved snippets consistent with other buttons. 2025-01-31 14:07:23 -08:00
Sahil Batra
8422a588ab user-groups: Fix live update of permissions panel on removing permission.
We now hide the "Organization permissions", "Channel permissions" and
"User group permissions" heading if there are no permissions
under that section after removing the permission.

Also, "This group has no assigned permissions" text is shown if the
last permission for that group is removed.
2025-01-31 13:21:45 -08:00
Mateusz Mandera
27b6181597 register_server: Add docs_url to HostnameAlreadyInUseBouncerError.
This means that the URL is only hard-coded on the bouncer side. That's
useful, because now we'll be able to change the URL and only need a
bouncer deployment for users to get the new URL when they encounter
HostnameAlreadyInUseBouncerError. As opposed to self-hosted servers
being stuck with an outdated docs link hardcoded in their
register_server.py.
2025-01-31 13:20:56 -08:00
Lauryn Menard
c70c3133dc help: Update for direct message feed icon change in left sidebar.
We now use "zulip-icon zulip-icon-all-messages" for the direct
message feed icon in the left sidebar. Previously the icon used
was "fa fa-align-right".
2025-01-31 13:06:02 -08:00
Karl Stolley
6728620f7f banners: Explicitly reference container name in queries. 2025-01-31 13:05:25 -08:00
Aman Agrawal
458b520096 message_summary: Minor changes to modal.
* Make it wider.
* modal title just be the plain topic name
* add a "Mark topic as read" button if the topic has unreads.
* Add a footer warning.
2025-01-31 13:04:23 -08:00
Aman Agrawal
0930cc4cec dialog_widget: Add option to show non-html heading. 2025-01-31 13:04:23 -08:00
Aman Agrawal
472bb98297 dialog_widget: Add option to add small text in footer. 2025-01-31 13:03:56 -08:00
apoorvapendse
94b4790e45 searchbox: Avoid showing DM suggestions for topic pill.
Fixes #33246.
2025-01-31 11:08:56 -08:00
Simon Michalke
8de5de66fa avatar: Add option to disable gravatars per realm.
The functionality of gravatar can break anonymity if
the user has had a gravatar account set up previously.

This option allows specifically cloud instances to
have gravatar disabled selectively.
2025-01-30 18:46:02 -08:00
apoorvapendse
af9cb64b22 user_profile: Fix deactivated user icon size.
Fixes: https://github.com/zulip/zulip/pull/33240#issuecomment-2623193230
2025-01-30 16:00:18 -08:00
Tim Abbott
b475f3dd2a api docs: Add API changelog update for registration transfer. 2025-01-30 14:32:36 -08:00
Mateusz Mandera
ddcc36c3aa register_server: Improve UX with the "hostname already in use" error.
An even better way than the current json error message recommending the
--registration-transfer option is to return an appropriate error code
and have that get picked up by the register_server command.

The register_server command can then display a more comprehensive,
better formatted error message with proper whitespaces and a pointer to
the documentation.
2025-01-30 14:32:36 -08:00