Commit Graph

4879 Commits

Author SHA1 Message Date
Aman Agrawal 32b4aa0883 navbar: Remove empty space to the left and right. 2024-06-20 16:11:19 -07:00
Anders Kaseorg 139d6ff81b markdown_timestamp: Remove incorrect space.
The space wasn’t visible because it was narrower than the padding on
`.rendered_markdown time`, but it showed up in copy-and-paste.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-20 16:04:30 -07:00
Sahil Batra e19524ba92 settings: Use new group setting to private channels creation permission.
This commit updates webapp code to use new group based setting to check
permission for creating private streams.
2024-06-20 15:48:14 -07:00
Sahil Batra 69e88f8787 tests: Extract common function to test realm group based settings.
Test for "can_access_all_users_group" setting does not use the
common function as it allows different options as of now.
2024-06-20 15:48:14 -07:00
evykassirer f6c9b515c7 input_pill: Redesign input pills.
This commit also replaces the close button with
an svg. This is part of the app redesign, and
preparation for the upcoming search pill project.
2024-06-20 15:16:17 -07:00
evykassirer 84cf7f8677 input pill: Remove pill-container-btn class in favor of search styling.
This style is currently only used for search suggestions. Soon,
styling for those suggestions will become more specific, and so
for now we'll keep those styles in search.css to be more clear
about what the new styles affect. If we want to repeat something
like this in the future somewhere else in the app, we can come
up with a generic styling then once we have a better idea of
what that will look like.
2024-06-20 15:16:17 -07:00
Aman Agrawal 792a9bd81e presence: Fix presence status not updated for offline users.
As per the new presence API, we don't get presence info for
users if they went offline after `last_update_id`. This results
in webapp not updating presence info for them.

To fix it, we loop over all the active / idle status users and
update presence status for them as per the latest server time.
2024-06-20 12:35:42 -07:00
Ujjawal Modi 9bb74fb064 settings-config: Use snake case for expires_in_values keys. 2024-06-20 12:26:29 -07:00
Ujjawal Modi cdbc20d304 invite-user-modal: Remove duplicate CSS rules.
Removes some CSS rules used in the invite user modal that were
already being applied via the shared `modal_select` class.

Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2024-06-20 12:26:29 -07:00
Kislay Verma d38d82edc3 dropdown_widget: Fix bug in `disable_for_spectators`
If `disable_for_spectators` is true, the widget text is greyed out
but the tippy instance is still delegated, causing it to appear
on click/enter.

This commit fixes that by not delegating tippy if the
`disable_for_spectators` is true.

This bug was surfaced when it was found that the
topic type filter in Recent conversations has disabled
styling for spectators, but a spectator could still click on it to
open the dropdown.

Fixes #30461
2024-06-20 12:09:04 -07:00
Shubham Padia 43eebbf9c6 scroll: Set tabIndex to -1 for simplebar content wrapper.
Fixes #30403.
Having tabIndex set to 0 led to keyboard focus being put on
a scrollbar container, which led to users having to tab twice
to skip a container.
This commit also removes instances of tabIndex being set to
-1 programatically for certain cases, since it is -1 by default now.
This commit also removes `outline: none` for simplebar since
that property is not needed anymore because the wrapper is
not focusable anymore.
2024-06-20 10:25:51 -07:00
Shubham Padia b771c5f5b0 pm_list_data: Rename private_message(s) to conversation(s).
Since it's an array of PMConversation objects, not of messages, the
old name was confusing.
2024-06-20 09:58:39 -07:00
Shubham Padia 98f4f1bc35 left_sidebar: Remove unused more_private_messages_sidebar_title css.
This was introduced in 6f9e97921d and
has never been used.
2024-06-20 09:58:32 -07:00
Shubham Padia a7da20a66a left_sidebar: Rename show-all-pms-template to use `direct-messages`.
Rename `show-all-pms-template` to `show-all-direct-messages-template`.
Part of the private_message to direct_message rename project.
2024-06-20 09:58:32 -07:00
Shubham Padia cad5843da6 left_sidebar: Rename show_all_private_messages to use `direct`.
Rename `show_all_private_messages` to `show-all-direct-messages`.
We've also hyphenated the attribute during the rename.
Part of the private_message to direct_message rename project.
2024-06-20 09:58:32 -07:00
Shubham Padia f90ad8ca15 left_sidebar: Remove unused toggle_private_messages_section class.
This was introduced in 6f9e97921d and
has never been used.
2024-06-20 09:58:04 -07:00
Shubham Padia 0e8a6a0196 left_sidebar: Rename toggle_private_messages_section_icon to use direct.
Rename `toggle_private_messages_section_icon` to
`toggle-direct-messages-section-icon`.
We've also hyphenated the attribute during the rename.
Part of the private_message to direct_message rename project.
2024-06-20 09:55:29 -07:00
Shubham Padia 5a3fc26d74 left_sidebar: Rename private_messages_section_header to use `direct`.
Rename `private_messages_section_header` to
`direct-messages-section-header`.
We've also hyphenated the attribute during the rename.
Part of the private_message to direct_message rename project.
2024-06-20 09:55:29 -07:00
Shubham Padia b197659d8a left_sidebar: Rename private_messages_section to use `direct`.
Rename `private_messages_section` to `direct-messages-section`.
We've also hyphenated the attribute during the rename.
Part of the private_message to direct_message rename project.
2024-06-20 09:55:29 -07:00
Shubham Padia 7dc47e8484 left_sidebar: Rename private_messages_sticky_header to use `direct`.
Rename `private_messages_sticky_header` to
`direct-messages-sticky-header`.
We've also hyphenated the attribute during the rename.
Part of the private_message to direct_message rename project.
2024-06-20 09:55:29 -07:00
N-Shar-ma b852b5fef0 compose: Show focus ring on buttons only when using keyboard navigation.
For the compose control buttons, the compose close button, and the send
later vdots button, we show the focus ring only on `focus-visible` and
not on `focus`.

