Commit Graph

2544 Commits

Author SHA1 Message Date
Aman Agrawal 18a165fa97 personal_menu: Indicate no status text in italics.
If user has only set emoji as status, we show a placeholder
text to indicate no status text has been set.

Fixes #27362
2023-10-25 11:09:08 -07:00
Aman Agrawal 75aa91a39f user_card_popover: Fix clear link not working.
Incorrectly migrated in 87c87ed41f.
2023-10-25 11:09:08 -07:00
Karl Stolley 3385d5862b left_sidebar: Include right-hand padding on topic, nav labels. 2023-10-25 09:53:05 -07:00
Aman Agrawal af653572a1 recent_view_ui: Return if the list is empty.
Since we now have empty text message as a table row,
`$topic_rows.length === 0` no longer works to test if the
table is empty.
2023-10-25 09:52:23 -07:00
Karl Stolley 4fac53e35c left_sidebar: Restore and note positioning context for unread dots. 2023-10-25 08:17:11 -07:00
Tim Abbott db05d7ef0c css: Revert sidebar-menu-icon specificity change.
3ac0c3c401 incorrecly removed
specificity declarations needed to prevent that CSS from applying to
the right sidebar, which hasn't been properly prepared for this
change.
2023-10-24 16:23:30 -07:00
Aman Agrawal 464aff1f21 make_my_home_view: Show view name in bold. 2023-10-24 16:16:56 -07:00
Aman Agrawal 2f33fad5df left_sidebar: Add popover to make different views default.
Fixes #27324
2023-10-24 16:16:56 -07:00
Aman Agrawal 7f124500fa inbox_popover: Add option to make it the default view. 2023-10-24 16:16:56 -07:00
Aman Agrawal ce804fc37a navbar: Remove userlist unread count. 2023-10-24 13:57:27 -07:00
Aman Agrawal 6f6a53c909 help-menu: Center align keyboard shortcut hint. 2023-10-24 13:06:11 -07:00
Karl Stolley 1a18faaf02 left_sidebar: Increase size of condensed icons. 2023-10-24 12:29:45 -07:00
Karl Stolley 3ac0c3c401 left_sidebar: Correctly align vdots across all rows.
This brings modern alignment methods to all vdots instances,
including in views, streams, and topic rows.

This also aligns the vdots in the condensed view row with
all the others in the left sidebar.
2023-10-24 12:29:45 -07:00
Karl Stolley 21908b7a9e left_sidebar: Vertically align all vdots. 2023-10-24 12:29:45 -07:00
Karl Stolley 528f494d41 left_sidebar: Establish filter rows as grids. 2023-10-24 12:29:45 -07:00
Karl Stolley 56eaf9b153 left_sidebar: Place redesign icons in expanded views. 2023-10-24 12:29:45 -07:00
Animesh Biswas 7da9ca771f
settings: Change bot-type question to help center link.
In the "Add a new bot" modal, there was '?' next to the bot type field
that was confusingly showing a tooltip describing incoming webhooks,
regardless of the bot type have been selected.

The tooltip is removed from the '?' and it is linked to the help center
article explaining all the different bot types.

Fixes #27047.
2023-10-24 10:08:13 -07:00
David Rosa 56ccaa571e settings: Update topic notifications help center links.
- Updates the `?` link on "Topic notifications" and "Topic settings"
  to go to the new /help/topic-notifications page.
- Adds links to /help/follow-a-topic and /help/mute-a-topic.

Fixes #27297.
2023-10-23 18:37:41 -07:00
Sayam Samal 92b3fcbad2 left_sidebar: Add "This is your home view." to the home view's tooltip.
Fixes: #27325.
2023-10-23 17:37:56 -07:00
Anders Kaseorg 6880d6c299 keydown_util: Use JQuery.KeyboardEventBase type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-23 16:47:32 -07:00
Anders Kaseorg a9136f13ca poll_widgets: Fix types used for jQuery .val().
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-23 16:47:32 -07:00
Aman Agrawal 07dcf66c72 navbar: Remove stale focus-dropdown code.
We don't need this since we migrated the dropdown to tippy which
handles the navigation via popover_items_handle_keyboard.
2023-10-23 14:15:13 -07:00
Aman Agrawal 75c874fef6 personal_menu: Fix focus outline of clear status icon. 2023-10-23 14:15:13 -07:00
Aman Agrawal 87c87ed41f personal_menu: Rename clear_status class. 2023-10-23 14:15:13 -07:00
Aman Agrawal 79acefae4c css: Remove unused hotkey-hint style.
The one we use in tooltips is defined in tooltips.css.
2023-10-23 14:15:13 -07:00
Aman Agrawal c5564668c5 help_menu: Use new style to show hotkey.
This is according to Vlad's design in figma which differs from the
style we have in `tooltip-hotkey-hint`.

I used font-weight: 500 instead of 400 as it looked nicer and since
Vlad used Source Sans Pro as font-family which we don't have.
2023-10-23 14:15:13 -07:00
Aman Agrawal 3d870a1f7d popovers: Use fixed height for navbar-dropdown items.
This helps us add elements like hotkey hint which can take more
space that available for text. There are no visual changes.

