Commit Graph

376 Commits

Author SHA1 Message Date
Aman Agrawal 742b985de0 compose_actions: Warn callers if msg_type is not defined. 2023-10-17 10:34:48 -07:00
Aman Agrawal a814b4f320 inbox: Use app background color.
Search input still has the same background color.
2023-10-17 10:34:48 -07:00
Sahil Batra 7b3fda696d css: Rename CSS variables for heights in subscriptions overlay.
The CSS variables for heights in subscriptions overlay uses
"modal" word but we actually use overlays for subscriptions
UI, so this commit renames those variables to better names.
2023-10-17 10:28:50 -07:00
Sahil Batra b3d9f5a419 overlays: Rename "modal-body" class.
We use "modal-body" class in informational overlays and
"About Zulip" overlay. For informational overlays, the
class is used on the element acting as scroll container
so we just rename the class to "overlay-scroll-container".

For "About Zulip" overlay, we do not support scrolling
so "overlay-body" seems a better class name.
2023-10-17 10:28:50 -07:00
Sahil Batra eeb3b5715f settings: Rename modal-footer class.
We only use "modal-footer" class in stream and user group
creation forms which is actually not a modal, so this commit
renames the class to a better name "settings-sticky-footer".
2023-10-17 10:28:50 -07:00
evykassirer 34ceafadd5 recent view: Add button to fetch more conversations.
We add a new timerender format for this context, where there's plenty
of space.

Fixes: #18461
2023-10-13 16:14:55 -07:00
Hardik Dharmani 49f7f02a0a personal_menu: Add tippy personal_menu dropdown.
Add a personal menu dropdown that opens on clicking user avatar icon
in navbar added in previous commit.

The args passed to render_personal_menu() in onShow() are returned by
get_personal_menu_content_context() in popover_menus_data.js so that
they can be unit tested.

Additionally, added CSS to get a custom arrow for dropdown menu.

Added a `?` hotkey in keyboard shortcuts option in personal_menu
dropdown in a style similar to our tooltip's hotkey by adding
? in a span with class .tooltip-hotkey-hint and adding some CSS.

Fixes part of #22802.
2023-10-12 15:31:01 -07:00
Hardik Dharmani 5fd8b95454 navbar: Add user avatar icon for personal_menu dropdown.
This commit adds user avatar icon in navbar. This new avatar icon
will be used as dropdown toggle button. Made `.column-right` a flex,
every element in right-side navbar is in this div now rather than all
elements positioned absolutely with hardcoded values like before.
Fixed some CSS as per new flex layout if `.column-right`.

Fixes part of #22802
2023-10-12 15:31:01 -07:00
Joelute c7ef2555fd compose_typeahead: Add new indicator to topic items in typeahead.
With the autocomplete dropdown, some users face trouble or uncertainty
while selecting topics. These changes adds a new indicator to the topic
typeahead dropdown while typing to the topic box. This ensures users
that they are on track and they are doing the right things. We also
suggest the current query even if it doesn't match a topic to continue
providing the new indicator.

Fixes: #23296.
2023-10-12 14:44:40 -07: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
Aman Agrawal c16d727fd4 stream_settings_ui: Avoid two scrollbars.
Fixes #26823

Fixes user card not displayed on last item in the subscribers list.
This was happening because there wan not enough space below the
user name for the popover to be displayed (as far as I understand this).

Regardless of the fix above, this seems like a nice change.
2023-10-11 16:25:27 -07:00
Karl Stolley f98570704d compose: Present Start new topic button adjacent the reply button.
Fixes: #24889.

Co-Authored-By: Daniil Fadeev <shameondev@gmail.com>
2023-10-10 17:37:03 -07:00
Karl Stolley b19986b777 left_sidebar: Use custom Zulip star icons.
This commit replaces all previous Font Awesome references in the
left side bar and relevant popovers with the custom Zulip star
icon.

Co-Authored-By: Hardik Dharmani <Ddharmani99@gmail.com>
2023-10-10 16:48:20 -07:00
Karl Stolley fd0dd3acd8 left_sidebar: Refactor left_sidebar.hbs structures for readability.
This commit renames the classes and IDs in the views area
(formerly global filters) to a set of flexible values all
prefixed in some way with `left-sidebar-navigation`.

This is meant to make the styles and structures in the area
more readable, while also keeping things flexible into the
future as this area's elements change.

Co-Authored-By: Hardik Dharmani <Ddharmani99@gmail.com>
2023-10-10 16:48:20 -07:00
Hardik Dharmani 7e776b9c76 refactor: Make variable for unread counter's background colors.
This is Prep commit that introduces 2 new CSS variable
`--color-background-unread-counter` and
`--color-background-unread-counter-popover-menu` that has value
`hsl(105deg 2% 50% / 50%)` in dark theme and `hsl(105deg 2% 50%)`
in light theme for unread counter and `hsl(200deg 100% 40%)`
for unread counter in popover menus to match its blue theme.
2023-10-10 16:48:20 -07:00
Aman Agrawal c2c1f1ac6d inbox: Add icon in search box to clear any text. 2023-10-05 08:57:44 -07:00
Aman Agrawal b494424ffa inbox: Change hover / focus styles of search box.
This is to make search box less noticeable when focus is given / taken
away from it.
2023-10-05 08:57:44 -07:00
Aman Agrawal 2ed1465b04 css: Display status emoji along with overflowing sender names.
Even if sender name overflows the available space, we should
show status emoji along with sender name by hiding the overflowing
part of sender name.
2023-10-04 16:49:39 -07:00
Aman Agrawal 6f6e83d2e2 message: Remove ineffective `auto-select` class.
The internal design here was that we had no-select on the outer
element and auto-select on these inner elements to override it.

