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.
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.
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.
- 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.
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.
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.
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.
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`.
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.
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`.
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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".
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.
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.
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.
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.
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.
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
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.
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.
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>
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>
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.
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
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.
- 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>
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.
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.
This commit adds "(guest)" indicator to guest user names in
compose box placeholder if enable_guest_user_indicator setting
is enabled in the organization.
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.
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.
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.
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.
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.
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.
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.
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>
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.
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.
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`.
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.
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.
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.
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.
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.
This commit removes the 'page_params.development_environment' guard
for the setting 'send_stream_typing_notifications' and makes it
available outside the development environment.
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.