Commit Graph

4850 Commits

Author SHA1 Message Date
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
Shubham Padia 2a7cbc96ec settings: Rephrase comment in settings_components.ts. 2024-06-18 09:41:56 -07:00
Aman Agrawal 00c56a65ed navbar: Rename realm-logo to realm-navbar-wide-logo. 2024-06-18 09:38:51 -07:00
Aman Agrawal 7ddf7a96dc navbar: Show realm icon logo instead of full logo on narrow widths.
When left sidebar is hidden between 1200px and 768px, we show
smaller realm icon logo instead of the full realm logo. Also,
we use the new space to expand the middle column to better show
the narrow description.
2024-06-18 09:38:51 -07:00
Aman Agrawal 406e9b89d0 css: Fix navbar logo misaligned on small heights. 2024-06-18 09:38:51 -07:00
Tim Abbott 1c3350b0b9 popovers: Fix typo in recent view menu. 2024-06-17 18:32:57 -07:00
Sayam Samal 72dd63a184 left_sidebar: Move popover `theme` prop to `left_sidebar_tippy_options`.
As a follow-up to the previous commits redesigning the left sidebar
popovers using the new `popover-menu` theme, this moves the `theme`
prop from all the individual left sidebar popovers to the shared
`left_sidebar_tippy_options` object.
2024-06-17 18:32:57 -07:00
Sayam Samal a529abc16e left_sidebar: Redesign stream settings popover.
Fixes part of #28699.
2024-06-17 18:32:57 -07:00
Sayam Samal f81f26116f left_sidebar: Redesign condensed view popover.
This commit also sets all popover labels to flex grow into the remaining
available space. This allows us to align the unread counters, if any
to the rightmost corner of the menu option. This change, however, does
not lead to visual changes in any popover.

Fixes part of #28699.
2024-06-17 18:32:57 -07:00
Sayam Samal c4defc80aa left_sidebar: Redesign drafts view popover.
Fixes part of #28699.
2024-06-17 18:32:57 -07:00
Sayam Samal 40e548ef5b left_sidebar: Redesign starred messages popover.
Fixes part of #28699.
2024-06-17 18:32:57 -07:00
Sayam Samal 6db809db70 left_sidebar: Redesign recent conversations view popover.
Fixes part of #28699.
2024-06-17 18:32:57 -07:00
Sayam Samal b0ae9fedbf left_sidebar: Redesign combined feed view popover.
Fixes part of #28699.
2024-06-17 18:32:57 -07:00
Sayam Samal 7482f9b0fe left_sidebar: Redesign inbox view popover.
Fixes part of #28699.
2024-06-17 18:32:57 -07:00
nimish 81ea09be19 search: Add is:followed filter.
Create the is:followed search operator.
Fetch all messages that are from followed topics
using exists.
Update API documentation and changelog.

Co-authored-by: Kenneth Rodrigues <kenneth.nrk123@gmail.com>

Fixes #27309.
2024-06-17 18:22:50 -07:00
evykassirer 5c9f62443a search_suggestion: Refactor Attacher to keep a list of suggestion terms.
Previously we generated the search_string and display_html as we
generated suggestions. This commit changes the way Attacher works
to generate these strings once we want the final result. This gives
more flexibility, and will let us replace the last item of `result`,
which will be required for implementing search pills.
2024-06-17 18:01:11 -07:00
evykassirer 20e4778163 search: Don't use e.target for the query click handler.
This is preparation for search pills.

The X button for user pills will be a click target
that disappears from the DOM. We don't want to
look for the parent of a click element that might
not exist, since that would give us a false positive
and lead us to reset the search bar when removing a
user pill. This commit brings this click handler to
a more stable state.
2024-06-17 18:01:11 -07:00
Shubham Padia 8254ef428b settings_users: Add keyboard nav to org user settings toggler.
This commit also adds an extra $elem argument to
`settings_panel_menu.set_key_handlers` which defaults to $mail.elem.
This argument helps us specify a specific element to attach the key handlers
to, instead of the entire settings panel.
2024-06-17 17:16:21 -07:00
Shubham Padia aeaf808c57 settings_users: Add live-update on deactivation & reactivation.
We will redraw the list on every deactivation or reactivation.
While that might seem expensive to redraw on each user, the other
option we have is to have some logic run each time the tab is selected
and redraw if the user list has changed.
Since deactivation and reactivation is not something that an admin
would do multiple times a day, redrawing on each user should be fine
for now.
We will continue displaying the reactivated/deactivated users in a
greyed out column after the live-update, since it is weird for a user
to disappear suddenly from the list.
2024-06-17 17:16:21 -07:00
Shubham Padia 8ab6e71593 settings: Unite user settings into a single panel.
Previously, there were three different sections for managing active
users, deactivated users and invitations.
This commit combines users section has into a single tabbed panel.