But, `auto-select` class seems to have no effect so we are
removing it.
2023-09-28 14:26:21 -05:00
Karl Stolley 48424c4c8e navbar: Explicitly calculate offset from title and search.
A separate `margin-right:` declaration helps keep the calculation
and intention more readable.
2023-09-27 12:22:47 -07:00
Karl Stolley ad588e7441 navbar: Set search-container width in CSS vars. 2023-09-27 12:22:47 -07:00
Karl Stolley fbfc72cb05 emoji: Display status emoji as inline-flex in sender row.
With no existing class to reach this selector, this change
introduces a new `.inline-status-emoji` class on the Handlebars
template and in the main Zulip CSS file.

Because of the inline styling in the message sender row, this
specific instance of a status emoji needs to be presented as
an inline flex: that keeps the avatar image layout clean, while
also introducing the `align-self: center` vertical positioning
of the status emoji adjacent the username, which is itself a
bare text node.
2023-09-21 17:18:47 -07:00
Karl Stolley cbb0cb9a73 css: Move inline emoji styles under rendered markdown.
This change paves the way to update how actual status emoji are
presented in sidebars, pills, etc., care of flexboxes, which
is previewed here by the inclusion of the `align-self` property.
2023-09-21 17:18:47 -07:00
YashRE42 cb04ae1f95 search: Redesign search box.
Fixes #21798.
2023-09-21 08:58:31 -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
Vector73 40a8ca2ced message_edit_form: Remove question mark icon after edit-timer-text.
Fixes: #26759
2023-09-18 15:31:55 -07:00
Prakhar Pratyush 8d29ad7325 toggle_resolve_topic: Display spinner while request is in progress.
We replace the check icon for "Mark as resolved/unresolved" with
a spinner while the request is still ongoing.

This helps to prevent double-clicking and reduce possible
race conditions.

Fixes #26190.
2023-09-18 13:17:10 -07:00
Prakhar Pratyush 72b3a53864 inline_topic_edit: Fix spinner not visible in the dark mode.
A spinner is shown when the request is in progress
for inline topic edit.

Earlier, the spinner was not visible in the dark theme.

This commit makes it visible by setting a different fill color
in the dark theme.
2023-09-18 13:17:10 -07:00
Aman Agrawal 01959d49fc inbox: Use a non transparent background color.
Since the search box header is sticky, we need the background to
be non transparent.
2023-09-18 12:17:51 -07:00
Karl Stolley fd01ebdc5d vdots: Simplify colors in streamlined selectors on left sidebar.
This expresses the colors for vdots icons in just three variations,
all as CSS variables. The colors are all derived from the existing
design, and the dots colors in the streams/topics area was used as
as reference. The only visual change here, then, is to the global
filters area, whose vdots were the outliers prior to this change.

The three variations are:

1. hint: for touchscreens where a :hover state is not available
2. visible: for all screens when a parent element is highlighted
3. hover: for when the vdots themselves are hovered

The selectors have been streamlined to use the .sidebar-menu-icon
utility class, and the hover-within-a-hover color on vdots is
expressed more directly, eliminating the need for
selector-specificity busting via !important.

Fixes: #20600
2023-09-18 09:06:33 -07:00
Karl Stolley a764c15bcb icons: Express global filter icons as colors. 2023-09-18 09:06:33 -07:00
Karl Stolley 3fe6cc18ff icons: Remove last vestiges of ellipsis-v-solid.
The deleted CSS around the `.zulip-icon-ellipsis-v-solid` class
has no impact on the hover controls, as flexbox and grid are
handling baseline alignment, not this one-off line-height.
2023-09-15 13:17:22 -07:00
Aman Agrawal 58c5701e5e css: Assign a variable to focus underline color of recent view. 2023-09-12 09:20:33 -07:00
Aman Agrawal 6ef0753a51 inbox: Add new narrow. 2023-09-12 09:20:33 -07:00
Prakhar Pratyush 5d069b7d7a topic_list: Add an icon and update the color for "Followed" topics.
This commit adds the follow icon to the right end
(before the three-dot menu icon) of the topic list item
for followed topics.

The icon replaces '@' instead of showing both the '@' and "Follow"
icons in the case of unread mentions, as users don't care if they
are following a topic if they've got unread mentions there.

In a muted stream, the text color of followed topics in the topic list
is set to be similar to that of unmuted topics.

The reason is that the followed topic has a tier of interest above
being unmuted, so it shouldn't stay faded in the topic list.
2023-09-11 17:55:35 -07:00
Prakhar Pratyush 07fd2aa344 topic_list: Add a CSS variable for the unmuted topic's color.
This commit adds the CSS variable '--color-unmuted-topic-list-item'
for the unmuted topic's color in the topic list.

The color for both the light and dark themes is defined in
'zulip.css' and used in 'left_sidebar.css'.

This approach helps to remove the use of the selector 'unmuted_topic'
only for color definition in 'dark_theme.css'.
2023-09-11 17:12:21 -07:00
evykassirer f4954d3183 recent: Rename .recent_topics_container. 2023-09-08 07:36:33 -07:00
evykassirer 131127aa30 recent: Rename #recent_topics_table. 2023-09-08 07:36:33 -07:00
Daniil Fadeev 82ca794f94 emoji: Migrate popover from Bootstrap to Tippy.
Fixes part of #23632.
2023-09-07 14:44:18 -07:00
Ujjawal Modi 9a96d19315 invites: Frontend changes for adding the new realm setting.
This commit does the changes in frontend required
for adding the new setting `Who can create multiuse invite link.`

