Commit Graph

120 Commits

Author SHA1 Message Date
Karl Stolley
59788f01d4 markdown: Apply correct color var to RTL blockquotes. 2025-05-13 15:15:59 -07:00
Karl Stolley
a82921f32c markdown: Experiment with custom bullets, counters. 2025-05-12 18:08:28 -07:00
Karl Stolley
a576ae9fb8 markdown: Restyle block quotes to spec. 2025-05-12 18:08:28 -07:00
Karl Stolley
8419bc3fb8 markdown: Offset list items from markers to spec. 2025-05-12 18:08:28 -07:00
Karl Stolley
054f34a2b5 markdown: Align bullets left, centered with counters. 2025-05-12 18:08:28 -07:00
Karl Stolley
ebb5383fc9 markdown: Align counters flush left. 2025-05-12 18:08:28 -07:00
Karl Stolley
2ae2589494 thumbnails: Constrain thumbnails to 10em height only. 2025-05-06 13:16:00 -07:00
Karl Stolley
142d1958a0 url_previews: Post-process embed links for performant CSS. 2025-04-28 16:10:13 -07:00
Karl Stolley
80f101016e url_previews: Clamp title, description to two lines.
This also increases the size of the preview area's
height to accomodate two lines of both title and
description at a +2 line-height setting.
2025-04-28 16:10:13 -07:00
Karl Stolley
1184905a6b url_previews: Remove basically invisible text-shadow. 2025-04-28 16:10:13 -07:00
Karl Stolley
41968e2871 url_previews: Use em for title offset.
Removing `line-height` here also allows for the title
to assume the app-wide user-selected line height.
2025-04-25 11:52:12 -07:00
Karl Stolley
05e4a2f6ac url_previews: Rewrite message embeds in CSS Grid. 2025-04-25 11:52:12 -07:00
Karl Stolley
a7996c1bd6 thumbnails: Remove right-to-left rules obviated by flexbox. 2025-04-23 10:53:05 -07:00
Karl Stolley
bcddd71cca thumbnails: Add minimal flexbox definition. 2025-04-23 10:53:05 -07:00
Karl Stolley
ab24eea83e thumbnails: Place play button on all media with grid. 2025-04-10 12:55:15 -07:00
Karl Stolley
72c89404f3 thumbnails: Audition darker borders on typical images. 2025-04-10 12:55:15 -07:00
Karl Stolley
2421ddfb6e thumbnails: Audition thicker borders. 2025-04-10 12:55:15 -07:00
Karl Stolley
9392a1c8a6 cleanup: Move thumbnail values to CSS variables. 2025-04-10 12:55:15 -07:00
Karl Stolley
356028729f thumbnails: Handle dinky thumbnail images.
Fixes: #31502
2025-04-10 12:55:15 -07:00
Karl Stolley
d9f0fe882d thumbnails: Restore legacy values on video thumbnails. 2025-04-10 12:55:15 -07:00
Karl Stolley
61e8aef597 thumbnails: Style for portrait or landscape orientation. 2025-04-10 12:55:15 -07:00
Karl Stolley
4e19e82f64 thumbnails: Reference media anchors, images, and video by class. 2025-04-10 12:55:15 -07:00
Karl Stolley
1dc87be1db thumbnails: Remove unnecessary margin on media first-children.
This was made unnecessary by a patch submitted and merged
in #34271.
2025-04-10 12:55:15 -07:00
Karl Stolley
46b33f0d26 message_row: Better target first children. 2025-04-02 09:43:58 -07:00
Karl Stolley
465971171d rendered_markdown: Adjust content blocks for link focus ring. 2025-04-01 17:47:06 -07:00
apoorvapendse
353f57e518 copy: Style KaTeX annotations to be included in copy HTML.
We've for a while been finding that copy/paste of LaTeX only worked if
we had a more JS-heavy copy handler that directly copies the HTML/text
using events, rather than just allowing the browser's native copying
logic to do its thing.

We've discovered the bug was that the `<annotation>` tag in MathML is
not rendered in some browsers which results in default copy behavior
of the browser breaking KaTeX copy-pasting and quoting by omitting the
`<annotation>` in the copied HTML as Chrome and possibly other
browsers select only what is visible.

From https://www.w3.org/TR/selection-api/

> Chrome 16 dev behaves as you'd expect given its Selection
implementation. It refuses to select anything that's not visible, so
it's almost always wrong. Opera 11.50 just does nothing in all my
tests, as usual.

This can be observed in the `paste_html` fixtures present in
https://github.com/zulip/zulip/pull/33993#issuecomment-2725417637.