Removed some duplicate properties too.
2023-10-23 14:15:13 -07:00
Aman Agrawal 8f716cd64a help_menu: Extract help items from gear menu into a separate popover.
Fixes #27202
2023-10-23 14:15:13 -07:00
Aman Agrawal 2b9dc1f398 hotkey: Avoid inconsistent hotkey handling.
Pressing `r` to open compose box, or search via hotkey didn't work
for gear menu while it worked for other popovers. So, this is an
attempt to unify that behavior so that if the hotkeys are not
handles the navbar_menus popovers, then can be handled elsewhere.
2023-10-23 14:15:13 -07:00
Aman Agrawal a210006ecd popovers: Hide when starting certain actions.
These are actions which can be called when a popover is open and
it is better to close the popover when these actions are
initiated.
2023-10-23 14:15:13 -07:00
Aman Agrawal c9891b4121 hotkey: Make g + left / right arrow work to open navbar dropdowns.
While gear menu is open, press right arrow to go to personal menu
and left arrow to open gear menu again.
2023-10-23 14:15:13 -07:00
Junyao Chen 23d34ca457 ts: Migrate `poll_widget.js` to TypeScript.
Added type annotations.
2023-10-23 09:33:47 -07:00
Junyao Chen 6840715222 poll_data: Define outbound data types for each message type.
This commit introduces specific outbound data types for each
message type for reusability. For example, `poll_widget.ts` reuses
these types.
2023-10-23 09:33:47 -07:00
Junyao Chen 721fbb1bed keydown_util: Extend event type for `is_enter_event` function.
To accommodate both keydown and keyup events, this commit updates
the function signature to accept both `JQuery.KeyDownEvent` and
`JQuery.KeyUpEvent` types. An example of using keyup event is in
`poll_widget.ts`.
2023-10-23 09:33:47 -07:00
Junyao Chen 789d052116 poll_widget: Use `.prop()` but not `.attr()` for button disabled state.
This commit sets the "disabled" property of buttons using `.prop()`
method instead of `.attr()`. The `.prop()` method satisfies type
check requirements for boolean properties like "disabled", while
`.attr()` method requires string type property.
2023-10-23 09:33:47 -07:00
N-Shar-ma 82f105aada popovers: Fix bug where modals persisted on hashchange.
Modals like those for Read receipts, Schedule message, Message edit
history, User profile, etc would not close when the hash changed.

Now we close any active modal whenever the hash changes; we add a new
function in `modals.ts` to do this, and call it from `hashchange.js`.
2023-10-22 14:56:06 -07:00
Prakhar Pratyush 3f2ab44f94 follow_topics: Remove the 'development' guard.
This commit removes the 'development' guard and makes
the UI changes related to the 'Follow Topics' project visible
outside the development environment.

Cleans up the older UI elements related to mute and unmute topics.
2023-10-22 14:24:22 -07:00
Aman Agrawal 5dba15160d css: Fix dark theme hover color for copy invite link.
Extracted colors into variables and used them inside the id to
solve the specificity issue.
2023-10-22 14:21:16 -07:00
Aman Agrawal 18475a10d7 copy_invite_link: Append tooltip to body.
This helps us get the desired `placement: top` for the tooltip
which is also where to copied confirmation tooltip is displayed.
2023-10-22 14:21:16 -07:00
tamara 96e3ad9311 invite: Add copied confirmation tooltip on invite link.
Fixes #26872
2023-10-22 14:21:16 -07:00
Aman Agrawal 09ab0f3c18 bootstrap: Remove bootstrap-dropdown library.
Gear menu was the last piece of dropdowns which used this. Since
we migrated it to tippy, we don't need this library.
2023-10-21 10:54:32 -07:00
Aman Agrawal e4ae826a47 inbox: Improve look of empty inbox view. 2023-10-20 17:13:33 -07:00
Aman Agrawal af271be1bd navbar-dropdowns: Use specific classes for everything.
Replaced element selectors with specific selectors, those that
remain are intentionally left.