Fixes #15159.
2023-09-07 14:21:01 -07:00
evykassirer 1e9bb82068 recent view: Rename topics to conversations in code comments. 2023-09-07 10:35:06 -07:00
Daniil Fadeev 53e081ae29 popover_menus: Create an API to render popovers as a centered overlay.
This commit lets us render popovers centered on the screen with a
background overlay. It's the same thing we did with Bootstrap
popovers, but optimized for use with Tippy.
2023-08-25 12:29:36 -07:00
Karl Stolley 9709e1b4ed actions: Show pointer on bell icon. 2023-08-24 14:30:46 -07:00
Karl Stolley 207a0d789f message_time: Lighten font-weight to 350.
The tabular figures in Source Sans 3 place a foot on the 1, and
overall just feel visually a little heavier than their proportional
counterparts.

To compensate for that, this takes advantage of the variable-font
properties of Source Sans 3 to subtly drop the weight to keep the
timestamp readable but not in fierce competition with the message
area.
2023-08-24 10:44:39 -07:00
Karl Stolley a17c7dfe0b controls: Present bell icon as a block.
This gives better positioning control over this icon, while not
inviting the side-effects and headaches of introducing another
flexbox.
2023-08-22 16:21:27 -07:00
Karl Stolley f07fb4fd58 time: Revert to Source Sans lnum, tnum defaults.
Source Sans 3 defaults to lining (lnum), tabular (tnum) figures,
the latter of which is necessary to have times like 11:11 and 11:18
line up in short, adjacent messages.

CZO discussion:
https://chat.zulip.org/#narrow/stream/6-frontend/topic/redesigned.20hover.20icons.20.2326283/near/1629117
2023-08-22 16:19:54 -07:00
Karl Stolley cd0ae56ad4 icons: Implement new gold star color and states.
This not only introduces a new gold color that works across light
and dark modes, but it also separates out the hover and focus-
visible styles for stars--regardless of whether a star has been
filled or not.
2023-08-21 17:13:43 -07:00
Karl Stolley adb3b24cb2 icons: Display focused icons only without default outline.
The :focus-visible selector is more appropriate here, as that
enables browsers to determine whether focus should be displayed
or not. That's generally the case with keyboard-achieved focus,
but pointers and fingers generally do not need focus to be
displayed.

By not displaying a different icon color on simple :focus, this
will also ensure that star icons behave predictably when hovered
or focused via keyboard in both starred and unstarred states.
2023-08-21 17:13:43 -07:00
Karl Stolley 68ac18a338 time: Increase font-size to 13px.
This is an effort to better unify the size of the timestamp text
with the redesigned hover controls.

CZO discussion:
https://chat.zulip.org/#narrow/stream/6-frontend/topic/redesigned.20hover.20icons.20.2326283/near/1621756
2023-08-21 17:13:43 -07:00
Karl Stolley 5d293c82cd icons: Size vdots icon for greater prominence. 2023-08-21 17:13:43 -07:00
Karl Stolley 6380184973 time: Align :hover color with message controls. 2023-08-21 17:13:43 -07:00
Karl Stolley 59e9849a7f icons: Improve hover, focus states and target areas. 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 b05f76c29e icons: Implement monochrome colors and scaled active state. 2023-08-21 17:13:43 -07:00
Karl Stolley 058d21c4e2 css: Rename .message_table to .message-list. 2023-08-21 15:17:45 -07:00
Karl Stolley c741c43800 css: Rename .focused_table to .focused-message-list. 2023-08-21 15:17:45 -07:00
Karl Stolley e68af8a48d css: Rename .message_list to .message-feed. 2023-08-21 15:17:45 -07:00
Prakhar Pratyush 41697f2663 message_header: Add support to follow topic from the message header bar.
This commit replaces the mute/unmute topic button in the message
header bar with a button that allows the user to set the
visibility_policy of the topic to muted, unmuted, followed or inherit.

The button in the message header bar has an icon corresponding to the
current visibility policy of the topic.

In a muted stream:
A click on the button opens a popover with 'Mute', 'Default', 'Unmute',
and 'Follow' options.

In a not muted stream:
A click on the button opens a popover with 'Mute', 'Default', and
'Follow' options. 'Unmute' option is available only when the
visibility_policy is set to 'Unmute'.

The current visibility_policy of the topic is highlighted in the
popover.
2023-08-17 13:30:24 -07:00
Aman Agrawal 8c4efb4f2e css: Rename variable name.
This will be used in other widgets too.
2023-08-16 10:06:40 -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 d020a100c3 css: Isolate dark theme to screen only.
The primary motivation for this change is to default to the light
theme when printing.
2023-08-06 13:27:40 -07:00
Tim Abbott 213387249e css: Fix prettier error and reorganize some colors. 2023-07-24 18:06:25 -07:00
Ishita Gupta aa86533f22 UI redesign: more-less message interaction.
This commit encompasses the following changes:
* Replace the [More...] link with a button titled "Show more".
* Replace the [Show Less...] link with a button titled "Show less".
* Add various on-hover interactions to the buttons.
* In the condensed view, add fading to the bottom of the message to
  visually communicate that the message is truncated.
* Update /help/ description.

Fixes #22801.

