Commit Graph

66 Commits

Author SHA1 Message Date
Karl Stolley 48b896b752 message_edit: Zero out browser-default top margin.
This prevents a vertical shift when toggling between editing and
previewing a message.
2024-04-24 14:38:36 -07:00
Karl Stolley a94cdd99d2 message_edit: Consolidate textarea styles under .message_edit_content. 2024-04-24 14:38:36 -07:00
Karl Stolley bb5db2cc4b message_row: Replace sender-line margins with grid-coordinated line height.
This expresses the height of the message row without need of
margical margins.

Extending the correct line-height to timestamps also means that
single-line messages will be the height of their combined content
and padding, and not erroneously held open by an oversize 28px
timestamp line-height.

Those corrections mean, too, that .message-time only needs to have
its line-height declared a single place, regardless of context.
2024-04-22 14:17:39 -07:00
Karl Stolley 3c5adfe440 message_row: Introduce CSS variable for vertical margin. 2024-04-22 14:17:39 -07:00
Karl Stolley 31865db5c9 message_row: Introduce CSS variable for avatar column width. 2024-04-22 14:17:39 -07:00
Karl Stolley 085abf9c35 message_row: Remove unused variable. 2024-04-22 14:17:39 -07:00
Karl Stolley a3476af97c markdown: Move all inter-element spacing to bottom. 2024-04-22 10:33:47 -07:00
Karl Stolley 82d0eec0bc timestamps: Consolidate and simplify message-time properties.
This is better form, and also sets things up to render sample
timestamps for calculating their max width.
2024-04-03 17:38:43 -07:00
Karl Stolley 09d7105747 timestamps: Consolidate variable-based timestamp width. 2024-04-03 17:38:43 -07:00
Karl Stolley 1425d2f71f message_body: Hyphenate message-time class. 2024-04-03 17:38:43 -07:00
Afonso Azaruja e217d35ccd link_preview: Fix extraneous shadow.
Fix extraneous shadow at bottom of link preview
in stream messages in dark theme, in private
messages for both themes and in mentions, group
mentions and direct mentions.

This is done by applying the same color, used
in the background, to the shadow. There are CSS
variables that hold the values of the background
color.

Fixes #28853.
2024-04-01 13:06:42 -07:00
Mahhheshh 1c48ed0a1c stream picker: Remove stream colorblock.
To achive this the `stream_header_colorblock` div was removed from
`dropdown_widget_with_stream_colorblock.hbs` template. this change made
the file name irelevenet so it was necessary to rename the file to
`dropdown_widget_wrapper.hbs`. After removing the html strcuture for
colorblock from templates the css for colorblock was also removed.
followed by the javascript which was used to add colorblock to the
stream picker. After removing javascript tests were updated.
Fixes: #28796.
2024-03-15 11:11:04 -07:00
Aman Agrawal ee2f08aa96 css: Remove state dropdown-toggle class. 2024-02-03 17:20:28 -08:00
Aman Agrawal 088eadbca1 css: Remove stale dropdown-list-widget class. 2024-02-03 17:20:28 -08:00
sanchi-t 446ba4d6df message_edit: Fix cursor style on hover in edit area.
Fixes #3938.
2024-01-14 15:34:28 -08:00
Karl Stolley 09ae717fee message_edit: Lay out edit buttons with flexbox. 2024-01-11 12:51:02 -08:00
Karl Stolley fd5fe64a33 message_edit: Consolidate styles into message row CSS. 2024-01-11 12:51:02 -08:00
Karl Stolley a929220d3c message_edit: Add styles for Save and Cancel buttons. 2023-11-15 10:41:51 -08:00
Karl Stolley f1a79085eb message_edit: Build basic multi-line layout for message editing. 2023-11-15 10:41:51 -08:00
Sahil Batra a88acc4642 users: Add ellipsis only on names and show the indicator always.
We now show the guest indicator even for long names and only
truncate the names in right sidebar and the message feed.
2023-10-12 12:06:10 -07:00
Karl Stolley 6d0c2c6a57 message_feed: Alot controls-column space to forms in edit/source view.
See CZO discussion:
https://chat.zulip.org/#narrow/stream/101-design/topic/adjusting.20the.20message-edit.20form/near/1643675
2023-09-20 15:29:57 -07:00
Karl Stolley 75293feefb message_feed: Size mobile controls to icon widths.
This causes no visual changes, but it makes the grid definitions
more precise, while also reflecting that only two hover icons are
ever shown at mobile scales.
2023-09-20 15:29:57 -07:00
Karl Stolley adec143680 message_feed: Prevent blowouts on mobile message grids. 2023-09-20 15:29:57 -07:00
Karl Stolley 81c31e40b8 message_feed: Remove duplicate and unnecssary controls styles. 2023-09-20 15:29:57 -07:00
Karl Stolley d3a4fb7d3d message_feed: Remove padding from message controls.
The use of grid and flexbox precludes the need for padding these
controls. Further, removing the padding corrects a sneaky grid
discrepancy between controls on messages with and without a
sender.
2023-09-20 15:29:57 -07:00
Karl Stolley a1a8afa2f7 css_grid: Defensively prevent blowouts by using minmax().
This improves upon a change introduced in #26279. But rather than
setting an `overflow` value, this uses `minmax()` with a 0 minimum
value--pushing back against the default grid minimum column value
of `auto`. The `auto` value will always try to fit the content
into the grid, even if that means wreaking havoc on the grid as
defined.
2023-08-30 15:30:40 -07:00
Karl Stolley 2ac578537c icons: Remove :focus-within styles on hover controls.
This corrects for an issue where hover controls would remain
visible after multiple clicks on one of the hover control icons,
despite the mouse pointer leaving the area.