Fixes: #26949.

Co-authored-by: shashank-23002 <21bec103@iiitdmj.ac.in>
2024-06-17 17:16:21 -07:00
Shubham Padia e4c89771fd settings: Rename `user-list-admin` to `users`.
Renaming the url for better readability on the user's side.
We've also added a redirect for this, which will change the `section`
from `user-list-admin` to `users` whenever required.
See https://github.com/zulip/zulip/pull/30268#discussion_r1631539656
2024-06-17 17:16:21 -07:00
Shubham Padia 9c47a7be28 hashchange: Add stub_with_args for admin.launch test.
We've added a new stub function that records the arguments passed
to a function called `stub_with_args`. We're only using this right
now for `admin.launch` since we plan to test that arg in the upcoming
commits for the redirect.
For most of the other functions, the args are empty, so it doesn't make
sense to refactor those tests to use this new stub.
2024-06-17 17:16:21 -07:00
Shubham Padia 1204d86818 settings_toggle: Rename `highlight_toggle` to `goto`.
The name sounded like it was doing some highlighting of the given
tab, instead of the actual navigation that the function does.

See https://github.com/zulip/zulip/pull/30268#discussion_r1631531684
2024-06-17 17:16:21 -07:00
Shubham Padia d858c36c43 settings_invites: Rename `Invites` to `Invitations`.
Since we are uniting the user settings into a single panel in the
upcoming commits, we are naming the invites tab as `invitations`.
We also replace `invites` with `invitations` on all user facing
strings on this page.
This commit is a preparatory commit for that.
See https://github.com/zulip/zulip/pull/30268#issuecomment-2155213539
2024-06-17 17:16:21 -07:00
Shubham Padia dd4fc4285a toggle: Add register_event_handlers to toggle prototype.
This is a preparatory commit to combine user settings panels into
one. We need to re-register event handlers since they get destroyed
when the settings modal is closed. After re-opening the modal,
clicking the tabs would not do anything unless we re-register our
event handlers.
2024-06-17 17:16:21 -07:00
Shubham Padia 78630b6395 settings: Store current tab value in current_tab.
When the organization settings are launched, there
is a duplicate function call to the 'activate_section_or_default'
function to render the correct section.

This commit adds a field to store the section name,
which is then used to render the correct section.

Co-authored-by: shashank-23002 <21bec103@iiitdmj.ac.in>
2024-06-17 17:16:21 -07:00
Joy Chen 8a1a41e1ac
search: Remove is:dm suggestion from get_operator_suggestions.
Previously, is: searches as a spectator would suggest "Direct messages", even though 
DMs aren't accessible for spectators. Fix this by moving the is:dm suggestion
logic to `get_is_filter_suggestions`, which is not used for spectators.

Fixes #30320.
2024-06-17 16:30:40 -07:00
sujal shah 967f99779a user_group: Move "Choose members" into a separate second panel.
Break the current user group creation panel into two panel
"Create user group: configure settings" and
"Create user group: add members".
2024-06-17 16:20:06 -07:00
sujal shah 8e6d07615c user_group: Extract `show_user_group_settings_pane`.
Extract `show_user_group_settings_pane` with related functions and
variable.
2024-06-17 16:20:06 -07:00
sujal 279e9d1dc3 stream_settings: Move "Choose subscribers" into a separate second panel.
Changed the title of the first panel to
"Create channel: configure settings" and title of second panel to
"Create channel: add subscribers".

Implement logic in stream_create.js to show and hide both the panels.

Add two buttons to facilitate switching between the tabs or panels.

Added new descriptions to 'stream type descriptions'.
2024-06-17 16:20:06 -07:00