We fix this by simply overriding the `display:none` property from the
<annotation> tag in the user agent stylesheet, which lets the browser
select and ultimately copy it which results in the annotation being
present in the `paste_html` and restore the working of KaTeX
quoting/copy-pasting.

This appears to have no visible impact, since browsers don't actually
have a way to display the annotations.
2025-03-19 10:07:32 -07:00
Karl Stolley
4454811191 message_view: Better tolerate different opening Markdown elements. 2025-03-13 14:42:14 -07:00
Karl Stolley
a2892e713c rendered_markdown: Scale code-span padding with font size. 2025-03-12 10:21:15 -07:00
Karl Stolley
0e34a753cd video_thumbnails: Precisely size, place play button. 2025-03-11 12:23:55 -07:00
Karl Stolley
cb9a21a741 rendered_markdown: Allow legacy YouTube thumbnails to size up. 2025-03-07 15:19:35 -08:00
Karl Stolley
7948055e88 video_thumbnails: Apply transition on both sides of hover state. 2025-03-05 13:59:58 -08:00
Karl Stolley
1b9f1d2163 videos: Present identical buttons for all video types.
This displays the same Play button with the same hover styles on
all videos, whether YouTube, embedded, or uploaded.
2025-03-05 13:59:58 -08:00
Karl Stolley
0ce3bbd09d markdown: Center scalable button on inline videos. 2025-03-05 13:59:58 -08:00
Karl Stolley
313a04b4a9 thumbnails: Express dimensions in rounded ems. 2025-03-03 17:11:13 -08:00
Karl Stolley
0362e53dbf rendered_markdown: Bump margin by half a character on ordered lists.
This is a regrettable adjustment, necessary for how certain
browsers (especially Safari on both iOS and macOS) present a
larger, non-adjustable gap between the list marker and the list
item's text.
2025-02-13 09:26:12 -08:00
Karl Stolley
be5c81286c rendered_markdown: Offset ordered lists by start and count.
Fixes #33424
2025-02-12 10:32:26 -08:00
Karl Stolley
1c7b1187df rendered_markdown: Better handle list-offsets for i18n. 2025-02-12 10:32:26 -08:00
evykassirer
c4c3228eac markdown: Use em for left-margin of numbered lists. 2025-02-12 10:00:41 -08:00
apoorvapendse
dfa17b97f3 edit_message: Remove cursor:text from scrollbar thumb.
It makes it easy to determine whether you are dragging
the scrollbar or selecting text from the editing area.

Fixes: #33253.
2025-02-10 15:50:13 -08:00
Anders Kaseorg
8f173b0fdf styles: Replace deprecated word-break: break-word with overflow-wrap.
Addresses a new declaration-property-value-keyword-no-deprecated
Stylelint rule.

https://developer.mozilla.org/en-US/docs/Web/CSS/word-break#break-word
https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-01-29 15:04:09 -08:00
Vishesh Singh
ba25648190 mention_pill: Fix spacing for bot icon in bot mention pill.
Added left margin to bot icon in bot mention pill.

Fixes #26831.
2025-01-09 12:28:16 -08:00
Sayam Samal
467b36dc4a copy: Rename copy-btn -> copy-button.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Vishesh Singh
5b70775ab6 mention_pill: Show bot icon in bot mention pill.
Render a bot icon to the right of bot name, in case
it is a bot.
2024-11-12 09:34:07 -08:00
Anders Kaseorg
2671a5c32c stylelint: Enable stylelint-high-performance-animation.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-23 14:56:39 -07:00
Anders Kaseorg
f023fa6fc0 styles: Be specific about which properties are transitioned.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-23 14:56:39 -07:00
Sayam Samal
e0d685ce92 message: Improve the copy codeblock and playground buttons.
This commit improves the copy codeblock button and playground button
in the codeblocks to improve their visibility, particularly when on
top of some code.

Previously, the text under these buttons was difficult to select, as the
buttons would block the selection. This commit now hides these buttons
when a user clicks on any part of the codeblock, allowing to view the
code without any distractions, as well as, allowing the user to select
any part of the code.
2024-10-09 17:37:08 -07:00
Sayam Samal
a743bb0eb6 copy: Use redesigned copy button in rendered codeblocks. 2024-09-20 15:44:20 -07:00
Shubham Padia
4a7983fad3 css: Use a class for spoiler header text.
Having the :not() rule there affected the performance, see
https://chat.zulip.org/#narrow/stream/6-frontend/topic/CSS.20selector.20performance/near/1920156
for more details.
2024-09-03 10:24:40 -07:00
Karl Stolley
562e6d6802 global_times: Allow global times to display inline. 2024-08-21 16:02:33 -07:00
Karl Stolley
02161582fd mentions: Allow mentions to display inline. 2024-08-21 16:02:33 -07:00