The content `look` 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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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".
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.
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.
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.
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.
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.
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.
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`
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`.
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.
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.
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.
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.
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.
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.