Fixes part of: #27117.
2024-06-20 09:45:18 -07:00
N-Shar-ma 5c1069872d css: Redefine `--color-outline-focus` for dark theme.
The css variable `--color-outline-focus`, which affects focus rings
throughout the app, now has a different value defined for the dark theme
but this should have no visible effect, and help clean up the code.

This is a prep commit for the next, which shows focus rings only on
`focus-visible` and not on `focus` for composer buttons.
2024-06-20 09:45:18 -07:00
Shubham Padia 35aa186a72 css: Remove unused css for channel & topic list filter.
The margin properties in question were getting overridden by other
css, so they were not important. The width was not making a difference
in case of channel filter, since its parent was a flexbox. For the
topic list, the width was getting overriden by
`#stream_filters .input-append.topic_search_section input`.
2024-06-20 09:34:08 -07:00
Aman Agrawal 12e2b6637e list_widget: Fix more elements not rendered on scrolling to bottom.
This bug can be reproduced by scrolling anywhere where list widget
is used except recent view.

`$scroll_container` was used before
371cd0da6c
to listen to scroll events which was incorrectly replaced by
`opts.$simplebar_container` in the above commit. To fix this,
we use the same function `scroll_util.get_scroll_element` to
get the correct scroll element.
2024-06-20 09:33:22 -07:00
evykassirer ee2852ede1 search suggestion: Consistently show user pills in typeahead.
Fixes #23365.
2024-06-19 18:41:51 -07:00
evykassirer 0899b621d3 search_suggestion: Show pills for all users in a group suggestion.
This fixes half of #23665. It shows all user pills when making
a group suggestions as the active new suggestion, but still
doesn't show user pills for the first parts of suggestion lines.
2024-06-19 18:41:51 -07:00
Shubham Padia 628757a2df left_sidebar: Use same color for active narrow filter for dm section.
Fixes #30467.
2024-06-19 18:10:15 -07:00
Shubham Padia e9f3371eca css: Remove unused css rules for background colour in dark theme.
We don't need this explicit rule anymore, since the css variable will
change the background color from zulip.css itself.
2024-06-19 18:10:15 -07:00
Shubham Padia b0eab81459 left_sidebar: Rename active_private_messages_section to use `direct`.
Rename `active_private_messages_section` to
`active-direct-messages-section`.
We've also hyphenated the attribute during the rename.
Part of the private_message to direct_message rename project.
2024-06-19 18:10:15 -07:00
Shubham Padia 694d457f43 css: Remove unnnecessary ids from active pm section color.
By removing the ids and setting the background-colour directly
for `.active_private_messages_section` achieves the same purpose.
2024-06-19 18:10:15 -07:00
Aman Agrawal 024d940724 message_list_view: Combine sticky header DOM updates.
This significantly reduces the time taken to update the
sticky header on scrolling.
2024-06-19 17:55:49 -07:00
Aman Agrawal 9d3f8bff55 inbox_ui: Don't process scroll events if Inbox is not visible.
The `get_all_rows` call should be scoped inside `#inbox-main` otherwise
it used to query all the elements in the DOM which is quite expensive.

Also, we don't need to handle scroll events in Inbox view if it
is not visible.
2024-06-19 17:55:49 -07:00
Sayam Samal fec89ad70d visibility_policy_popover: Fix popover shrinking bug on Safari.
A bug was observed on Safari where the visibility policy switcher
popover was shrinking beyond the width of the policy switcher, hiding
a portion of the switcher component.

This was due to the presence of the `width: min-content` on the
popover for supporting dynamic popover menu sizing based on the content
of the menu items, in tandem with some issue in Safari since it worked
fine on other browsers.

This commit adds the `.popover-menu-label` class to the visibility
policy switcher's label to enforce `max-content` width on the label
element, which in turn fixes the popover shrinking issue on Safari.
2024-06-19 17:47:35 -07:00
Sayam Samal eb93738873 pm_section: Fix ghost tooltip on collapse/expand DM toggle.
As reported in a bug report, the tooltip on the DM collapse/expand
toggle was reappearing after switching in and out of the browser window.