This is to avoid inner-most selectors as element selectors.
The reason being is that browsers evaluate selectors from right
to left, meaning that every time a selector ends in an element,
the browser has to work that much harder whenever and wherever
on a page it encounters the element.
2023-10-20 12:36:39 -07:00
Aman Agrawal 2efc2a5eb5 gear_menu_dropdown: Use better class name for theme buttons. 2023-10-20 12:36:39 -07:00
Aman Agrawal 51797809c4 header-button: Add background effects to different states. 2023-10-20 12:36:39 -07:00
Aman Agrawal f9e7b814d6 navbar-dropdown-menu: Use focus-visible instead of focus. 2023-10-20 12:36:39 -07:00
Aman Agrawal 961693c354 gear_menu: Extract common hidden-for-spectators.
This avoids double borders in spectator view.
2023-10-20 12:36:39 -07:00
Aman Agrawal 05a640300a gear_menu_popover: Remove presentation role.
We want to remove their semantics from accessibility tree.
2023-10-20 12:36:39 -07:00
Aman Agrawal 64ff483e27 gear_menu_popover: Use semantically correct HTML structure.
Using `ul > li > ul > li` here since that's the correct structure.
2023-10-20 12:36:39 -07:00
Aman Agrawal 1e3e70576b gear_menu: Extract the new gear and personal menu style as a theme.
This also fixes some misalignment happening at some widths for gear
menu. Like at XL widths for spectators.
2023-10-20 12:36:39 -07:00
Aman Agrawal 67ba59f6e8 dropdown_list: Remove not useful role=menuitem.
Since the parent `ul` has doesn't have role=menu and `ul/li` elements
don't need a be specified a role anyway. We don't need it.
2023-10-20 12:36:39 -07:00
Aman Agrawal ffcf792cc9 gear_menu: Use navigate-link-on-enter class instead of role=menuitem.
The class name make more sense give what it does.
2023-10-20 12:36:39 -07:00
Aman Agrawal 246c1d7b4e hotkey: Call click() on elements with menuitem role in popovers. 2023-10-20 12:36:39 -07:00
Aman Agrawal 7932d49956 gear_menu_popover: Allow user to focus on these items.
These don't have an href attribute to use tabindex to
enable focus.
2023-10-20 12:36:39 -07:00
Aman Agrawal bc3d48616e gear_menu: Migrate to use tippy. 2023-10-20 12:36:39 -07:00
Aman Agrawal 1e93540d3b navbar: Use new icon for user list toggle.
This needs to be done along with gear menu for navbar to look nice.
2023-10-20 12:36:39 -07:00
Aman Agrawal a7f328d593 gear_menu_popover: Remove small-font-size class.
We can apply the required CSS to directly the org types.
2023-10-20 12:36:39 -07:00
Aman Agrawal 5cbf8ad91a gear_menu_popover: Format "About Zulip" item like other items. 2023-10-20 12:36:39 -07:00
Aman Agrawal d75df10729 gear_menu_popover: Move *-theme class to the li element.
It will help us hide the whole `li` element instead of just
`a` tag for spectators.
2023-10-20 12:36:39 -07:00
Aman Agrawal 897c19d17d css: Add box-shadow to navbar dropdown menu as per figma design. 2023-10-20 12:36:39 -07:00
Aman Agrawal 41c06e2989 CSS: Extract common CSS for .navbar-dropdown-menu. 2023-10-20 12:36:39 -07:00
Aman Agrawal e95b105566 gear_menu_popver: Use link-item class for li elements. 2023-10-20 12:36:39 -07:00
Aman Agrawal cac411abc9 gear_menu_popover: Use better class and id name for gear-menu. 2023-10-20 12:36:39 -07:00
Aman Agrawal 12ea256e47 gear_menu: Extract dropdown part of gear menu. 2023-10-20 12:36:39 -07:00
Aman Agrawal 063669a921 gear_menu: Use new icons. 2023-10-20 12:36:39 -07:00
Sayam Samal 24d74f68ee compose: Show pronouns in compose typeaheads.
This commit adds the pronouns custom profile field to the typeaheads in
the composebox along with the necessary node tests.

Details of the implementation:
- Added logic to display pronouns in ( ) next to the user's name when
  the user has a non-empty pronoun-type custom profile field.
- If multiple pronoun fields exist in the organization, the
  implementation selects the one earlier in the list of custom profile
  fields.
- No pronouns are displayed if the selected pronoun field is empty.

Fixes #26924.
2023-10-20 12:30:21 -07:00
Aman Agrawal 61bf72d30e empty_feed_notice: Style empty message feed similar to other views. 2023-10-20 12:29:45 -07:00
Karl Stolley 8e7265fbb4 left_sidebar: Correctly handle focus on views controls. 2023-10-20 12:27:19 -07:00
Karl Stolley c3062e80bb left_sidebar: Place redesigned icons in views popover. 2023-10-20 12:27:19 -07:00
Karl Stolley 2c8a688983 left_sidebar: Place redesign icons in condensed views. 2023-10-20 12:27:19 -07:00
Karl Stolley 4a8f2773a8 icons: Add remaining views icons. 2023-10-20 12:27:19 -07:00
Karl Stolley 9535b5dbe0 left_sidebar: Add informational tooltips to condensed icons.
Though there is currently no keyboard shortcut to advertise with
these icons, both the star and the @ icons now have informational
tooltips, to match other icons in the condensed view.

Fixes: #25902
2023-10-20 12:27:19 -07:00
Karl Stolley 24d300f3fd left_sidebar: Tune icon sizes for condensed presentation.
This slightly increases the size of the clock for recent
conversations, and descreases the size of the left-aligned icon
for all messages.

Icon sizes in the expanded view are left untouched.
2023-10-20 12:27:19 -07:00
Karl Stolley 41635566fd left_sidebar: Improve logic for showing Scheduled messages. 2023-10-20 12:27:19 -07:00
Karl Stolley 46ce408a5f left_sidebar: Add a 3-dot menu to condensed views.
Co-Authored-By: Hardik Dharmani <Ddharmani99@gmail.com>
2023-10-20 12:27:19 -07:00
Karl Stolley 4dd1bf7e32 left_sidebar: Expand and condense the VIEWS navigation. 2023-10-20 12:27:19 -07:00
Karl Stolley 3e78a792c1 left_sidebar: Move initialize() to end of file. 2023-10-20 12:27:19 -07:00
Karl Stolley 458d6411b4 left_sidebar: Handle condensed icon unread states. 2023-10-20 12:27:19 -07:00
Karl Stolley 9f5ca4f6f7 left_sidebar: Set backgrounds on condensed icon visible and hover. 2023-10-20 12:27:19 -07:00
Karl Stolley 7774abfe04 left_sidebar: Structure Views header with standalone icons.
This also introduces a combo grid/flex layout, which will also be
applied to the DM and Streams headings.

Because there are now multiple classes referenced from the
Puppeteer tests, those selectors now include the expanded
navigation area's parent ID selector.
2023-10-20 12:27:19 -07:00
Aman Agrawal 66d70eb8bf recent_view: Use more precise calculation for checking if row visible. 2023-10-20 10:10:19 -07:00
Aman Agrawal a1ba142047 resize: Use correct id for recent view filter buttons.
This seems to have left out in the renaming of recent view from
recent table -> recent conversations -> recent view.