Co-authored-by: Evy Kassirer <evy.kassirer@gmail.com>
2023-07-24 17:42:08 -07:00
evykassirer c4bc0ad589 message feed: Change color of zulip logo at top of feed. 2023-07-24 17:27:59 -07:00
Karl Stolley 5d819ea254 grid: Remove unnecessary mobile-scale padding.
This also removes padding on .message_content that wasn't actually
rendered due to its low specificity. It was likely also leftover
from an earlier, non-grid-based layout.
2023-07-24 16:47:14 -07:00
Anders Kaseorg 7746e11486 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-07-21 15:58:42 -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 ce04c98b47 me_messages: Clean up unused .sender_name-in-status class. 2023-07-13 14:01:32 -07:00
Karl Stolley b6d072a8d9 message_grid: Share same message grid with me-messages. 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
Akshat d302ac4a18 message_view_header: Fix bad rendering of stream links in description.
This bad rendering was the result of unwanted css applied
in the stream description. In message view header, the stream
link (title) we have defined has css defined but the markdown
rendered stream link in stream description had the same class
resulting in unwanted css applied to it.

Fixes: #25961.

Signed-off-by: Akshat <akshat25iiit@gmail.com>
2023-07-10 13:47:22 -07:00
Sahil Batra 924879a049 css: Re-add bootstrap CSS for inline topic edit input.
This commit re-adds the required bootstrap CSS rules for inline
topic edit input to the specific selector in zulip.css.

This is a prep commit for removing bootstrap CSS for text type
inputs.
2023-07-07 10:10:28 -07:00
Sahil Batra 1db5ebae53 invite: Re-add bootstrap CSS for custom expiration text input.
This commit re-adds bootstrap CSS for custom expiration time
input in invite modal.

We also need to add the code to handle dark theme CSS here to
make sure the CSS for dark theme is prioritized correctly.

This commit also refactors the CSS to modify the selectors to
be simple and remove unnecessary IDs.
2023-07-07 10:10:28 -07:00
Aman Agrawal 233b486618 css: Use variable font when using Source Sans 3.
This is to overcome the limitations of previous static font,
which didn't allow us to use various font widths.
2023-07-06 17:57:37 -07:00
Aman Agrawal 98ee387197 css: Use 700 font weight for 800 since they default to it.
We don't have 800 font weight available, so the font weight defaults
to 700, so we use it directly here to avoid any changes when
we convert to variable font.
2023-07-06 17:57:37 -07:00
Karl Stolley 0c55fb7e89 stream_settings: Fix scroll at max-height.
Simplebar seems unaware of the `max-height: 1000px` on
`.subscriptions-container`, and therefore does not properly provide
a scrollbar when it's needed.

This commit adds a `max-height` to the stream Simplebar container,
ensuring that otherwise hidden content that Simplebar believes to
be visible can be scrolled to.

Finally, rather than rely on magic numbers or math done in comments,
this commit establishes CSS variables for all relevant modal-element
heights, doing the math inline using CSS calc().

Fixes #26107.
2023-06-29 11:19:01 -07:00
Karl Stolley a9bc5e94e7 bot_icon: Adjust bot-icon color for light and dark modes. 2023-06-23 14:43:22 -07:00
Sahil Batra 8c0ff704df bootstrap: Remove bootstrap CSS for pull-right class.
We use pull-right class for copy button with the multi-use
invite link only and this commit adds CSS for that specific
element. This commit then removes the bootstrap CSS for
pull-right class and also removes pull-right class from the
copy button since it is no longer required.
2023-06-23 11:53:38 -07:00
evykassirer 239b6737c0 navbar: Fix regression where navbar didn't extend all the way.
Followup to d0c1668399
2023-06-19 15:04:54 -07:00
Daniil Fadeev 4fde4e7c0d popovers: Prevent the popover from closing on scroll.
This commit prevent popover closure when scrolling reaches the top or
 bottom.

 Fixes: #25967.
