Commit Graph

4879 Commits

Author SHA1 Message Date
Karl Stolley 544d86646e recent_view: Improve alignment and grouping of status emoji. 2024-06-14 10:50:21 -07:00
Karl Stolley 25e19d8417 recent_view: Improve icon sizing and alignment. 2024-06-14 10:50:21 -07:00
Karl Stolley ee0d38166a recent_view: Remove unnecessary group icon styles. 2024-06-14 10:50:21 -07:00
Lauryn Menard 0bd2f0e545 api-docs: Extract logic for rendering events table and use templates.
Extracts code for generating the events table strings to a separate
function and uses templates so that the HTML is clearer.

Updates events table classes for CSS to start with "api-" for
clarity.
2024-06-14 10:29:53 -07:00
Lauryn Menard 963c871858 api-docs: Extract logic for generating individual event strings.
Creates a dataclass for getting the data needed for an individual
event's documentation and uses that dataclass in a separate
function for generating the strings for each event's documentation.

Uses templates for parts of event documentation with HTML and CSS,
and updates CSS classes to have clearer names.
2024-06-14 10:29:53 -07:00
N-Shar-ma 50fcc740bc compose: Fix bug causing layout shift on expanding compose box.
The messagebox-wrapper div is removed, and it's only style `flex: 1` is
applied to the messagebox div. The `height: 100%` and `margin-top: 5px`
styles on the messagebox div were earlier causing it to move 5px down,
outside the messagebox-wrapper div, when the compose box was expanded.
2024-06-14 10:18:08 -07:00
N-Shar-ma af76d80856 compose: Fix bug where compose box was sometimes not scrollable.
Earlier, autosize wasn't updated for the compose box after resetting its
`max-height`, so in cases where the older `max-height` was more than the
height, and the current max-height was less than the height, the compose
box would not be scrollable.

We now always update the autosize after resetting the max-height.
2024-06-14 10:15:47 -07:00
Karl Stolley 90f6e19948 user_groups: Restore correct max-height value.
This restores a value that was erroneously changed in #30388.
2024-06-14 10:01:58 -07:00
Aman Agrawal a361f2939a stream_edit: Fix user popover permanently displayed in stream settings.
If a user popover is open in stream settings, and user presses
`down/up` arrow to view settings for a different stream, the user
popover stay open.

Why we need to explicitly hide it?
We have click handlers to hide the popover and `data-reference-hidden`
to hide the popover if the reference goes offscreen via scrolling.

In this case, those events don't fire, there is no reason for tippy
to check if reference is visible and thus show / hide the popover.
2024-06-13 06:57:23 -07:00
Vector73 e8a5cb99bf api_docs: Improve events table and fix font style of events title. 2024-06-13 06:53:51 -07:00
Kislay Verma 03f81eef07 navbar: Tweak Combined feed description for spectators.
Since spectators cannot mute channels or topics, the combined
feed description for spectators is tweaked to exclude that part.

Fixes #30321
2024-06-13 06:50:07 -07:00
PieterCK dae4c28b5b css: Add new css for rendered markdown table in dark mode.
Add a new dark mode css in app_variable.css for rendered
markdown tables. This rule sets a brighter color for tables
in messages / chat to make it more visible when the user is
using dark theme.

Fixes zulip#29856.
2024-06-12 06:45:00 -07:00
PieterCK e16b8eba56 css: Refactor css for markdown thead background color.
This refactor aims to make managing css for rendered
markdown table easier by abstracting the css for thead
background color into a new variable in app_variable.
2024-06-12 06:45:00 -07:00
PieterCK 55fe0c5c85 css: Refactor css for markdown table border color.
This refactor aims to make managing css for rendered
markdown table easier by abstracting the css for table
border color into a new variable in app_variable.
2024-06-12 06:45:00 -07:00
Aman Agrawal 4e9ea5d782 help: Fix left sidebar not bouncing on mac.
Since left sidebar was in fixed position, mac's rubber-band scroll
effect was not working on it while it was working for others making
the bounce look weird.

Fixed by letting it bounce with the rest of the elements on the page.
2024-06-12 05:33:36 -07:00
Aman Agrawal 5aec31cf99 billing: Remove success message from URL after being displayed.
We directly override the browser history to remove the parameter from
URL to avoid it being displayed if user comes back in history too.
2024-06-11 15:26:57 -07:00
Anders Kaseorg 3b22065477 web: Add missing CSS escaping for url(…).
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-11 15:22:33 -07:00
N-Shar-ma ac3b5b3b04 compose: Redesign and relocate compose expand / collapse button.
The compose expand / collapse button is moved from the top right of the
compose area to the top right corner inside the compose textarea /
preview.

