Commit Graph

62866 Commits

Author SHA1 Message Date
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
Mateusz Mandera
6d555b01d0 docs: Document the push notifications registration transfer flow. 2025-01-30 14:32:36 -08:00
Mateusz Mandera
b9322eeaff register_server: Fix help string for --registration-transfer option. 2025-01-30 14:32:36 -08:00
Mateusz Mandera
7390eb2ed0 zilencer: Rename registration takeover to registration transfer.
This is the final naming that we want, compared to the naming we merged
in #32399.
Includes renaming the API endpoints, but that should be fine as the
original PR was just merged and this isn't deployed anywhere.
2025-01-30 14:32:36 -08:00
Karl Stolley
a23663e6f9 right_sidebar: Ensure opaque userlist header. 2025-01-30 14:28:32 -08:00
Tim Abbott
55aa63425b navbar_alerts: Remove entrypoint for developer testing experience.
I think the rest of the code can stay, since we're planning to make it
accessible elsewhere.
2025-01-30 13:16:21 -08:00
qnhn22
ac0d54abf1 user_group_popover: Reduce member list size, add member page links.
In user group popover, if a group has more than 30 members, just show
the first 30 members and add links to member management pages.

If a group is a system group, link to organization user
page. Otherwise, link to group member page.

Fixes #31550.
2025-01-30 12:37:27 -08:00
Niloth P
636f4f457c integration-docs: Remove context property recommended_channel_name.
The context property was previously being used in the macro
`git-webhook-url-with-branches` which has been removed as it is not in
use any longer.

The context property was now being used only in 2 integration docs, both
of which used it only in a single location, and directly used their own
names as the channel name. Making the context property unnecessary.
2025-01-30 11:59:38 -08:00
Niloth P
8e6d8dc845 integration-docs: Remove macros that are used only in Matrix doc.
Moved the content inside the Matrix doc.
2025-01-30 11:59:38 -08:00
Niloth P
68019cb48d integration-docs: Remove unused macros.
The `append-channel-name` and `append-topic` macros' instructions are
unnecessary as the topic and channel names are now part of the generated
URL.

The `git-webhook-url-branches` macro becomes equivalent to
`git-append-branches` with the auto-generation of the URL.
2025-01-30 11:59:38 -08:00
Lauryn Menard
8c699c6422 help: Document the saved snippets compose box feature.
Fixes #33131.
2025-01-30 11:59:07 -08:00
Niloth P
eb353827b2 integrations: Document Zulip Onyx integration.
The integration with Onyx is via the Zulip Connector of Onyx.
2025-01-30 11:48:11 -08:00
Alya Abbott
4c50e83542 help: Improve documentation on who can create bots. 2025-01-30 11:37:35 -08:00
Vector73
469bc4f442 page_params: Remove bot_types field to reduce database queries.
Removed `bot_types` field from page_params to reduce extra db queries
on page load and allowed bot types for the user are determined locally
instead.
2025-01-30 11:37:35 -08:00
Vector73
a2c3138418 settings: Remove bot_creation_policy setting.
Removed `bot_creation_policy` property, as the permission to create
bot users in the organization is now controlled by two new realm settings,
`can_create_bots_group` and `can_create_write_only_bots_group`
2025-01-30 11:37:35 -08:00
Vector73
d48164ce1e settings: Add two new realm settings to restrict bot creation.
Added `can_create_bots_group` setting which controls who can
create any type of bots in the organization.

Added `can_create_write_only_bots_group` setting which controls
who can create incoming webhooks in the organization in additon
to those who are in `can_create_bots_group`.
2025-01-30 11:37:33 -08:00
apoorvapendse
3fd5673bbd compose: Support to convert math html to markdown.
This commit tries to address the problem of not getting the
latex markdown on selecting and quoting a message which
contains normal text as well katex html elements.

It works by grabbing the parent of all the katex elements,
display (mathblocks) as well as inline expressions
and iterating over each immediate child to convert the
elements into markdown based on certain conditions.

Support has also been added to convert inline expressions to an
approximate markdown representation.

To facilitate selection of inline math expressions along with
text nodes, which are intermediate pieces of text sandwiched
between two katex spans, we transform the paste_html to
have spans instead of text nodes, so that they can be
processed by turndown js, since its filter function only
iterates through Elements and not TEXT_NODE.

The new tests have been added in katex_test_cases.json to
prevent cluttering the node tests in copy_and_paste.test.cjs.
These tests are looped over in the node tests.

Fixes #31608.
2025-01-30 11:08:56 -08:00
Sayam Samal
ead2f2d254 showroom: Fix misordering of bootstrap.portico.css.
This commit uses the same fix as the commit 6776e80, to include
`bootstrap.portico.css` and prevent webpack from misordering it from the
rest of the portico CSS chunk.
2025-01-30 10:41:22 -08:00
Maneesh Shukla
fd2b8b5e25 modal: Center modal spinner.
This commit adds the align-items property to the modal__spinner class.
This property sets the spinner in the modal to the center without
changing the spinner's position.
2025-01-30 10:31:40 -08:00
Sayam Samal
d24225c078 banners: Add navbar alerts banner testing option. 2025-01-30 10:17:39 -08:00
Sayam Samal
06005bc32c css: Redesign link styles.
This commit redesigns the link styles based on the Figma designs by
Vlad Korobov, and implements them in the navbar banners. This also
removes the `--color-text-link` which was being used in the custom
profile field links in the user card popovers while the variable did
not exist previously.
2025-01-30 10:17:39 -08:00
Sayam Samal
5ed85e0a2d buttons: Fix focus ring on tab for action and icon only buttons.
This commit fixes the bug where the focus ring was not visible while
tabbing through the buttons due to values being overridden. This also
fixes the outline offset for the banner close button to make it visible.
2025-01-30 10:17:39 -08:00
Sayam Samal
108e0f42a7 banners: Increase space between the banner label and the action buttons.
This commit Increases the left margin of the action buttons group to
add more space between the banner label and the action buttons improve
the visual consistency with the gap between the action buttons and the
banner close button.
2025-01-30 10:17:39 -08:00