2023-06-19 15:02:18 -07:00
Joelute ccdbdb35b2 unread_banner: Refactor HTML to use main view banner stylings.
Previously, the HTML structure of unread banners continued to utilize the
old stylings. We are currently in the process of simplifing both the
compose banner and unread banner stylings into one. These change will
update the HTML structure to be the same as the compose banner and use
the new stylings.
2023-06-09 11:31:51 -07:00
Karl Stolley 37192e8af3 css: Explicitly set text-message color.
This commit darkens the text-message color in the light theme
to the HSL equivalent of a dark gray (#262626).

This is the first time in the Zulip codebase where one CSS
custom property is set to another: the dark theme preserves
its use of `--color-text-default` in this way, but can be
adjusted independently of the reset of the theme in the future
by setting a different color value on
`--color-text-message-default`. Related reading on this
technique:
https://css-tricks.com/a-complete-guide-to-custom-properties/#aa-properties-as-properties

Fixes a part of #22022.
2023-06-08 16:18:14 -07:00
Karl Stolley e0883d0341 css: Integrate color vars into specific areas. 2023-06-08 16:18:14 -07:00
evykassirer d0c1668399 navbar: Remove top_navbar_full_width now that scrollbar is on html. 2023-06-07 16:54:58 -07:00
evykassirer aa270bcef0 search: Remove support for experimental search pills.
This in-progress feature was started in 2018 and hasn't
been worked on much since. It's already in a broken state,
which makes it hard to iterate on the existing search bar
since it's hard to know how those changes will affect search
pills.

We do still want to add search pills eventually, and when
we work on that, we can refer to this diff to readd the
changes back.
2023-06-06 18:36:02 -07:00
Akarsh Jain e20e7482ca invite: Restructure "Invite user" modal for improved user experience.
This commit revamps the invite type section of the "Invite user" modal
to provide a more intuitive user experience. The section now includes a
radio button option with two choices: "Send an email" and "Generate an
invite link." The email input box is hidden when the "Generate an invite
link" option is selected.

Fixes #24692.
2023-06-06 17:48:29 -07:00
Aman Agrawal 086db7621c css: Use a variable to track bottom_whitespace height.
Since we want the same space in recent topics to display the
compose box without overlapping with any other topics, it makes
sense to use a common variable.
2023-05-30 12:41:08 -07:00
Aman Agrawal 0f4bccd107 recent_conversation: Make all topics visible with compose open.
Fixes #25751
2023-05-30 12:41:08 -07:00
Aman Agrawal 230b3f075b scroll_bar: Fix overlapping right sidebar and browser scrollbars.
Fixes #25779

We move the simplebar scroll on the right sidebar to a little left
when there is an overlay scrollbar present so that user can drag
either of them.
2023-05-29 08:50:06 -07:00
Tim Abbott 1f8b3fd09a css: Fix fluid_layout_width setting.
0457f6807c seems to have accidentally
inverted the setting; we also clean up duplicate declarations of this
1400px value.
2023-05-28 22:06:16 -07:00
Aman Agrawal 8654f839b5 overlays: Stop document from occupying the extra scrollbar width.
When overlay / modal is displayed, scrollbar is hidden due to
the disabled scrolling on `html`. Reduce width of fixed elements
that will be visible in background and `html` so that they don't
occupy that extra space.

Also, I was over-thinking how we can get the scrollbar width. The
moment we allowed scrolling on `html`, it was easy to get the
scrollbar width.
2023-05-28 15:20:20 -07:00
Aman Agrawal 0457f6807c scroll_bar: Use a CSS class to toggle fluid layout. 2023-05-28 15:16:08 -07:00
Karl Stolley 4df04f1032 compose_box: Correct topic input-box height.
While this commit achieves what the subject advertises (fixing the
input box's height to match the recipient drop-down), but it does
so by relying heavily on flexbox's behavior to manage the height
of the elements and vertical centering, where necessary, rather
than positioning hacks or vertical padding.

This commit also removes some additional styles that do not make
sense (e.g., `min-width: 0`) or that need not be set.
2023-05-25 17:19:29 -07:00
Aman Agrawal dc04b0e171 navbar_alerts: Adjust app based on navbar height. 2023-05-24 15:43:19 -07:00
Aman Agrawal a78dc4a2bd css: Scroll on `html` instead of `.app`. 2023-05-24 15:43:19 -07:00
Aman Agrawal 263ee4cb86 feedback_widget: Don't use non-optimal animation properties.
Animating `box-shadow` and `top` is slow since the browser
drops frames when animating them. We can fix it by using `will-change`
property but it is just better to not animate them and instead
use transform.
2023-05-24 11:30:55 -07:00
evykassirer c486588360 search: Make search box bottom border visible again.
The nav bar's bottom border was being hidden by the search
bar. This makes the search bar slightly less high to fix this
issue.

Soon this code will be replaced with the changes in #24345.
2023-05-23 14:46:44 -07:00
evykassirer 9427fb7230 settings: Fix narrow-screen background color, use color variable.
Fixes #25708.
2023-05-23 11:31:03 -07:00
Aman Agrawal dc6099d656 message_row: Use equal top/bottom padding in message content.
We had the `3px 0 1px` padding before migration to use grid,
then I switched it to use `4px 0 1px` since we were planning to
use blue box border which seemed to have helped that case.

Since we switched to using outline for blue box, it makes sense
to just use equal padding.
2023-05-23 10:45:28 -07:00
Karl Stolley ab94bcb21b css: Move recipient-row unread markers to message row file. 2023-05-22 15:54:57 -07:00
Karl Stolley 36c5df7663 css: Move message-row styles to own file. 2023-05-22 15:54:57 -07:00
Karl Stolley ffbd0cb316 css: Clean up comments for future readers. 2023-05-22 15:54:57 -07:00
Aman Agrawal eeea5c1713 css: Fix @everyone and @stream displayed as user mentions.
Backend incorrectly renders @everyone and @stream as `user-mention`
while they are clearly `group_mention`. To fix this, we use
`data-user-id` property of @everyone and @stream which are
set to `*` for them.
2023-05-22 12:41:44 -07:00
Aman Agrawal 67ff421194 css: Change mention text and background colors. 2023-05-22 12:41:44 -07:00
Aman Agrawal c415944e55 css: Separate mention pill colors. 2023-05-22 12:41:44 -07:00
Karl Stolley c2f6167c01 css: Remove superfluous grid- properties.
The use of named areas with `grid-area` make it unnecessary to
declare `grid-row` or `grid-column` values. (Note also that
grid areas must not be presented in quotation marks.)

Additionally, because `.unread_marker` is no longer placed on the
grid by itself (i.e., it always accompanies `.date_unread_marker`
or `.message_unread_marker`), it does not need any manual grid
placement, `grid-area` or otherwise.
2023-05-19 13:48:16 -07:00
Aman Agrawal 9aa9f9b3c8 message: Separate unread marker of date_row from message.
This allows us to easily disable unread marker for date row of
the first unread message without producing any bugs.
2023-05-19 13:48:16 -07:00
Karl Stolley ef3289b73b css: Present message_row as CSS Grid.
This change enables the unread marker to participate as a grid item,
rather than the product of various absolute/relative positioning
hacks. The intention is to therefore prevent the blue active-message
box from disappearing on browsers that have zoomed out (~80% zoom).

With grid in place, this also makes for a more robust presentation
of each message row, and named grid areas should make it possible to
modify and extend the grid into the future.

Finally, this change removes styles that are no longer necessary in
the context of CSS Grid.
2023-05-19 13:48:16 -07:00
Aman Agrawal 44ae67d426 css: Fix gap between header and sticky header at some zoom level. 2023-05-18 13:39:46 -07:00
Aman Agrawal 3acd7b8f47 css: Move message header padding to the element with border.
Apply border and top margin on the same element so that browser
has no way to introduce a gap between them.
2023-05-18 13:39:46 -07:00
Tim Abbott ac3acc941f css: Increase opacity for grey elements.
The message timestamp and a few settings elements looked off with the
new 25% off white dark theme font color.
2023-05-16 16:52:22 -07:00
Trident Pancake 6fb16f3598 message_edit: Disable save btn after edit time limit
Fixes #25413.

The old code was disabling the save button wrong by using
`.addClass("disabled")` instead of `prop()`.

Added tooltip for the disabled save button as per issue #25413 and changed
"Times up!" color to red.

The textbox readonly logic was changed to no longer becoming readonly. Reason
being there are edge cases involving the compose buttons such that simply
marking the textbox as readonly is not sufficient.

E.g. using the compose buttons after readonly still modifies the content.

One solution might be to just hide the compose buttons visually. However, there
are edge cases for that too. If preview mode was previously active, then
perhaps that state needs to be reverted. If any modal is open, such as the emoji
picker, then that needs to be closed. Solving these edge cases doesn't
improve the user experience. Keeping the textbox editable allows an easier way
for user to copy the text and don't have weird cases.
2023-05-16 15:59:29 -07:00
Lakshay Mittal a208da9c4d style: Fix dropdown text alignment by reducing vertical padding.
Zulip's select widgets have a 30px height; this comes from Bootstrap
but is also generally nice for visual consistency.

In modals, we use a 15px font-size, instead of the 14px used in the
rest of the app, and in that context, the 4px vertical padding plus
30px fixed height resulted in the text not being vertically aligned.

Fix this by removing that vertical padding; all of our select elements
with these classes appear to position the text in the center of the
dropdown through other CSS mechanisms.
2023-05-16 15:43:06 -07:00
Aman Agrawal 29880a4a1e css: Change border-bottom color for message header. 2023-05-16 12:35:17 -07:00
Aman Agrawal c84681c69c css: Color tweaks. 2023-05-16 12:35:17 -07:00
Aman Agrawal 2a98968846 css: Use 75% white as default text color. 2023-05-16 12:35:17 -07:00
Aman Agrawal 3f4deedba1 css: Remove stale css.
`message_view_header_underpadding` is no longer present in the
codebase as we move the padding to be above the sticky recipient
bar.
2023-05-16 12:35:17 -07:00
Aman Agrawal 9f5b7ba9b0 css: Separate out text colors. 2023-05-16 12:35:17 -07:00
Aman Agrawal 17bdf22521 css: Allow `actions_hover` icon to have a focus outline. 2023-05-16 11:57:17 -07:00
Tim Abbott 74e6367455 css: Increase constrast for blue box. 2023-05-15 16:01:09 -07:00
Joelute 584b11af2d unread_banner: Apply updated design to message feed banners.
In #22524, we have updated the compose banner to the new, updated design
while the unread banners have remained the same. When comparing them side
by side, they look rather old and outdated. We should apply the updated
design to the unread banners as well.

Fixes: #25551.
2023-05-15 15:59:12 -07:00
Aman Agrawal c375d36c9e css: Dim color of failed message sent icons. 2023-05-14 16:46:20 -07:00
Aman Agrawal 1bffdda59f scheduled_message_overlay: Add a failed delivery indicator.
Fixes #25501
2023-05-14 16:46:20 -07:00
Aman Agrawal 461d935463 css: Fix unread marker leaking through message header. 2023-05-12 11:13:20 -07:00
Tim Abbott fe54df0b01 css: Darken light theme message feed borders.
This was a design bug caused by Figma's grey background.

https://chat.zulip.org/#narrow/stream/101-design/topic/UI.20redesign.3A.20background/near/1567435
2023-05-11 16:05:05 -07:00
Aman Agrawal 012f91eaba dropdown_widget: Show "No search results" instead of an empty list. 2023-05-10 12:00:18 -07:00
Aman Agrawal 5156f465ef css: Increase max-height so that no element is partially visible.
I didn't want to use JS for it since calculating height based on
item height before rendering the dropdown is expensive and after
rendering the dropdown will cause it jump.
2023-05-10 12:00:18 -07:00
Aman Agrawal 79b00d3c2a minor: Correct comments. 2023-05-10 12:00:18 -07:00
alik-balika c0560b3ea9 about_zulip: Change icon color when copy button is hovered.
`Version` and `Forked from` copy buttons in the "About Zulip" UI
will now change color when hovered over.
This allows the copy button to pop out more when hovering over it.

Fixes part of #23210.
2023-05-09 16:32:06 -07:00
Aman Agrawal df6c47565f css: Increase border opacity for message header and content. 2023-05-09 16:25:28 -07:00
Aman Agrawal ddc1406090 css: Fix unread indicator being partially displayed on date_row.
Add a border to the left of date row to override the unread
indicator.
2023-05-09 16:25:28 -07:00
evykassirer c578a38423 navbar: Widen navbar to fill the full screen on large screens.
Now that the navbar is a different color, we want it to also
take up the full width of the screen. Because the navbar has
margin, this commit adds a new div. To not have to add a new
div, the scrollbar would need to be moved to the `html`
element, which is a bigger project.

This commit also moves the zulip logo to be left-justified instead
of centered, since it looks strange centered with the full
width navbar.
2023-05-09 16:25:28 -07:00
evykassirer e026aa1217 UI redesign: Change background color.
Fixes: #21750
2023-05-09 16:25:28 -07:00
Tim Abbott 77ac1a10de compose: Collapse recipient widget with few options.
This looks visually nicer, and I think is necessary to merge it for
now, but I'm doing this as a separate commit so it's easy to revert if
we change our mind.
2023-05-09 14:11:26 -07:00
Aman Agrawal a196b949f7 dropdown_widget: Implement dropdown widget using tippy.
This will soon replace DropdownListWidget.
2023-05-09 14:11:26 -07:00
Hardik Dharmani cfbcbe901a topic_edit: Rename `inline_topic_edit` to `move_messages_edit_topic`.
In move_topic modal, Renamed inline_topic_edit to
move_messages_edit_topic to be more specific selector as
inline_topic_edit is also used in message header.

Additionally, Removed id inline_topic_edit as it was only used
in zulip.css instead used `.inline_topic_edit` selector as that
element also have class with same name inline_topic_edit.

Fixes #24805
2023-05-09 13:51:07 -07:00
Hardik Dharmani 697cdb31e5 message_headers: Abbrevate direct message recipient names.
Abbrevated DM recipient names in message feeds, Drafts and Scheduled
messages overlays by wrapping recipient names in span with class
private_message_header_name and applying `overflow: hidden` and
`text-overflow: ellipsis` CSS to it.

Fixes #25353
2023-05-09 13:43:40 -07:00
Hardik Dharmani 99a988e220 message_header: Abbreviate topic names in all overlays.
Fixes #25353
2023-05-09 13:43:40 -07:00
sbansal1999 323d749189 status-message: Add margin-top to sender info to avoid overlap.
Earlier, the sender info would overlap with the edit compose
area because of another class applying "margin-top" to keep
the sender info properly aligned when the message is not being
edited. However, that "margin-top" had to be changed when the edit
compose is opened.

This commits adds that "margin-top" to sender info to make sure
that it doesn't overlap with the edit compose area.
2023-05-01 16:36:37 -07:00
Aman Agrawal a02f431036 css: Fix date row overlapping with message header.
When there was an unread message below date row, the date
row overlaps with the message header.

This was a result of #23538 not adjusting the message header
z-index along with the z-index of date row.
2023-05-01 10:56:44 -07:00
Aman Agrawal eeb3ff26e1 css: Fix loading spinner position for messages loading indicator. 2023-04-29 07:21:19 -07:00
evykassirer 199afbe8eb messagebox: Update background-color for mentions.
This is part of #22059.
2023-04-28 19:06:50 -07:00
Aman Agrawal b33438eb55 css: Move `10px` navbar bottom padding above message header.
This is a more natural place for this extra padding than below the
navbar. Padding below navbar was primarily needed to hide the
message content above the sticky header while scrolling the message feed.
We are still able to do with this change without partially hiding the
loading message indicator.

Fixes #25159
2023-04-28 12:48:10 -07:00
Hardik Dharmani eee5c99cd7 recipient_row: Use unmute icon for topics in muted stream.
Updated mute_or_unmute_topic to take visibility policy as parameter
and set topic visibility_policy to the passed visibility_policy.

In zulip.css, updated CSS to set opacity as per visibility_policy.

Updated click handlers for recipient_row mute/unmute icons to
work as per stream.

Fixes #25124
2023-04-25 13:35:38 -07:00
Aman Agrawal 219a936aee css: Use less saturated colors for PMs. 2023-04-24 17:29:06 -07:00
evykassirer 7c9677becd search: Put typeahead under search bar in the DOM with full width.
Previously the typeahead container was being created at the bottom
of `body`, and its width (and `top` and `left`) were being set to
move it to the right position.

Now it sits in the search box container, which gives it the correct
position and width by default. This is better for DOM readability,
and is also better for the new 100% width (which is part of the
search bar redesign) because it can change width more smoothly
with the search bar when the page changes width.

This commit adds custom functionality to the bootstrap typeahead
to allow the typehead to be placed in the search box container
(whereas previously, it could only be appended to `body`).
2023-04-24 17:15:41 -07:00
Akarsh Jain 3e6f34780a bookend: Add stream icons to subscribed/unsubscribed divider line.
Fixes: #23685.
2023-04-24 11:53:16 -07:00
Aman Agrawal 043d54d170 scheduled_messages: Add overlay to display and edit them.
Fixes #20971
2023-04-17 16:59:25 -07:00
Aman Agrawal 7bd66891f0 css: Add background color for date row.
The logic to avoid first unread message with a date row to not
have an unread marker works purely based on `z-index` and seems
to be working nicely.

This avoids a bug where the background color of the date row
of the first unread message is different from others.
2023-04-17 12:12:41 -07:00
Aman Agrawal 8c744752ed stream_privacy: Use new lock and hashtag icons.
This commit doesn't modify the lock and hashtag icon in settings.
2023-04-10 23:41:30 -07:00
Aman Agrawal bc8d136d5c css: Implement new design for recipient row.
This mostly includes the CSS changes for recipient row design,
most of the HTML and JS changes are present in previous commits to
this.
2023-04-10 23:41:30 -07:00
Aman Agrawal 7e473003a6 recipient_row: Use a dimmed stream color for background.
Following important changes are being made here:
* color_class lib is removed since it not used anywhere now.
* We don't need the `dark_background` class since the background
  color is already adjusted based on color scheme. So, all
  instances of it being used is removed.
2023-04-10 23:41:30 -07:00
Lakshay Mittal e86fe4e57c messages: Add spinner for messages sent on slow connections.
At times, it might get confusing for users who are on
slow connections if their messages has not been sent
even after 5s. Including a spinner that will only show
up after 5 seconds has elapsed will keep user informed
about their slow connection.

5s is set as minimum time because showing up a spinner
before than might be distracting for users on normal
connections.

Fixes: #19328.
2023-04-10 17:36:26 -07:00
Hardik Dharmani daad0a6618 navbar: Fix alignment of `search_close` icon on device width < $sm_min.
This commit fixes the alignment of the `search_close` icon on devices
with a width less than $sm_min (576px) by removing a top padding
of 5px and adjusting the position to top 5px from the previous 4px.
2023-04-10 08:09:18 -07:00
Lakshay Mittal f76ea24988 style: Fix dropdown icon partially visible on small screens.
The dropdown icon for direct messages is partially visible
on small screens. This was due to removing padding when the
screen size is below a certain size by media query.

The intent of the original code appears to have been to remove top
padding, so make the CSS do just that.
2023-04-06 18:25:09 -07:00
N-Shar-ma dceb49011a css: Fix misaligned invite link.
Remove unnecessary `relative` positioning from the invite link.
2023-04-03 15:07:38 -07:00
Sahil Batra 52619657ca css: Add width property to CSS for #inline_topic_edit element.
This commit adds width property to CSS for "#inline_topic_edit"
element in zulip.css to set it to 206px, as we will be removing
the bootstrap CSS for it in further commits.
2023-03-27 22:34:30 -07:00
Karl Stolley 674cf8eacc css: Hyphenate .status-emoji selector. 2023-03-27 17:31:31 -07:00
Aman Agrawal 83423bb45b copy_message_button: Use `div` HTML tag instead of `button`.
For some reason, browser is treating clicking on the button as
submitting the form, which results in the page getting redirected
to the same page with an additional empty query `?` in the URL.
2023-03-27 16:11:19 -07:00
Anders Kaseorg d274583d8f styles: Use modern color notation.
postcss-preset-env transpiles this back as necessary.  (It does a
better job than we did, in fact: we had several four-argument hsl()
calls that should have been hsla().)

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-24 17:26:55 -07:00
YashRE42 e3ad9c10bb navbar: Add Ionic search icon and use for navbar search.
This adds a new search icon which we prefer over the one made
available from bootstrap, and replaces search icons in navbar
search with the Ionic icon.
2023-03-24 16:30:15 -07:00
Tim Abbott 35440672a7 message_list: Rename confusing hide-date CSS class.
The previous hide-date CSS class had a semantic meaning of "this
recipient row has the same date as the previous one"; since we're now
having logic read that value, it's worth giving it a semantic name
that makes that code easier to understand.
2023-03-21 12:55:13 -07:00
Aman Agrawal 404f6a404a message_list: Fix duplicate date headers at the top of message feed.
Hide the date on date separator when it is above a sticky header; see
the comments for the full algorithm.
2023-03-21 12:55:13 -07:00
Joseph Ho c8d043e12c
popovers: Fix tooltip partially hidden by recipient bar when selected.
Previously, when a user view the message source of a message at the
very top with the blue box around, the tooltip for the button will
be partially hidden by the recipient bar. Ths cause is some legacy 
CSS from, for example, 3cd33c0fea,
which increased the z-index for the bodies of selected messages.

The intent of that code appeared to be something around handling overlaps
between unread indicators and the blue selected message box. It's logically
incorrect, and testing demonstrates that the blue box works fine next to unread
messages without this change, so we can safely remove these z-index values.
2023-03-21 12:47:47 -07:00
Anders Kaseorg 13066e6406 styles: Fix dark-theme mixin in zulip.css.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-20 15:48:29 -07:00
Anders Kaseorg 790c8a1582 stylelint: Fix at-rule-empty-line-before.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-20 15:48:29 -07:00
Anders Kaseorg 5cdf38b1f7 styles: Use standard CSS nesting syntax.
CSS nesting is being standardized with the syntactic restriction that
the nested selector cannot start with an identifier.  This was
necessary to allow the syntax to be parsed without lookahead.

https://webkit.org/blog/13813/try-css-nesting-today-in-safari-technology-preview/
https://www.w3.org/TR/css-nesting-1/#syntax

The postcss-nesting plugin used by postcss-preset-env enforces this
restriction.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-20 11:26:30 -07:00
Anders Kaseorg f03b609bfd Revert "minor: Add `z-index` to `message_time` class."
This reverts commit e16e7630e6 (#19542).

This was compiling to

    a.messagebox-content .message_time {
        z-index: 1;
    }

which did nothing, because .messagebox-content is a <div>, not an <a>.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-20 11:26:30 -07:00
evykassirer 0a7fbc7085 search css refactor: Move search-related selectors out of media queries. 2023-03-07 15:38:11 -08:00
evykassirer f1e6f4b5dd search css refactor: Move relevant css from zulip.css. 2023-03-07 15:38:11 -08:00
evykassirer caba06e93d global css: Convert SASS variables to CSS custom properties. 2023-03-07 15:38:11 -08:00
Ganesh Pawar 537617b46d invite_user: Convert overlay to `dialog_widget`.
Fixes #22957.
2023-02-26 18:37:05 -08:00
Anders Kaseorg c1675913a2 web: Move web app to ‘web’ directory.
Ever since we started bundling the app with webpack, there’s been less
and less overlap between our ‘static’ directory (files belonging to
the frontend app) and Django’s interpretation of the ‘static’
directory (files served directly to the web).

Split the app out to its own ‘web’ directory outside of ‘static’, and
remove all the custom collectstatic --ignore rules.  This makes it
much clearer what’s actually being served to the web, and what’s being
bundled by webpack.  It also shrinks the release tarball by 3%.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-23 16:04:17 -08:00