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.