This does not really create a regression for keyboard focus, as
there is currently no reasonable way to get a Tab key into the
hover controls area.

However, if one clicks multiple times on the vdots icon, and uses
Tab to move back and forth, the icons still remain visible--thanks
to the mouse pointer still being in the hover area.
2023-08-21 17:13:43 -07:00
Karl Stolley 14e9f65349 grid: Apply mobile-style grid when middle column is small.
This introduces a new breakpoint. In the future, this kind of
round-about sizing will be made unncessary by container queries,
but while those ship in all modern browsers, their availability
is quite recent:

https://developer.mozilla.org/en-US/docs/Web/CSS/@container
2023-08-21 17:13:43 -07:00
Karl Stolley b0c428edf1 icons: Add microlayout for new icons.
This, along with the preceding commits, fixes #25903.
2023-08-21 17:13:43 -07:00
Karl Stolley 65466cec44 reactions: Let emoji and count act as simple flex items.
This commit uses a `gap` property on the containing reactions
flexbox to recreate space previously set by margins.
2023-08-21 11:38:39 -07:00
Karl Stolley c0c62e477c reactions: Use a flex layout for reactions. 2023-08-21 11:38:39 -07:00
Karl Stolley c25da457e5 grid: Allow message toggles to occupy message area. 2023-08-21 11:29:00 -07:00
Karl Stolley 72119d161b grid: Use message_time to maintain baseline group. 2023-08-21 11:29:00 -07:00
Karl Stolley ce7f5ba785 message_edit: Hide length controller when editing. 2023-08-21 11:29:00 -07:00
Karl Stolley d73ae26e4b alerts: Remove unused .alert-msg elements. 2023-08-15 12:20:35 -07:00
nimish d3c99682c3 message_feed: Fix collapsed messages for highlighted texts.
Fixes #26346.
2023-08-08 12:19:54 -07:00
Karl Stolley 3b63faf33c bot_icon: Correct vertical alignment. 2023-07-26 12:15:11 -07:00
Karl Stolley de23949a36 message_edit: Use CSS to manage preview scroll.
Fixes #26135.
2023-07-17 11:28:55 -07:00
Karl Stolley 1cd587d24b me_message: Center first line with center of avatar.
This commit also demonstrates how precise line-heights contribute
to a design: by matching the line-height on the avatar's grid area
to the dimensions of the square avatar image, it's possible to
center the first line of text (me-messages, in this case) with a
non-text element.
2023-07-15 09:55:42 -07:00
Karl Stolley b13f6a6127 message_grid: Refactor row grid for readability.
This satisfies the linter's desire for the `grid-template`
shorthand while keeping the illustrative template areas in
their own little diagram-like property.
2023-07-13 14:02:21 -07:00
Karl Stolley ce04c98b47 me_messages: Clean up unused .sender_name-in-status class. 2023-07-13 14:01:32 -07:00
Karl Stolley ddaebb3255 message_grid: Use a 'dead' column to space controls and time.
This commit adds a 3px column between the `controls` and `time`
areas, which keeps the controls from crowding the time for
languages with longer time markers.

To make the layout easier to reason about, this includes the
minimum width for the time column as part of the message-box
grid definition.
2023-07-13 09:02:00 -07:00
Karl Stolley 42919ed2e1 message_avatar: Preserve clickable area from image to user name. 2023-07-13 09:02:00 -07:00
Karl Stolley 497ad9471a message_grid: Preserve grid layout in edit mode. 2023-07-13 09:02:00 -07:00
Karl Stolley b6d072a8d9 message_grid: Share same message grid with me-messages. 2023-07-13 09:02:00 -07:00
Karl Stolley fad4429712 message_grid: Use baseline groups to align EDITED, time, etc. 2023-07-13 09:02:00 -07:00
Karl Stolley 93dba7f381 message_grid: Let the avatar participate in CSS Grid.
This also ensures that sender info flexes and participates
in the grid's baseline group.
2023-07-13 09:02:00 -07:00
Karl Stolley 1d1a2e3c75 message_grid: Add named grid areas to .messagebox-content. 2023-07-13 09:02:00 -07:00
Karl Stolley 2bbf357f0e message_grid: Remove positioning cruft.
Because the message box is a CSS Grid, its children elements do not
need to continue to use positioning properties removed in this
commit.
2023-07-13 09:02:00 -07:00
Karl Stolley 762934896a css: Consolidate .message_edit_notice in row file. 2023-07-13 09:02:00 -07:00