The textarea / preview and the button area shares the same grid parent.
25px extra padding is added to and margin is subtracted from the right
of the element so the button is visually inside it. It appears only on
hovering the compose area, and uses a new custom icon.

Fixes: #28791.
2024-06-11 14:13:10 -07:00
N-Shar-ma 41d790bd08 compose: Make the preview box background color same as the textbox's. 2024-06-11 14:13:10 -07:00
Tim Abbott 5d88ff6676 user_profile: Fix live-update exception when viewing channels tab.
Sentry reporting discovered that if the user was viewing the channels
tab for a bot when the bot's owner was changed (or various other
live-updates), we'd throw an exception trying to access the
original_values object for the manage-user/bot tab.

This code is fragile and messy, but probably a framework change is the
most expedient path to fixing it.
2024-06-11 13:41:46 -07:00
Karl Stolley 47c3903ce0 settings: Present modal sidebars as gridded rows. 2024-06-11 13:34:11 -07:00
Karl Stolley a4aa8d48ca settings_modal: Scope sidebar transition to properties in use. 2024-06-11 13:34:11 -07:00
evykassirer fea4b2f65d buddy list: Remove buggy check preventing updates to me.
This check doesn't work with the `me` user, because that
user is always at the top of the all users list, and
therefore `new_pos_in_all_users` will always be 0 and
never `render_count`. It's possible this was already
broken before the split buddy list change.

We can remove this check because `insert_new_html` is only
called when we definitely want to insert html. It's only
called from `insert_or_move`, and for moves we always
remove the user we're moving/replacing before the insert.
2024-06-11 12:58:18 -07:00
Aman Agrawal c5b8255d42 navbar: Move left sidebar toggle icon to left of org logo.
Make the org logo smaller and moves the left sidebar toggle icon
to the left of the logo.
2024-06-11 12:42:42 -07:00
Aman Agrawal 04f4b75d62 sidebar_ui: Save current toggle status in localstorage. 2024-06-11 12:42:42 -07:00
Aman Agrawal 043e0311d2 css: Expand to occupy left sidebar space if available on narrow widths. 2024-06-11 12:42:42 -07:00
Aman Agrawal 8aafb72e18 css: Let middle column expand to full width in fluid layout.
When left / right sidebar are hidden, we let middle column to take
up the extra space.
2024-06-11 12:42:42 -07:00
Aman Agrawal 80cc699f42 css: Fix left sidebar toggle button misaligned on small window height. 2024-06-11 12:42:42 -07:00
Aman Agrawal 96dac9ece9 navbar: Add button to toggle left sidebar. 2024-06-11 12:42:42 -07:00
Aman Agrawal c531631ecf navbar: Rename left sidebar toggle button unread count indicator.
Renamed to match the name with the wrapper element and used class
so that we can apply same CSS to other buttons.
2024-06-11 12:42:42 -07:00
Aman Agrawal 9fec1f69ed navbar: Rename left sidebar toggle button.
This name better describes what the button does and using a class
helps us use it's CSS and events for other buttons.
2024-06-11 12:42:42 -07:00
Aman Agrawal 38482c2e4e right_sidebar: Fix user list toggle button not spanning navbar height.
We don't need to reduce height of user list toggle button on
narrow widths. Reduced height is already applied to the user list
toggle button when the window height is below a threshold.
2024-06-11 12:42:42 -07:00
Karl Stolley db5f584684 info_density: Sanely restore Zulip-style oversize emoji. 2024-06-11 12:25:16 -07:00
Karl Stolley cc3202a1be info_density: Size and align emoji precisely with line-fitted values. 2024-06-11 12:25:16 -07:00
Karl Stolley 1270e4b74b info_density: Calculate values for inline-box vertical alignment.
Co-Authored-By: Greg Price <greg@zulip.com>
2024-06-11 12:25:16 -07:00
Sahil Batra 901b216e7a settings: Refactor code to handle dropdown widgets.
We now add a new function to set up the dropdown widget for
settings using new dropdown_widget.DropdownWidget instead of
calling dropdown_widget.DropdownWidget multiple times to
reduce code duplication.
2024-06-11 12:22:10 -07:00
Sahil Batra 47b678a4ab settings_components: Use single function to set dropdown widget variables.
Instead of having different functions to set values of dropdown widget
variables, we now use a single function to set their values by passing
the setting name to the function.
2024-06-11 12:22:10 -07:00
adnan-td ef65137675 compose_pills: Fix long text overflow in DM recipient box.
Removes the fixed height of the input field in compose
DM recipient box. This commit makes the behaviour of recipient
compose box equal to input pills used else where.