`recent_view_filters_height` being `0` resulted in table having
more height than it should have, so when focus was set on a
hidden row, it somehow scrolled the whole table.
2023-10-20 10:10:19 -07:00
Aman Agrawal 454e22068b views_util: Remove duplicate call to resize filters height.
Added by mistake.
2023-10-20 10:10:19 -07:00
Prakhar Pratyush e7275d7e64 compose_banner: Fix the incorrect translation tags.
This commit fixes the translation tags in
'automatic_new_visibility_policy_banner.hbs'.

The incorrect tags were introduced in 7c46085.
2023-10-20 10:07:38 -07:00
Aman Agrawal b6fb77525f hello: Adjust padding in client logos to be similar to original design.
Since Vlad used zoom in the original design and we used transform
since zoom was not supported by all browsers, some details got
lost in transition.
2023-10-20 10:04:46 -07:00
Aman Agrawal 41f26aebd9 hello: Make cta icons have similar spacing to original design.
There were lost when we converted inline svgs to files.
2023-10-20 10:04:46 -07:00
Prakhar Pratyush d1f82c47fd compose_banner: Show banner when automatically follow or unmute topic.
When we send a message and that causes a topic to be automatically
followed or unmuted due to the automatic visibility policy settings,
we tell the user via a post-send-message compose banner.

The "notify_unmute" banner is not shown when the topic has already
been unmuted or followed due to these policies.

Fixes part of #26900.
2023-10-19 10:13:04 -07:00
Hardik Dharmani 31b3f8762f gear_menu: Add new SVGs.
These icons are used in the gear menu.
Added thirdparty after talking with Vlad.
2023-10-18 22:02:38 -07:00
Aman Agrawal b542984869 personal_menu: Fix semantics of personal menu HTML structure.
Only valid tag inside `ul` is `li`. So, we use `ul > li > ul > li`
structure here.
2023-10-18 22:02:38 -07:00
Aman Agrawal 54a5aec013 popover_menus: Directly get visible anchor tags.
Instead of checking for anchor tags within visible `li` elements,
it is just better to check directly for visible anchor tags.
2023-10-18 22:02:38 -07:00
Aman Agrawal 56a3f3ff3e personal_menu: Rename popover-menu to dropdown-menu-list-section.
There were no CSS changes related to `popver-menu` class.
2023-10-18 22:02:38 -07:00
Aman Agrawal 06f14a8caf personal_menu: Use a more specific name for `.inner` class. 2023-10-18 22:02:38 -07:00
Aman Agrawal b2dd2d6d29 personal-menu: Rename dropdown-menu to navbar-dropdown-menu.
This will contain common css to be used between navbar dropdowns
gear menu and personal menu.
2023-10-18 22:02:38 -07:00
Aman Agrawal 7d1a6c7388 gear_menu: Extract context data to popover_menus_data. 2023-10-18 22:02:38 -07:00
Aman Agrawal a5e60f47b6 gear_menu: Move from TS to normal JS module.
Need to convert gear menu to popover.
2023-10-18 22:02:38 -07:00
Aman Agrawal f91236f917 gear_menu: Extract version_display_string into a util library.
This will keep changes to a minimum when we migrate gear menu
to use tippy module.
2023-10-18 22:02:38 -07:00
Anders Kaseorg 8d42fa3960 stream_edit: Fix set_stream_property usage.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-18 16:26:36 -07:00
Sahil Batra 08e5e29054 user_profile: Show subscribe widget for others to non-admins.
We now show subscribe widget in user profile modal for others
to non-admins if user is allowed to subscribe others to streams.
2023-10-18 15:28:46 -07:00
Sahil Batra 180ed2e50f user_profile: Show streams to subscribe for user's own profile.
We did not show the streams to subscribe in dropdown in user
profile modal when user is not allowed to subscribe others
even in the user's own profile modal which is not correct.

This commit fixes it to show the streams in dropdown for
user's own profile irrespective of whether user is allowed
to subscribe others or not.
2023-10-18 15:28:46 -07:00
Sahil Batra 8c45e1dfed user_profile: Remove unnecessary filter call.
There is no need to filter down the streams returned
by get_streams_for_user to the streams for which
stream_data.can_subscribe_others is true, as
get_streams_for_user(user_id).can_subscribe only includes
the streams for which stream_data.can_subscribe_others
is true.

This commit removes the unnecessary filter call.
2023-10-18 15:28:46 -07:00
Karl Stolley 9458497ad2 settings: Reference 'Call provider' in settings. 2023-10-18 14:04:00 -07:00
Karl Stolley 383466eaff compose_box: Change 'audio' references to 'voice'. 2023-10-18 14:04:00 -07:00
Sahil Batra 760d793d6b settings: Rename "default" views to "home" views in settings and docs.
This commit renames "default" views to "home" views in the setting
labels, keyboard shortcuts list, help documentation and its urls.

This commit does not do changes in variable and class names, setting
field in database, API docs and changelog.

Fixes part of #27251.
2023-10-18 11:25:20 -07:00
Prakhar Pratyush 5e3b8f5393 css: Improve the css of icon-based tab picker used in topic popover.
Remove the solid outline around hovered tabs.