This commit destroys the current instance of the tooltip when it is
hidden. This clean up ensures that the tooltip does not appear again
unless the triggered explicitly by the user.
2024-06-19 17:46:59 -07:00
N-Shar-ma 906a9ca8f2 compose: Rework alignment of upper elements, and redesign close icon.
We now right align recipient input (even at very narrow widths) and
banners to the textbox, and move the close button to the absolute top
right corner of the compose box, updating the icon to be slimmer, bigger
and purplish, and adding a background highlight on hover.

This involved refactoring the send control area width into a responsive
css variable, and simplifying the html structure of the compose box.

Fixes: #28792.
2024-06-18 15:51:51 -07:00
roanster007 7ebbdd942d typing: Move the typing notifications to below the mark as read banner.
Previously, the typing notifications used to appear between the
message list and the mark as read banner in a thread. This would
cause the banner to shift down whenever someone starts typing,
and shift back up if everyone stops typing.

This frequent bouncing of the banner could be distracting, and hence,
is fixed by moving the typing notifications to below the mark as
read banner.
2024-06-18 14:30:19 -07:00
roanster007 1d3da31b8b unread_ui: Refactor method to update unread banner.
This commit refactors the "update_unread_banner", so that
the "mark_read_on_scroll_state_banner" innerHtml is
set using a separate method by passing the necessary
template.

This is a preparatory commit.
2024-06-18 14:30:19 -07:00
sujal shah 8d29e1829f uesr_group_settings: Update panel titles.
Change the titles of both panel in usergroup section.

Fixes part of #29403.
2024-06-18 14:20:17 -07:00
sujal shah eb259780f7 stream_settings: Reduce vertical space between setttings.
There was previously an excessive margin between
the "default streams" and "announce streams" settings.
2024-06-18 14:20:17 -07:00
opmkumar 30f65e5e2d left sidebar: Make Views label visible for spectators.
We don't include the toggle functionality, to avoid needing to design
what a collapsed Views thing would look like.

Fixes #30324.
2024-06-18 10:50:09 -07:00
Karl Stolley 6fe15626ae search: Set base font-size on search input. 2024-06-18 10:14:27 -07:00
Karl Stolley d9238cf784 message_time: Express font-size in em units. 2024-06-18 10:12:58 -07:00
Karl Stolley ceb89a3dd8 inbox: Enable flexible font-sizing on inbox. 2024-06-18 10:10:38 -07:00
Karl Stolley 424b3add6d left_sidebar: Restore righthand padding to DM partners. 2024-06-18 10:09:40 -07:00
Karl Stolley c80ffe8e0f server_dispatch: Calculate typography vars on dense_mode.
Owing to logic added in #30050, which accounts for the legacy line-
height value, toggling dense mode requires recalculating the
typography vars--otherwise, a non-legacy line-height value will
not be picked up until a refresh.
2024-06-18 10:08:54 -07:00
PieterCK c4d20678e4 settings: Refactor css for notification table.
Add new app variable for .notification-table class.
This variable is responsible to set the tables' thead
background color in dark theme. Previously it depended
on a genral CSS rule in dark_theme.css for its thead
color, however that cluster of rule has been deprecated
in #29859.

Note: The `thead` background color for the notification
table in the light theme is transparent, so the new
variable in `app_variable.css` does not have a
corresponding value for the light theme.
2024-06-18 09:48:41 -07:00
PieterCK 681adc1a75 app_components: Refactor table-bordered border color rule.
This optional commit also fixes #30431. It refactors the CSS
for the .table-bordered class, which is used directly by the
tables in the info_overlay menus (keyboard_shortcuts,
search_operators, markdown_help). This approach differs from
PR #30431, where the CSS for .overlay_body—a wrapper div
around these tables—was edited instead.

This commit make the CSS rules for .table-bordered class
use a new CSS variable for its border color where appropriate.
This is aligns with how we organizes CSS in #29859 and in
cd63e8d93cb0f84ec1e4ead348a225cb798f9cf0.

Fixes #39431.
2024-06-18 09:48:41 -07:00
PieterCK 2c7f8ef4a1 informational_overlays: Deprecate redundant fix for table color.
This is a prep commit to an optional commit. It rolls back the
changes from #30431 because #30449 tries to fix a wider regression
that included the issue #30431 tried to fix.
2024-06-18 09:48:41 -07:00
PieterCK d16ae00b15 app_components: Refactor table-striped border color rule.
This commit fix the regression for tables at uses the
.table-striped css, which are primarily used at the
settings menu.

In #29859, we began organizing CSS into more specific
variables and selector, which led to the deprecation of
several general CSS rules that affected these tables.

The fix switches the border-color value used by the
.table-striped css rules to a new CSS variable that
contains both dark and light theme values.

Fixes #30449
2024-06-18 09:48:41 -07:00
Shubham Padia 13ba9cc72a custom_profile_fields: Convert select field tooltip to use tippy.
See https://github.com/zulip/zulip/pull/29880#issuecomment-2166510991
2024-06-18 09:41:56 -07:00