Fixes: #27688.
2024-06-11 12:00:15 -07:00
adnan-td 2521adb0cd invite_user_modal: Fix background color of input field. 2024-06-11 11:59:40 -07:00
Varun Singh fee7fb6c87 user_group_create_members: Convert module to TypeScript. 2024-06-11 11:58:12 -07:00
Varun Singh 78f105475a stream_create_subscribers: Convert module to TypeScript. 2024-06-11 11:57:46 -07:00
Vector73 f4c111b68a api_docs: Convert event names to lowercase in api docs. 2024-06-11 11:17:38 -07:00
Vector73 a4108e05ad api_docs: Add table of links for easy navigation in events api docs. 2024-06-11 11:17:38 -07:00
Sayam Samal 1cb3c85417 compose: Update CZO links from stream to channel in compose tests.
This is a follow-up to the previous commit, which updated the links in
docs and comments. This commit updates those links that are part of
some code.

This commit is a part of the effort to rename stream to channel.
2024-06-11 10:44:31 -07:00
Sayam Samal a7772f86a2 docs: Update CZO links from stream to channel in docs and comments.
Updates all the https://chat.zulip.org/#narrow/stream/ links in the
docs and comments to use the new /channel/ path. All these links are
for documentation/reference purposes only and thus, can be bulk-updated.

This commit is a part of the effort to rename stream to channel.
2024-06-11 10:44:31 -07:00
Aman Agrawal 16f2c4195b activity: Move `.container` CSS from bootstrap to activity.css.
* `.container` class is only used in `/activity/support` and
  `/activity/remote/support` pages. It is also used in emails but
  it has its own CSS.

* Since the CSS applied is localized and looks good, we just
  move the CSS relevant to us to `activity.css` which is used
  by both of these pages.

* Searched `"container"`, ` container `, `"container ` and
  ` container"` to look for the uses of this class.
2024-06-11 10:42:43 -07:00
Aman Agrawal b40e9acfdf portico: Remove stale CSS.
`container` class was removed from error pages as part of
b2f0677c25.
2024-06-11 10:42:43 -07:00
Aman Agrawal f26b000621 resize: Remove height of hidden elements from buddy list height.
If the elements are hidden, their margin is still included in
calculating the height of buddy list which we don't want.
2024-06-11 10:40:48 -07:00
Karl Stolley 520b7b6a9e compose: Declare banner dimensions in ems. 2024-06-11 10:38:40 -07:00
Karl Stolley 2b92baa754 compose: Size collapsed compose buttons relatively. 2024-06-11 10:38:40 -07:00
Karl Stolley 47cf447bf2 compose: Express recipient box height in ems. 2024-06-11 10:38:40 -07:00
Karl Stolley 131ae54eb7 compose: Prevent blowout on recipient box. 2024-06-11 10:38:40 -07:00
Sayam Samal 01cbaa154f popovers: Add `.popover-menu-tab-group` class to popover tab pickers.
This commit, adds the `.popover-menu-tab-group` class to the tab pickers
that appear together with the other popover menu options and thus
need to match their spacing and margins for a uniform look.

This removes the need to maintain a cluttered list of tab pickers that
need to be styled as such in the `popovers.css` file.
2024-06-10 16:54:11 -07:00
Sayam Samal 70fb213868 visibility_policy_popover: Use the new "popover-menu" popover theme.
As part of the popover menu redesign, this updates the topic visibility
popover to use the new "popover-menu" popover theme and improves
accessibility by using appropriate ARIA attributes.

This also moves the `:focus-visible` CSS rule to apply to any tab
picker in a popover, removing the need to explicitly add it to each
tab picker.

Fixes part of #28699.
2024-06-10 16:54:11 -07:00
Prakhar Pratyush 0c13422c0d compose_banner: Don't show banner if message sent in a near view.
Earlier, when a user was in /near/ topic or dm view, on sending
message in the same conversation we were incorrectly displaying
the 'jump to sent message' banner.

This commit fixes the incorrect behavior.

Fixes #30341.
2024-06-10 14:23:17 -07:00
Prakhar Pratyush bb4d62ffa6 scheduled_message_feed_ui: Show the scheduled indicator in near view.
Earlier, when a user was in /near/ topic or dm view, the scheduled
message indicator was missing in the conversation.