Minor tweaks in height and padding for tabs.
2023-10-17 16:21:06 -07:00
Prakhar Pratyush 2d979fbf0e css: Use CSS variables for the color values of tab-picker.
Use CSS variables for the color values of left sidebar
topic popover, tab-picker widget to change the visibility
policy.
2023-10-17 16:21:06 -07:00
Prakhar Pratyush 9b3306acf2 icon: Update the icon for 'Follow'. 2023-10-17 16:21:06 -07:00
Tim Abbott 401c8bbb21 user topics: Delay rerendering all messages.
Rerendering of "all messages" is slow, and by definition, not visible
to the user, so make sure the browser gets an opportunity to rerender
the content that is visible before starting that expensive
computation.
2023-10-17 16:19:53 -07:00
Aman Agrawal 0c649ff2aa message_fetch: Avoid non-contiguous conversations in recent view.
Fixes #27208. Fixes #27207.

We only process messages from all_messages_data and special data
fetched for recent view only.

This avoids us having a conversation present in recent view which is
not contiguous due to loading a random old conversation.

Also, to ensure displayed conversations are contiguous while we are
loading data, we don't show message list data until we have found the
newest message in the list.
2023-10-17 13:03:49 -07:00
Tim Abbott 2ac443dd2f Partially revert "compose: Ensure cursor is scrolled into view after content is inserted."
This reverts the typeahead library part of commit
0cdb54cf65.

The extra refocusing was breaking the `>` typeahead acceptance logic.

Further, generally typeahead acceptance won't introduce block syntax
or newlines, so I'm not sure whether the original motivation for doing
this in other code paths applies to typeahead.
2023-10-17 12:26:33 -07:00
Aman Agrawal 0dd8e40e84 inbox: Use new empty-list-message style and center the text. 2023-10-17 11:55:41 -07:00
Aman Agrawal 4db331ed21 empty_list_widget: Use class instead of id.
We were using id before to increase their specificity, but
since it is possible for multiple empty_list_widget_for_list/table
to be in DOM at the same time, we should use a class here. Used
`!important` here so that we can force our padding where these
classes are used.
2023-10-17 11:55:41 -07:00
Aman Agrawal 62c78d5ad5 inbox: Remove side borders. 2023-10-17 10:34:48 -07:00
Aman Agrawal 742b985de0 compose_actions: Warn callers if msg_type is not defined. 2023-10-17 10:34:48 -07:00
Aman Agrawal c54e84cb9b compose_reply: Fix msg_type being not defined triggering errors.
When focused on filters, `r` keypress to open compose had
`msg_type` set to undefined which shouldn't be the case ever as
we always expect msg_type to be defined when compose is open.
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
Aman Agrawal c152cb55a5 inbox: Fix empty text visible with visible unread rows.
If the last returned value of `insert_stream` was false, `has_topics_post_filter`
was false and hence this empty text was visible.

We only need one of the inserted streams to visible to hide the empty text.

Reproducer:

* Mark all messages as read.
* mark one message in denmark as unread.
* mute #support (any stream that would come later to denmak alphabetically)
* sent a message support from a different user while inbox is open.
2023-10-17 10:29:45 -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 0c146d21e3 overlays: Rename "modal-bg" class to "overlay-container".
This commit renames "modal-bg" class to "overlay-container"
since we use this class only for overlays and this seems a
better name.
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
Anders Kaseorg 858f8f1e48 settings_profile_fields: Remove wrong $ prefix for non-jQuery variable.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-16 17:03:53 -07:00
Anders Kaseorg 8a837320a9 e2e-tests: Remove now-unnecessary StackFrame cast.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-16 15:00:55 -07:00
Anders Kaseorg ccb492a75a e2e-tests: Fix stack traces from Puppeteer page errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-16 15:00:55 -07:00
Anders Kaseorg 8ebcaddfd9 Revert "recent_view_ui: Avoid non-contiguous rows in recent view."
This reverts commit 2348d6f1f9.
2023-10-16 13:57:02 -07:00
Sahil Batra effc9c366a user_profile: Show tooltip when removing last user from private stream.
We now show tooltip on "Unsubscribe" button in user profile modal
if the stream is private and the user is last user in the stream
mentioning that user should use stream settings to unsubscribe.
2023-10-16 13:37:23 -07:00
Akarsh Jain 545c4caa05 stream: Show warning when admin removes last user from a private stream.
This commit adds a confirmation modal that appears when an administrator
attempts to unsubscribe the only user currently subscribed to a private
stream. The modal includes a warning message explaining that the private
stream will be automatically archived after unsubscription.

Fixes #24025.
2023-10-16 13:37:23 -07:00
Sahil Batra 052299f056 streams: Update modals shown on removing user from private stream.
This commit adds "?" to the heading of modal shown when unsubscribing
user from private stream and adds a link to help documentation for
archiving streams. This commit also refactors the code such that we
can use the same template to show modal when unsubscribing others
from private streams.
2023-10-16 13:37:23 -07:00
Aman Agrawal 03ea1ce528 recent_view_ui: Fix quick multiple page downs resulting in errors.
Fixes #27209

Since post_scroll__pre_render_callback is called to set
the correct focus, we don't need to set focus again here.

This was happening because `set_table_focus` relies on rows
being already rendered in the DOM which is not the case with
page down since rows are still being rendered by list widget
as we scroll down.

This code was the source of the error:
```
    if (new_scrollTop >= table_height) {
        row_focus = topics_widget.get_current_list().length - 1;
    }
```

row_focus set here is not rendered yet, hence making set focus
on search box.

But, since we set focus on table if user is scrolling, this
sets focus back on the table.
2023-10-16 13:25:16 -07:00
Aman Agrawal 2348d6f1f9 recent_view_ui: Avoid non-contiguous rows in recent view.
Fixes #27207

The recent view's data sources are mainly all_messages_data,
but if you click into a stream via the left sidebar that has
no recent conversation history, one can reliably reproduce that
some of those conversations will end up being displayed in the
recent view, despite not being temporally contiguous with what
it has data for.