This commit fixes the incorrect behavior.
2024-06-10 14:23:17 -07:00
N-Shar-ma ff4d7974f2 css: Remove dead code for an unused empty div. 2024-06-10 13:25:21 -07:00
Sahil Batra 222995b1be settings: Remove create_public_stream_policy.
This commit removes create_public_stream_policy setting
since public channel creation permissions are now handled
by group-based setting.

We still pass "realm_create_public_stream_policy" in
"/register" response though for older clients with its
value being set depending on the value of group based
setting. If we cannot set its value to an appropriate
enum corresponding to the group setting, then we set
it to "Members only" considering that server will not
allow the users without permissions to create public
channels but the client can make sure that UI is
available to the users who have permission.
2024-06-10 12:24:45 -07:00
Sahil Batra f98a3fc684 settings: Use new group setting to check permission for creating public channels. 2024-06-10 12:24:45 -07:00
Kenneth Rodrigues f53a7cdffa reaction-view: Create has reaction operator.
Create has:reaction search operator and search suggestions.
Create sidebar view for the user to view their messages that
have reactions using has:reaction sender:me operators.
Add custom heading for the view and tooltip in the sidebar.
Add documentation for the new operator.

Fixes: #27328.
2024-06-10 11:46:37 -07:00
Prakhar Pratyush 9120fec604 message_basic_tests: Fix flaky behaviour on sending multiple messages.
While sending multiple messages to different recipients in
'message_basic_tests', we were facing flaky test failure.

The reason being now we jump to the conversation where message
was sent & that was resulting in calls to the
'wait_for_fully_processed_message' function as 'outside_view'
was not correctly set.

Precisely, the call to 'wait_for_fully_processed_message' uses
zulip_test.current_msg_list which won't remain correct when
the sender is narrowed to different views on sending messages
to different recipients in succession.
2024-06-10 10:37:41 -07:00
Anders Kaseorg 1a8d8411a7 tsconfig: Enable composite.
This allows TypeScript to use incremental compilation by default.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-09 12:08:03 -07:00
Anders Kaseorg f03c56d9da shared: Enable exactOptionalPropertyTypes, noUncheckedIndexedAccess.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-09 12:08:03 -07:00
Anders Kaseorg 56753edbcd tsconfig: Organize and sort options consistently.
Organize and sort the options in tsconfig.json according to the way
they’re listed at https://www.typescriptlang.org/tsconfig/.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-09 12:08:03 -07:00
Anders Kaseorg 48feabbb17 shared: Upgrade TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-09 12:08:03 -07:00
Anders Kaseorg 13c44efad9 marked: Fix type stub to declare marked as a CommonJS module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-08 00:26:38 -07:00
Anders Kaseorg fa91a4493c web: Qualify global uses of location and history.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-07 16:10:39 -07:00
Mateusz Mandera 45118180bb presence: Don't send slim_presence in the webapp when querying presence.
Sending last_update_id implies using slim_presence=true, so sending the
extra param is redundant now.
2024-06-07 13:57:40 -07:00
Mateusz Mandera 3ded4c2a7d presence: Frontend implementation of the last_update_id API.
Note: This involves adding presence info of unknown users to the
presence data.
With some small tweaks, we can just add the info to the presence data
structures, just making sure the buddy list correctly skips those
entries and that we redraw the user in the case where the user creation
event arrives after the presence polling loop.
2024-06-07 13:57:40 -07:00
Anders Kaseorg 407655b84f portico header: Remove unnecessary type assertion.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-07 12:12:39 -07:00
Anders Kaseorg 6fd27ce892 list_widget: Reduce TypeScript wreckage.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-07 11:54:37 -07:00
Karl Stolley 4ed51fd06b right_sidebar: Uniformly group user name and status emoji.
This fixes the presentation of emoji in the compact view, where the
flexbox for properly aligning emoji was not set.
2024-06-07 11:53:26 -07:00
Karl Stolley 835bda9634 navbar: Express font and icon sizes in ems. 2024-06-07 11:28:39 -07:00
Karl Stolley 7e1a5e7e45 navbar: Remove unused fa-hashtag CSS. 2024-06-07 11:28:39 -07:00
Karl Stolley dc60317dad info_density: Set calculated font-size on body. 2024-06-07 11:18:52 -07:00
evykassirer 346dc7d79d compose: Auto-close unchanged auto-opened drafts on narrow change.
Fixes #30104.
2024-06-07 10:38:20 -07:00
evykassirer 4cbcd66753 compose_recipient: Set flag that recipient was changed when stream is selected.
This was missed when moving to a stream dropdown instead of input field.
2024-06-07 10:38:20 -07:00
Aman Agrawal 371cd0da6c recent_view: Use html as scroll container.
Fixes #17933, #27517

Instead of `recent_view_table`, we make `html` as our scroll container.
This fixes an important bug for us where filters sometimes disappear
due to them scrolling under navbar which is unexpected. Since we are
now using separate containers to display rows and
filter (while includes table headers), where filters use sticky
positioning, this bug will be fixed.
2024-06-07 10:17:10 -07:00
Aman Agrawal 4750f84ba8 recent_view_ui: Fix first row being focused after scrolling to bottom.
If recent view load more banner is at the center as a result of
`document.elementFromPoint(topic_center_x, topic_center_y)`,
there is no `tr` to focus, resulting in first row to be focused
as the closest element as per previous logic.

To fix it, we just focus the last row which is just above the
load more banner and is visible.
2024-06-07 10:09:30 -07:00
Aman Agrawal 3cc7613841 css: Remove no longer used `required-text` class.
Since we moved to use standard empty view handlebars everywhere,
this became stale.
2024-06-07 10:09:30 -07:00
Anders Kaseorg c9e822f7ad custom_profile_fields_ui: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-07 09:49:40 -07:00
Anders Kaseorg e6bfaed782 pill_typeahead: Separate user-only typeahead to specialized function.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-07 09:49:40 -07:00
Kislay Verma a83dc572df overlay: Blur focused element while overlay is open.
We blur the focused element when an overlay opens, and refocus
it when the overlay is closed, to prevent side effects.