To avoid it, we only process messages fetched for all message data.
2023-10-16 13:25:15 -07:00
Aman Agrawal 2d4d4b86eb left_sidebar: Fix click handler selector for all private messages.
The previous logic did not correctly handle clicks that were in the
tiny spaces inside the link tag but outside the icon element.

Fixes #25647.
2023-10-16 13:13:19 -07:00
Bhavesh Vasnani eb81a4f21f left_sidebar: Make toggle DM section keyboard accessible. 2023-10-16 13:11:42 -07:00
Anders Kaseorg b86b91f96d global: Remove type stub for Bootstrap modal.
Commit 747b62d050 (#27124) removed the
code.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-16 13:07:47 -07:00
Anders Kaseorg d8dcec6853 user_deactivation_ui: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-16 13:06:54 -07:00
Anders Kaseorg 4d6a36ecec people: Sharpen User type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-16 13:06:54 -07:00
Anders Kaseorg 94934f49f9 webpack_public_path: Replace with webpack 5 publicPath: "auto" setting.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-16 10:36:27 -07:00
Aman Agrawal b605042312 compose_setup: Hide compose formatting popover clicking an option.
Fixes #27015
2023-10-15 19:51:04 -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
Prakhar Pratyush e01ffba143 settings: Add default typing indicator user settings.
This commit adds two settings to 'SETTINGS / DEFAULT USER SETTINGS':
* Let recipients see when a user is typing direct messages
* Let recipients see when a user is typing stream messages
2023-10-13 15:30:49 -07:00
Sahil Batra 0c357f990d stream_settings: Fix tooltip behavior on subscription button.
The tooltip was shown on the "Unsubscribe" button even after
closing the modal without unsubscribing when trying to
unsubscribe from a private stream. This commit fixes it by
setting the trigger to "mouseenter".

We fixed similar issue in #25381.
2023-10-13 11:08:54 -07:00
m-e-l-u-h-a-n 69b2c1143a stream settings: Fix tooltip for sub_unsub_button on right pane.
There was no tooltip shown for toggle subscription button
when it was disabled.

A tooltip with appropriate message is added to this button
when it is disabled in case of private streams and user
cannot use it to toggle subscription.
2023-10-13 11:08:54 -07:00
m-e-l-u-h-a-n 3d1b846d86 streams: Change color of the checkmark to blue.
This is a UI experiment which change the regular and on-hover
colors of the green checkmark in All Streams UI to match the send
button of the compose box.

Co-authored-by: Raghav Luthra <rluthra2002@gmail.com>
2023-10-13 11:08:54 -07:00
m-e-l-u-h-a-n 2585fe5c41 streams: Improve subscription toggle buttons on stream rows.
This commit changes the UI for subscribing to streams on stream rows
to be more like the mobile version (zulip/zulip-mobile#5333).
The current design made it hard to discover how to subscribe to
streams via left panel and is not very clear on the fact that
its not possible to subscribe to private streams.

To address this the following changes have been made:
- For unsubscribed streams, the on hover-checkmark is replaced by
a "+" which is always displayed and has on-hover highlighting.

- For unsubscribed private streams, the "+" is disabled.

- Tooltips with appropriate messages are added on the "+" sign for the
above 2 cases.

- A tooltip has also been for the on-hover checkmark for subscribed
streams.

Fixes: #22217.
Co-authored-by: Raghav Luthra <rluthra2002@gmail.com>
2023-10-13 11:08:54 -07:00
Ganesh Pawar 4491756845 stream_edit: Disable add button when input field is empty.
Fixes #19507.
2023-10-12 18:24:05 -07:00
Tim Abbott 2ce3f52030 gear_menu: Remove logout button, moved to new personal menu. 2023-10-12 15:31:01 -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
Hardik Dharmani a4680f3681 personal_menu: Add new SVGs.
The new SVGs added in this commit will be used in next commits.

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
David Rosa 69b8dbeb28 help: Document Inbox view.
- Adds desktop/web instructions.
- Adds #inbox relative link for logged-in users.
- Moves Inbox up in the left sidebar just under "Reading strategies".
- Moves Inbox article content to Markdown include.
- Adds "From the Inbox view" section to "Finding a topic to read",
  "Getting started with Zulip", and "Reading strategies".
- Documents Inbox as a new option for the default web app view.
- Removes unused Markdown link.
- Tweaks subheading to better match help center patterns.
- Add Inbox option in "Configure default settings for new users".
- Adds new tabbed section and instructions for marking messages as
  read and reading topics via the Inbox view.

Fixes #26903.

Co-authored-by: Alya Abbott <alya@zulip.com>
2023-10-12 12:58:20 -07:00
lapaz 417b29638c messages: Add support to allow bot-owners to delete messages.
This commit adds support to allow bot-owners to delete messages
sent by their bots if they are allowed to delete their own messages
as per "delete_own_message_policy" setting and the message delete
time limit has not passed.
2023-10-12 12:13:39 -07:00
Sahil Batra 59d025c570 people: Add "(guest)" for muted users as well.
This commit adds code to show "(guest)" for muted users
as well if the muted user is guest and the realm setting
is enabled.
2023-10-12 12:06:10 -07:00
Sahil Batra 8196e09013 message_list_view: Italicize "(guest)" in recipient row.
This commit updates code to italicize "(guest)" shown for guest
users in header row. We do not italicize "(guest)" in tooltip
shown on hovering over the header row for now.

We pass the user objects to template file instead of passing
the complete string to it to handle this correctly.
2023-10-12 12:06:10 -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
Sahil Batra 7d7698930a compose_ui: Add "(guest)" to user names in compose box placeholder.
This commit adds "(guest)" indicator to guest user names in
compose box placeholder if enable_guest_user_indicator setting
is enabled in the organization.
2023-10-12 12:06:10 -07:00
Sahil Batra 127378f0ec users: Add "(guest)" to user name at various places.
This commit adds code to get_display_full_name function
to add "(guest)" indicator to guest user names if
enable_guest_user_indicator setting is enabled in the
organization.

The get_display_full_name function is used in many parts
of the code and thus this commit adds the indicator in
following places -
- Message recipient row for DMs including the messages
shown in scheduled messages overlay.
- DMs list in left sidebar and its tooltips.
- DMs info recent conversations view.
- "other senders" tooltip in recent conversations view.
- Compose button text.
- User names shown on reaction element and its tooltip.
- Desktop notifications and the browser title.
- Results for a poll.
2023-10-12 12:06:10 -07:00
Sahil Batra 268aab3cda narrow: Add "(guest)" to user names in narrow title.
This commit adds "(guest)" to user names in the narrow title when
enable_guest_user_indicator setting is enabled in the organization.
The indicator, based on the setting, is added for DM narrows and
for "sender:" narrows.
2023-10-12 12:06:10 -07:00
Sahil Batra 70c9d0765f rendered_markdown: Add "(guest)" to user name in mention pill.
This commit adds "(guest)" indicator to user names of guests
in mention pill if the enable_guest_user_indicator setting is
enabled for the organization. Note that the actual message
content does not include the indicator.
2023-10-12 12:06:10 -07:00
Sahil Batra 49a047c27f users: Add "(guest)" to names for guest users.
This commit adds code to add "(guest)" to user names of guest
users in the following places -
- right sidebar
- user pills, including the pills in search suggestion typehaead
- typeaheads for user
- sender names in message feed
- user profile popover and modals.
- user name in not subscribed warning banner.

Note that the indicator is shown only if enable_guest_user_indicator
setting is set to true.

As a result of this change, we now translate "deactivated" text
shown in user pills for deactivated users.

Fixes part of #26700.
2023-10-12 12:06:10 -07:00
Sahil Batra c51c1d5135 realm: Add setting to control adding "(guest)" indicator to name.
This commit adds new realm setting to control adding "(guest)"
indicator to names of guest users in the UI.

Fixes part of #26700.
2023-10-12 12:06:10 -07:00
evykassirer 77fc836edf stream_id: Replace empty string with undefined.
This commit also limits `stream_bar.decorate` to only
be able to be called for stream messages, since it's
an undefined string_id is no longer a sign that
you're dealing with a DM.
2023-10-12 11:03:49 -07:00
Aman Agrawal 9d6dcb9a9d communities: Copy code from integrations to toggle_categories_dropdown.
This is used on mobile widths to toggle categories dropdown.
2023-10-12 09:58:47 -07:00
Aman Agrawal 7c0edf356c communities: Allow user to filter orgs by type.
Org category filters were hidden in
60eb408bb0.
2023-10-12 09:58:47 -07:00
Aman Agrawal 9112b0d5d4 lightbox: Fix video playing in background after closing.
If the video was playing, it didn't stop playing even after the
lightbox was closed. We could pause it but removing it from DOM
seems like the better thing to do.
2023-10-12 09:57:21 -07:00
Prakhar Pratyush c520a96354 typing_indicator: Add a 'stream_id' parameter to 'POST /typing'.
This commit adds a 'stream_id' parameter to the 'POST /typing'
endpoint.

Now, 'to' is used only for "direct" type. In the case of
"stream" type, 'stream_id' and 'topic' are used.
2023-10-12 09:53:09 -07:00
Anders Kaseorg 92a9f0a679 desktop-login: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-12 09:28:47 -07:00
Anders Kaseorg 82e4250592 electron_bridge: Declare Zulip Desktop binding types.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-12 09:28:47 -07:00
Anders Kaseorg c6618c9e55 stream_settings_data.ts 2023-10-12 09:11:10 -07:00
Anders Kaseorg d505baf0f3 stream_settings_data: Avoid mutation in get_sub_for_settings.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-12 09:11:10 -07:00
Hemant Umre 655cb51980 templates: Make the empty list messages consistent.
This commit makes the empty list messages of certain tables more
descriptive and consistent with the others.
2023-10-11 18:03:53 -07:00
Hemant Umre 0f5f7109b4 templates: Display a different message for empty search results.
In this commit, we introduce the `data-search-results-empty`
dataset to certain templates. This dataset, along with `data-empty`,
is used by `render_empty_list_message_if_needed` to present different
messages when there are no items matching the applied filter and
no items to display, respectively.

Co-authored-by: Akarsh Jain <akarsh.jain.790@gmail.com>
2023-10-11 18:03:53 -07:00
Hemant Umre eeec8f06e9 templates: Stop using `::after` to render empty list message.
This commit removes all instances of the `required-text` class,
which utilizes the `::after` pseudo-element to render empty list
message. To avoid inserting non-decorative content using a pseudo-
element, we will now use `list_widget.render_empty_list_message_
if_needed` introduced a few commits back to display the empty list
message.

Fixes #23072.
2023-10-11 18:03:53 -07:00
Hemant Umre b387ca49ab right_sidebar: Add functionality to render empty user list message.
In order to eliminate the usage of `::after` pseudo-element for
rendering the empty list message, this commit introduces a new function
for displaying the empty user list message on the right sidebar.
2023-10-11 18:03:53 -07:00
Hemant Umre c87cf3c252 settings: Use `render_empty_list_message_if_needed` for empty bot list.
In order to eliminate the usage of `::after` pseudo-element for
rendering the empty list message, we now incorporate `list_widget.
render_empty_list_message_if_needed` to display the empty bot list
message on `#setting/your-bots`.
2023-10-11 18:03:53 -07:00
Hemant Umre 2ec4b002b1 settings_emoji: Pass active emoji data to the ListWidget.
Deactivated emojis will not be rendered by ListWidget, so it might be
better to pass only active emoji data to the ListWidget. This will also
facilitate the proper functioning of rendering an empty list message by
ListWidget when needed.
2023-10-11 18:03:53 -07:00
Hemant Umre 5eb784a652 list_widget: Add functionality to display empty list message.
This commit introduces a function in list_widget.js that allows
displaying a message when the list is empty using the `data-empty`
dataset. The function checks the container type to determine the
appropriate wrapper for the message and appends it to the container
body.

Fixes a part of #23072.
2023-10-11 18:03:53 -07:00
Joelute 2cbf65b1f2 scheduled_messages: Indicate scheduled messages in conversation views.
These changes adds a new scheduled message indicator in conversation views
which informs the user of the number of messages that are scheduled to be
sent to the current view.

Fixes: #25584.
2023-10-11 17:53:07 -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
Sayam Samal 1cf2c4134e tooltips: Add period (.) to last edited/moved notice. 2023-10-11 16:23:16 -07:00
Sahil Batra ea05755431 settings: Live update lock icon on changing bot creation policy.
This commit adds code to live-update the lock icon for "Bots"
panel in organization settings when "Who can add bots" setting
changes.

Fixes #24393.
2023-10-11 16:22:37 -07:00
Sahil Batra 1080da08f0 settings: Fix live-update of text on the bots admin page.
We did not live-update the text on the top of admin bots page
correctly when changing the bot creation policy. This commit
fixes it.
2023-10-11 16:22:37 -07:00
Sahil Batra 4b23ac2743 settings: Update lock icon when "Who can add emoji" setting changes.
This commit adds code to live-update the lock icon for "Custom emoji"
panel in settings when "Who can add custom emoji" setting changes.
2023-10-11 16:22:37 -07:00
Sahil Batra 0bd2d0b6a9 settings: Add code to live-update lock icon on changing role.
This commit adds code to live-update the lock icon in settings
left sidebar when a user's role changes.
2023-10-11 16:22:37 -07:00
Sahil Batra e14b9e368a settings: Use tippy for tooltips on lock icons.
This commit update tooltips shown on lock icons in settings
sidebar to use tippy instead of using html title attribute.
2023-10-11 16:22:37 -07:00
Sahil Batra 17e0b6621b settings: Update tooltip on lock icon shown for custom emoji panel.
This commit updates the tooltip for icon shown for custom emoji panel
to change the text to "You do not have permission to add custom emoji"
instead of just mentioning always that only admins can add them
even when we have other options like "Admins and moderators".

This also fixes the condition of showing or hiding the lock icon
to use the correct setting value and not the old setting
add_emoji_by_admins_only.
2023-10-11 16:22:37 -07:00
Tim Abbott 66bbf35df4 settings: Adjust label for stream typing notifications setting. 2023-10-11 10:16:24 -07:00
Prakhar Pratyush 43789cac58 stream_typing_indicator: Remove the dev environment guard in settings.
This commit removes the 'page_params.development_environment' guard
for the setting 'send_stream_typing_notifications' and makes it
available outside the development environment.
2023-10-11 10:16:24 -07:00
Aman Agrawal 229dcce217 overlays_modals: Replace with inline use of overlays/modals.any_active. 2023-10-11 09:45:37 -07:00
Aman Agrawal 2aab74049d overlays: Rename is_active to any_active. 2023-10-11 09:45:37 -07:00
Aman Agrawal 089886245d modals: Rename is_open to any_active. 2023-10-11 09:45:37 -07:00
Anders Kaseorg cac5778e70 stream_edit_toggler: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-10 18:26:57 -07:00
Anders Kaseorg 97f4847c71 email_log: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-10 17:41:03 -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 2fac5fb08c compose: Hide New direct message button in DM views.
This avoids the situation where the contextually aware
Start new conversation button duplicates the functionality of the
dedicated New direct message button.

Additionally, it gives a sense of what the UI would be like if
only the Start new conversation button were displayed.
2023-10-10 17:37:03 -07:00
Karl Stolley 1f77e4a892 compose: Enable New conversation contextual function in DM narrows. 2023-10-10 17:37:03 -07:00
Karl Stolley 654469b29f compose: Make DM identifiers align with new conversations. 2023-10-10 17:37:03 -07:00
Karl Stolley 0f084587e0 compose: Make stronger, more readable button-update logic. 2023-10-10 17:37:03 -07:00
Karl Stolley c73de34f32 compose: Introduce 'Start new conversation' button. 2023-10-10 17:37:03 -07:00
Daniil Fadeev 9303339810 compose: Remove the unused span wrapper for buttons. 2023-10-10 17:37:03 -07:00
Daniil Fadeev e861b16911 compose: Show or hide the clear-topic button as needed at compose start. 2023-10-10 17:37:03 -07:00
Karl Stolley 5b830a226c compose: Name triggers for clearing the topic. 2023-10-10 17:37:03 -07:00