What motivated this change was that opening a lightbox overlay
from preview content while editing a message caused the escape
key to close the message edit form instead of closing the overlay.
2024-06-06 17:13:11 -07:00
Karl Stolley 1d7e0367b8 right_sidebar: Establish inner grid on selectable_sidebar_block. 2024-06-06 17:08:13 -07:00
Karl Stolley 55e0b99670 right_sidebar: Establish outer grid on user rows. 2024-06-06 17:08:13 -07:00
Karl Stolley 74800ba69a right_sidebar: Set user rows to normalized em-based line-height. 2024-06-06 17:08:13 -07:00
Karl Stolley 9b7107ab08 user_circles: Specify colors as CSS variables. 2024-06-06 17:08:13 -07:00
N-Shar-ma 0b728e1b34 copy_and_paste: Let uppy handle pasted single images.
This fixes the bug where an image copied from sites like Twitter / X did
not paste as expected.
2024-06-06 17:03:44 -07:00
Anders Kaseorg aaf90a1da0 typeahead: Nest User inside UserPillData, UserOrMention.
Commit 33484e7ac3 (#29200) added a cache
for remove_diacritics, but this caching was rendered ineffective by
commit 45e9c046d8 (#29650) because it
relied on mutating a direct reference to the User object.  Fix the
cache by rearranging the types to preserve that direct reference.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-06 15:24:54 -07:00
Aman Agrawal 2340855851 typeahead: Remove delay when opening / closing typeahead.
This default delay comes off as the typeahead being laggy to the user.
2024-06-06 12:10:16 -07:00
Varun Singh 4ac12022ca navigate: Convert module to TypeScript. 2024-06-06 11:10:05 -07:00
Aman Agrawal fe162290f1 portico: Remove extra margin on help page.
Likely an effect of recent error pages refactoring.
Tested /help and /api page on desktop and mobile width.
2024-06-06 11:06:08 -07:00
Karl Stolley 53c1c4d98f widgets: Improve structure and layout of headers. 2024-06-05 17:49:21 -07:00
Karl Stolley 81d9eb4a54 widgets: Present poll options as flexboxes. 2024-06-05 17:49:21 -07:00
Karl Stolley ae90258942 widgets: Extend flexbox to widget inputs, buttons. 2024-06-05 17:49:21 -07:00
Karl Stolley da6f69f8b2 widgets: Present to-do items with flexboxes. 2024-06-05 17:49:21 -07:00
Karl Stolley f78fef699e widgets: Set margin only on widget bottom. 2024-06-05 17:49:21 -07:00
Karl Stolley 7820c5e15e widgets: Add classes to todo-widget div and span tags. 2024-06-05 17:49:21 -07:00
Karl Stolley 9b8e8bf0d3 widgets: Remove unnecessary styles. 2024-06-05 17:49:21 -07:00
Anders Kaseorg 72b6c97042 i18n: Allow get_language_name to return undefined again.
This can happen when the user’s configured language is less than 5%
translated.  Fixes an assertion failure introduced by commit
6a429603ad (#30261).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-05 12:25:15 -07:00
Aman Agrawal f58c586bee narrow: Rename to `message_view`.
This brings it in sync with other libraries like `message_list`
and `message_list_data`.
2024-06-05 12:03:59 -07:00
Aman Agrawal 48cdfd25f7 narrow: Rename `by_topic` to `narrow_by_topic`. 2024-06-05 12:03:59 -07:00
Aman Agrawal fecb9afa94 narrow: Rename `activate` to `show`.
This make the main call which displays message list sound similar
to `recent_view.show` and `inbox_ui.show`.
2024-06-05 12:03:59 -07:00
Aman Agrawal 69cd263312 narrow: Rename by_recipient to narrow_by_recipient.
This would make the call `message_view.narrow_by_recipient` sound
better than `message_view.by_recipient`.
2024-06-05 12:03:59 -07:00
Aman Agrawal 9374195418 narrow: Migrate uses of `by` function to `activate` function.
This is part of renaming effort of `narrow` to `message_view`.
2024-06-05 12:03:59 -07:00
Sayam Samal 552ab984a9 message_actions_popover: Hide extra separator in spectator view.
In the spectator view, we are only left with the last few options
belonging to the same group, and the separator is not needed.
2024-06-05 11:56:56 -07:00
Sayam Samal 09bf7d0f95 personal_menu_popover: Move the theme switcher to the settings group.
This moves the theme switcher from the randomly placed position to the
settings group since it is one of the user preference settings.
2024-06-05 11:16:55 -07:00
Prakhar Pratyush 22f3aebb33 compose: Show a one-time banner for jump to sent message conversation.
We immediately navigate the user to the conversation they just
sent a message to if they are not already in the appropriate
conversation view.

This commit adds a first-time banner to explain the same.

Fixes #29575.
2024-06-05 09:31:17 -07:00
Prakhar Pratyush e4cbca698d compose: Jump to conversation where message was sent.
Removes two 'narrow_to_recipient' banners which were
shown after sending a message to a different conversation.

Now, the sender is narrowed to the conversation where
message was sent.

Fixes #29186.
2024-06-05 09:30:34 -07:00
N-Shar-ma e959a392c9 compose: Make conversation arrow double as a go-to-conversation button.
The chevron arrow icon before the topic / dm user field now also acts as
a go to conversation button. Whenever the functionality is available,
the plain icon changes to look and behave like a button. The old go to
conversation button on the right of the field is removed.

Fixes: #28697.
2024-06-05 09:26:01 -07:00
Aman Agrawal b1a143e47c css: Remove unused `row-fluid` class. 2024-06-05 09:15:32 -07:00
Sayam Samal 94627196df popovers: Fix popovers force closing on topic visibility change.
When a topic is muted, it is removed from the view in some cases.
This can lead to the popover being force closed since the popover is
anchored to the reference element.

We add a delay to all the methods that contribute to hiding the topic,
on mute, to allow the relevant animations to be completed before the
topic is hidden from view and the popover is closed.
2024-06-04 15:56:44 -07:00
Sayam Samal 56be95a1c8 topic_popover: Remove redundant code from previous visibility options.
Commit 3f2ab44f94 removed the 'development' guard and cleaned the
older UI of the previous topic visibility options implementation,
but it missed the related JS logic.

This commit removes this redundant code, which was now present in
`web/src/topic_popover.js`.
2024-06-04 15:56:44 -07:00
Sayam Samal d93a3bb175 topic_sidebar_actions: Use sliding animation in the visibility switcher.
This commit updates the sidebar topic actions popover to use the new
sliding tab switcher for the topics visibility policy switcher.

This also includes changes such as hiding the popover only on
successful request completion, and adds error feedback by indicating
it via the sliding animation.
2024-06-04 15:56:44 -07:00
Sayam Samal 8877833603 visibility_policy_popover: Add feedback via switcher when request fails. 2024-06-04 15:56:44 -07:00
Sayam Samal a3d60c9f09 visibility_policy_popover: Hide popover only when request is successful.
This hides the visibility policy popover only when the request to
change the topic visibility policy is successful.

This allows a user to retry changing the policy in case of a request
failure, without having to open the popover again from the start.
2024-06-04 15:56:44 -07:00
Sayam Samal db4c5cdfc6 visibility_policy_popover: Use sliding animation in the switcher.
This commit updates the topic visibility popover to use the new
sliding tab switcher, which was introduced in personal menu >
theme switcher.
2024-06-04 15:56:44 -07:00
Kislay Verma 2c98263d4c left_sidebar: Rename "more topics" to "all topics".
This commit renames the occurrences of "more topics"
to "all topics" in comments and documentation.

Fixes #30014
2024-06-04 10:18:54 -07:00
Lauryn Menard c4f1d44dd7 i18n: Fix translated strings for delete profile field option.
Fixes how the confirmation modal title is generated for translation
for deleting an option or multiple options from a customer profile
field that's a list of options.
2024-06-04 09:54:35 -07:00
sujal shah d793cc0f54 tooltip: Render tooltips for `Not subscribed` and `All channels` tabs.
Render tooltips for both the tabs if the user is guest user.

Fixes #21869.
2024-06-04 09:49:50 -07:00
sujal shah 26ae173a2c left_sidebar: Change redirect link for Browse channels.
This commit changes the redirect links for "Browse channels" and
"Browse 1 more stream" to the Not subscribed(#streams/notsubscribed)
tab.
2024-06-04 09:49:50 -07:00
sujal shah 6c437eda77 stream_settings: Display No channel text when no channel present.
In the "not-subscribed" tab, when there are no channels to show, we
display a text message saying "No channels to show. View all channels"
along with a link that redirects the user to the "All channels" tab
(All channels(#channels/all)).

Updated the update_empty_left_panel_message function in
stream_settings_ui.js to modify and determine which banner to display
when no channels are available to show, modified that function to also
display the banner of the "not-subscribed" tab using a new classname
called 'not_subscribed_streams_tab_empty_text'.
2024-06-04 09:49:50 -07:00
sujal shah 619e234100 stream_settings: Change the if-else with switch statement. 2024-06-04 09:49:50 -07:00
sujal shah 6deb165ef6 stream_settings: Add Not subscribed tab to stream settings.
This commit adds a new tab to the stream settings overlay called
"Not subscribed" which lists all the streams the user is not
subscribed to. This tab is disabled if the user is a guest.

Introduced a new variable called "show_not_subscribed" to replicate
a similar model to how the subscribed tab is working. Currently,
there are only two tabs: "subscribed" and "all streams" so we can
use an if-else condition.

Refactored the 'update_stream_row_in_settings_tab' function inside
stream_ui_updates.js to include the case of a 'Not-subscribed' tab,
so that the tab is immediately updated in any add/remove subscription
event.

Fixed and added the node tests for these changes.
2024-06-04 09:49:50 -07:00
sujal shah d7936fe576 stream_overlay: Change the subscribed_only to show_subscribed.
This commit changes the variable and function name from
"subscribed_only" to "show_subscribed" and
"set_subscribed_only" to "set_show_subscribed"
so that in the next commit, when the "not subscribed" tab is added,
we can use a similar variable named "show_unsubscribed" and function
named "set_show_unsubscribed".
2024-06-04 09:49:50 -07:00
Aman Agrawal c6c8e831f8 portico_error_page: Apply `error` class to all the error pages.
This helps us control the CSS applied to the elements outside the
content scope of `portico_error_page.html`.
2024-06-04 09:41:34 -07:00
Aman Agrawal b2f0677c25 portico: Remove `container` and `row-fluild` bootstrap classes.
Fixes #28526

* Removed `container` and `row-fluid` class from error pages.
* Use a variable for footer height.
* Made header sticky instead of fixed allowing us to position
  page content without adding arbitrary padding or margin at top.
  Header is around 60px in height, so reduced that much top padding
  or margin.
2024-06-04 09:41:34 -07:00
Aman Agrawal b3a5b2b9aa 5xx: Fix header colors. 2024-06-04 09:41:34 -07:00
Aman Agrawal 27d2b89412 unsupported_browser: Remove not required extra bottom padding. 2024-06-04 09:41:34 -07:00
Varun Singh 6b42c18220 settings_preferences: Convert module to TypeScript. 2024-06-04 08:50:07 -07:00
Varun Singh b1943f560a settings_preferences: Refactor initialize function.
Before this commit the `user_settings_panel` object was declared as
a `const` and assigned an initial value of `{}`. Later, inside the
initialize function the object was mutated with three fields (`container`,
`settings_object`, `for_realm_settings`).

TypeScript does not allow this.Hence,we have removed the initial
value(`{}`) and changed the object to be a `let` var. This means,
when the `initialize` function is called `user_settings_panel` object is
undefined and hence `user_settings_panel.foo` will throw an exception.
To avoid this we have refactored the function by changing the way
`user_settings_panel` object is assigned value.
2024-06-04 08:50:07 -07:00
Varun Singh 796cc038c4 page_params: Add property to zod object. 2024-06-04 08:50:07 -07:00
Varun Singh be91b41236 settings_preferences: Don't store 'success_msg_html' if undefined.
Although both 'sticky' and 'success_msg_html' parameters
are passed optionally, the conditional took into account
only the former.
2024-06-04 08:50:07 -07:00
Lauryn Menard 6f7e288b1f billing-css: Remove out-of-date rule for input styling.
These were removed in commits ebc7cbaf3, 6cadf333f and e9a0c8a03.
2024-06-04 08:49:43 -07:00
evykassirer 9a3263ec5d messages: Rename convert_raw_message_to_message_with_booleans. 2024-06-03 15:42:41 -07:00
Anders Kaseorg 48d3601649 echo: Use newly created MessageWithBooleans in insert_local_message.
Commit 50f5cf9ad8 (#30227) changed
message_helper.process_new_message (called by
message_events.insert_new_messages) to return a newly created message
object rather than mutating the object it was passed.  So
echo.insert_local_message needs to use this new object, fixing a
regression where we’d fail to replace a locally echoed message when
the server-rendered message came in.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-03 12:25:08 -07:00
afeefuddin 394e8fc856 navbar_alerts: Convert module to TypeScript. 2024-06-03 12:19:58 -07:00
afeefuddin 7025d409c3 navbar_alerts: Use UNIX timestamp consistently. 2024-06-03 12:19:58 -07:00
afeefuddin b3809a33b5 state_data: Update realm_schema.
Add demo_organization_scheduled_deletion_date and realm_date_created
to realm_schema.
2024-06-03 12:19:58 -07:00
Karl Stolley 0f6072d2d6 left_sidebar: Condense nav rows to standard size. 2024-06-03 10:32:29 -07:00
Karl Stolley 5dafaf9deb left_sidebar: Expand topic rows to prominent size. 2024-06-03 10:32:29 -07:00
Vector73 88df01bee5 web: Replace `realm_uri` with `realm_url` in frontend files.
Replaces `realm_uri` with `realm_url` in some frontend files and a js test.
2024-06-03 10:07:10 -07:00
Prakhar Pratyush 32391c3d06 ui_init: Don't store onboarding_steps state_data as current_user_param.
Earlier, onboarding_steps field of state_data was stored as
current_user_params.

Now, we store it separately in a data structure initialized in
onboarding_steps.ts

Reason: All the other state_data fields stored in current_user_params
are attributes of UserProfile. So, it makes sense to store it
separately.

Fixes part of #30043.
2024-06-03 08:53:28 -07:00
Prakhar Pratyush 915503df10 onboarding_steps: Rename the function 'update_notice_to_display'.
This commit renames the function 'update_notice_to_display' to
'update_onboarding_steps_to_display' as it can be used for
onboarding step of any type.

Currently, we have only one type i.e. 'one_time_notice'.
2024-06-03 08:53:28 -07:00
Aman Agrawal 6750b02437 recent_view: Reduce constant flashing of recent view on initial load.
We completely rerender recent view when we receive a new message,
which is not ideal since it is flashes recent view frequently
during the initial fetch.

Since later parts of initial fetch which trigger the flash, only
load old messages, they cannot change the latest message of
rendered rows in recent view. That means we can just inplace
rerender the rendered rows which got updated and don't have
to worry about order of rows being changed.
2024-06-02 21:52:45 -07:00
afeefuddin 2fb1199af5 compose_call_ui: Pass $target_textarea consistently to insert call link.
Pass $<HTMLTextAreaElement>("textarea#compose-textarea") instead of
undefined when inserting the call link in compose-textarea.
2024-06-02 21:49:49 -07:00
afeefuddin 7b5ccf0c98 compose_call_ui: Rename target_textarea to $target_textarea. 2024-06-02 21:49:49 -07:00
afeefuddin 9cf9cec43a compose_call_ui: Convert module to TypeScript. 2024-06-02 21:49:49 -07:00
afeefuddin 49c4e5ec44 ui_report: Fix inaccurate annotations for generic_embed_error parameter.
The remove_after parameter is optional; when not provided, the alert is
not removed.
2024-06-02 21:49:49 -07:00
afeefuddin ab3bb767af state_data: Add has_zoom_token to current_user_schema. 2024-06-02 21:49:49 -07:00