This commit replaces the value `private` with `direct` in the
`message_type` field for the `typing` events sent when a user
starts or stops typing a message.
The logic for formatting code is generalised to make it reusable for
multiple styles of formatting (added in the next commits).
Co-authored-by: N-Shar-ma <bablinaneh@gmail.com>
This commit replaces all previous Font Awesome references in the
left side bar and relevant popovers with the custom Zulip star
icon.
Co-Authored-By: Hardik Dharmani <Ddharmani99@gmail.com>
This commit renames the classes and IDs in the views area
(formerly global filters) to a set of flexible values all
prefixed in some way with `left-sidebar-navigation`.
This is meant to make the styles and structures in the area
more readable, while also keeping things flexible into the
future as this area's elements change.
Co-Authored-By: Hardik Dharmani <Ddharmani99@gmail.com>
This is Prep commit that introduces 2 new CSS variable
`--color-background-unread-counter` and
`--color-background-unread-counter-popover-menu` that has value
`hsl(105deg 2% 50% / 50%)` in dark theme and `hsl(105deg 2% 50%)`
in light theme for unread counter and `hsl(200deg 100% 40%)`
for unread counter in popover menus to match its blue theme.
This is a Prep commit. This commit fixes the color of
`BACK TO STREAMS` label in the dark theme to be equal to other labels
in left sidebar such as `STREAMS` label.
Since load_messages now supports fetching data with only
MessageListData, we can just use it and avoid calling
MessageListView which also caused our polls and TODO widgets to
not render occasionally.
Since inbox is populated based on unread data which is part
of /register request, it is possible that we don't have the
actual message in our message_store. In that case, we return
a fake message object.
This uses the banner message's line-height to set a
max-height on the action and cancel buttons to maintain
a consistent vertical spacing.
Additional uses of flexbox here:
1. help the button to remain shorter when it's adjacent a
single-line banner message, and
2. center the closing X icon relative to the current size
of the action button, when one is present
This also styles those inner .banner_message elements to lose
margin inherited from Bootstrap. (This is now also applied to
the upload-message banner.)
It's better to achieve that with a class selector; using a `p`
element selector would mean that such a style would be evaluated
for all `<p>` elements in the DOM. Which is of course a whole lot,
thanks to Markdown alone.
Fixes: #26922
`popover-content` class had no effect on emoji popover since
it was resetting `padding: 0` and background color was
already applied by tippy theme.
In short, removing `popover-content` had no visual changes.
Remove bootstrap-tooltip class `popover-title` from code.
It was only used in user_card_popover for showing user avatar,
so cleaned up properties that were duplicated or not required.
We use "modal-footer" class in stream and user group creation form
and this commit adds bootstrap CSS rules for it to subscriptions.css
so that we can remove the CSS from bootstrap.css.
This commit updates the 'get_server_history' function to return
early if a request is already in progress for a given stream_id,
thus preventing concurrent requests for a single stream_id.
We maintain a set 'request_pending_stream_ids', which contains all
the stream IDs for whom requests are in progress.
Using this set, we return early.
Fixes#26915.
This fixes the bug where on pressing enter after the last line in a
textarea, the cursor would go to the new line but the textarea would
not scroll it into view unless more was typed. This was observed on
chromium browsers.
A new function `insert_and_scroll_into_view` is added to `compose_ui.js`
which blurs and refocuses the textarea after inserting the content, then
autosizes the textarea.
topic_zoom.is_zoomed_in() can’t be true in pm_list.zoom_in, because
“more conversations” would not be visible in that state. And it can’t
be true when pm_list.handle_narrow_activated calls pm_list.expand,
because “more topics” would not be visible in an all-DM view. So the
only non-inert call is via click_handlers; move it there.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
The function considers @**all**, @**everyone**, @**stream**,
and @**topic** as wildcard mentions.
Earlier, the function didn't have a check to match @**topic**
in the message_content.
There were 2 issues:
* Wrong format for creating new Map object used.
* Use of `topic_dict` instead of `topics_dict`, which resulted
in `stream_key` being present in `topics_dict` even after stream
has been marked as read. This made inbox believe that the
stream was already rendered even though it was not.
Up until now, we unconditionally saved any message content as a draft
whenever the composebox was `start`ed. This led to a lot of unnecessary
saving of drafts even when the composebox stayed undisturbed.
To fix this, now we only save the draft when the compose state is about
to be overidden, which is by either changing the recipient narrow or by
restoring another draft.
Fixes: #26976.
In #23900, the floating recipient bar was replaced with a sticky
recipient bar. The logic in `id_for_recipient_row` was not updated
for that change, so we update that function to just get the first
message in the group and return that message ID.
Since is_visible was refactored to use a variable, these mocks
are not required.
Also, since is_visible return `false` by default, mocking it
to return false is not required.
Fixes#26962
We sort topic and dm data by latest_msg_id and render them.
For updates, we remove rows which for which latest_msg_id was
changed and them insert them again at the correct index.
It did the same thing as handle_narrow_activated when passed the
home_msg_list filter.
We still leave a renamed version for use by the inbox/recent views.
It did the same thing as handle_narrow_activated when passed the
home_msg_list filter.
We still leave a renamed version for use by the inbox/recent views.
This does not results in any behavioral or UI change, we just
use portico_modals module to open and close the modal instead
of directly calling functions like Micromodal.open and
Micromodal.close. This change also solves a bug where the
modal was not closed previously on clicking anywhere outside
the modal.
We used "btn-success" class only in user profile modal subscribe
widget and the CSS rules applied by bootstrap on this class were
overridden by other CSS. We also remove the btn-success class
since this is a bootstrap-specific class and we no longer
need it.
We used "btn-primary" class only in integrations dev panel page
and this commit re-adds the CSS applied by this class in
integrations_dev_panel.css. We also remove the btn-primary class
since this is a bootstrap-specific class and we no longer
need it.
We now use micromodal in the modal on dev server emails page to
make it consistent with other modals in the app and this is
preparatory work for moving away from bootstrap as well.
We now use micromodal in the license update modal on billing page
to make it consistent with other modals in the app and this is
preparatory work for moving away from bootstrap as well.
This commit adds portico_modals.ts module which contains functions
for supporting modals in portico pages. The new module basically
contains code from functions in overlays.ts without the code
that is not needed currently for modals in portico pages.
This commit adds two drop-down settings in 'SETTINGS / NOTIFICATIONS'
and 'SETTINGS / DEFAULT USER SETTINGS'.
The new settings lie in a new section named "Topic notifications",
just below the "Noification triggers" section.
Label: "Automatically follow topics"
Options: "Topics I participate in", "Topics I send a message to",
"Topics I start", and "Never".
Label: "Automatically unmute topics in muted streams"
Options: "Topics I participate in", "Topics I send a message to",
"Topics I start", and "Never".
Fixes#25914.
We remove redundant code when editing a scheduled message in the compose
box, for resetting the compose box, as it anyway gets reset on calling
`compose_actions.start()`.
Besides ending `scheduled_messages_ui.js`'s dependency on `compose.js`
and `compose_ui.js`, this also fixes the bug where on editing a
scheduled message when there was content in the compose box, it would be
irretrievably lost. The old content is now drafted.
This commit consists of the following visual changes:
- Add the hotkey hints in the tooltip of the view edit history option,
the shortcut (Shift + H) for which was added in PR #26245
- Swap "Click to view edit history." and the edit status string
(EDITED/MOVED/SAVING) to make the tooltip consistent with other
tooltips across the web app.
- Rename "Click to view edit history." to "View edit history", since
the "Click to view" part is evident from the icon as well as the the
keyboard shortcut hints.
Fixes#26581.
By replacing `<span>` tags with `<div>` tags inside the tooltip's inner
content we remove the redundancy of having to use break tags to
separate the tooltip's title and it's content.
We also replace any `<p>` tags with `<div>` tags for the following
reasons:
- Since what we want to achieve are just block elements in order to
avoid the break tags, using `<div>` tags provide use with a wider
scope of use cases.
- We don't want the pause, screen readers often introduce after reading
the contents of a paragraph.
- The `<p>` tag cannot contain tables and other block-level elements.
- The semantic meaning of the <p> tag doesn't apply to the commonly
used tooltip content.
Commit 57340a888c (#19003) separated it
from the variable it was commenting, and commit
8ced075643 (#22754) changed that to a
different variable, so I infer that nobody thought this documentation
was important.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Earlier when a user is deactivated or reactivated from users
table and deactivated_users table the `Role` column was modified.
This commit changes this and now `Role` column is not modified
instead now the corresponding row is greyed out.
Fixes#21653.
Earlier tooltip shown on hovering to activate and deactivate user
button in users and deactivated_users table does not live update
when user is deactivated or reactivated.
This commit makes changes to do the live update.
This commit removes the `Reactivate` and `Deactivate` title on hovering
to activate and deactivate button in users and deactivated_users table.
This was done as we already show tippy tooltip on hover.
Read receipts can either hide by clicking or pressing escape
button. Since clicking already hides popovers and escape keypress
call `popovers.hide_all` separately, we don't need to call
it again.
Adds warning banner to the organization settings overlay/tabs
for demo organizations. For owners, clicking on the link in the
banner opens a modal to convert the demo organization into a
permanent organization.
For admins that are not owners, clicking on the link will go
to the help center article on demo organizations.
Non-admin users will not see the warning banner.
The modal for converting a demo organization requires the owner
to have set their email address. Once the owner's email address
is set, then the organization can be made permanent by changing
the subdomain of the organization. The deletion date for the
demo organization will be removed as part of updating the
subdomain.
The organization owner must also have updated the organization
type to be any value other than unsepecified to convert the
demo organization to a permanent organization. The modal's
submit button will be disabled if that is the value for the
organization type in the form. The demo organizations created
in the dev environment now have their organization type set to
unspecified on creation.
This is a part of #19523.
Co-authored by: Lauryn Menard <lauryn@zulip.com>
Updates the demo organization navbar alert for the deletion deadline
to link to the help center doc for converting it to a permanent org.
Also removes the "Hide notice" text since the "X" close button is
sufficient for users who want to close the notice.
Updates the testing for scheduled message event schemas to be fully
checked by `zerver/tests/test_events.py` and `tools/check-schema`.
Adds the missing 'failed' field to the scheduled message events
in `web/tests/lib/events.js` as well.
On hovering the not-selected option in the left sidebar
topic popover widget to change visibility policy, a wiggle
effect was observed.
This commit fixes the wiggle effect.
Since we only have tippy popovers now, functions calling
not_hide_tippy_instances have been removed.
Also, all of emoji_picker, stream_popover, user_card etc popovers
are tippy popovers so calling hideAll is enough to hide them all.
This will allow us to remove some duplicated compose box code that was
previously inside restore_draft.
Co-authored-by: N-Shar-ma <bablinaneh@gmail.com>
We should search for what the user asked us to search for.
CZO conversation:
https://chat.zulip.org/#narrow/stream/101-design/topic/search.20buddy.20list.20for.20self/near/1630454
This commit also stops the user from being at the top of
the search list, so that the search list is fully
alphabetical (though still sorted by online status).
We switch to not having the user at the top of the list
only when there's search text in the search bar, otherwise
there'd be a visual jump that would happen just by opening
the search bar. There's almost always visual change when
entering text into the search input field, so that seems
like the time to change the sorting.
This commit fixes the alignment of account-alert-notification-banner
by using a new classname 'account-alert-notification' for this specific
banner, removed the default margin-top and margin-left from this banner
which is set to all other banners, and Aligned the banner with
vertical-align property set to middle.
To left-align this specific banner when the email is long enough
to wrap to the next line removed the margin-left and used a new
classname 'account-settings-heading' for the accounts heading,
and gave a margin-right of 10px to ensure that the notice banner and
the heading have enough space between them, when the email is short.
If the email is long enough to wrap to multiple lines, then the gap
between the email input field and the banner is too low. To adjust
this, set the margin-bottom to 10px.
This commit fixes the issue where, if the content inside the alert
notification banner is long enough, it will wrap inside the alert
banner.
To prevent the email from spilling over in the notice,added the
'overflow-wrap' property set to 'anywhere'.
Fixes: #23653
Earlier, followed topics in muted streams were not listed in
the 'Recent conversations' table when 'Include muted' filter is
unchecked.
They should be listed as we currently list unmuted topics.
The "test_filter_all" includes tests for muted and not muted topics,
but the 'is_spectator' field is set to 'true'.
Logically, it is incorrect because a topic can't have a
visibility policy set in spectator view.
This commit fixes the incorrect behavior and adds a separate test
for the case 'is_spectator=true'.
The issue was introduced in d0a697f.
If you focus on inbox-header name by right arrow then down and then
left, it will focus on unread count instead of ellipsis icon.
Hard to explain how this fixes the bug here, next commit adds
explanatory comments to the function.
This commit resolves an issue where the edit button was not visible
during message hover for new messages. The problem occurred when a
message was sent after the hover event, resulting in the hovered
message being a local copy with the `locally_echoed` attribute set
to true. This caused the `is_message_editable_ignoring_permissions`
function to return false, subsequently causing `is_content_editable`
to return false as well. As a result, the `is_content_editable`
argument was false, leading to the edit button not being displayed.
The issue was caused due `$current_message_hover` being set to the
locally echoed version of `$message_row`. When the message was
successfully sent and the message was rerendered, the `message_hover`
function was called again on the properly sent message row.
However, the conditional check `($current_message_hover &&
rows.id($current_message_hover) === id)` returned true because
`$current_message_hover`, set to the locally echoed version, had the
same ID as the actual `$message_row`. Consequently, this condition
returned true at the start of the `message_hover` function,
preventing further execution of message_hover function and,
consequently, the updating of hover buttons.
To address this, an `else if` condition was introduced to check if
the message is locally echoed. If true, the function is terminated
to prevent `$current_message_hover` from being set to the locally
echoed version of `$message_row` until the message is sent correctly.
Once the message is sent correctly, the `message_hover` function is
executed again, setting `$current_message_row` to the properly sent
version of `$message_row`, and resulting in updating of hover buttons.
Fixes#25312
This ensures uniform display and flexing of different bits of
banner content, including:
* Banners like Sent! Scroll down to view...) that have only a
classless `<p>` marking their content
* Banners like the unscheduled message allert, which puts a
.banner_content class right on the paragraph
* Banners like the Your message was sent to a stream you have
muted", which tuck a `<p>` into a div with the .banner_content
class
Uptil now, a dash `-` was used to separate the task from its (optional)
description. But a colon `:` was used in the `/todo` command syntax to
indicate where the task ends and it's description starts.
To make the separator symbol consistent for both the syntax and widget,
`:` is used for both. It was chosen over `-` as `:` is encountered less
often in normal language, and so accidental usage of it when using the
`/todo` command syntax is less likely. It is also is impossible to
confuse with the bullet list syntax which is allowed for tasks.
Earlier the tasks in a list were sorted alphabetically and on marking
one complete, it was pushed under any incomplete tasks. This behaviour
can be unexpected and confusing, so now each task is appended to the
bottom of the list on being added, and no shifting takes place on
marking it completed.
Fixes part of #20213.
The bot settings avatar row was using `fa-clipboard` icon. Changed
the icon to use `{{> copy_to_clipboard_svg }}` SVG icon that is used
everywhere else in the app as copy icon.
Abbreviated long URL for custom field in the user profile modal
and user card popover. Added a copy-to-clipboard icon at
the end of the URL. When hovering over the copy button, it displays
a tippy tooltip with the text `Copy URL`. Clicking the copy button
displays a `Copied` tippy tooltip for 1 second.
Fixes#21680
This is a prep commit. This commit renames
`custom_profile_fields_link` to `custom-profile-fields-link`
to follow kebab-case, which is the preferred style in Zulip.
When the user is typing a numbered / bulleted list in the compose box,
on pressing Enter the list syntax will be inserted automatically on
a new line, and removed if Enter is pressed after an empty line.
Fixes: #20305.
A formatting button below the compose box can format the selected text
by numbering or unnumbering the selected (partially or completely)
lines. The behaviour is inspired by GitHub's bulleted list formatting.
Fixes part of: #20305.
A formatting button below the compose box can format the selected text
by bulleting or unbulleting the selected (partially or completely)
lines. The behaviour is inspired by how GitHub's bullet list format
button works.
Also adds a new breakpoint for showing vdots for formatting buttons.
Fixes part of: #20305.
The internal design here was that we had no-select on the outer
element and auto-select on these inner elements to override it.
But, `auto-select` class seems to have no effect so we are
removing it.
This fixes a regression introduced in #26807, where a padding
adjustment spilled over to the privacy icon display in message
headers.
This fix should prevent future spillover by isolating left-sidebar
stream icon styles to just the streams list.
Wildcard mentions in direct messages were not being count as mentions
due to incorrect calculation of `is_unmuted_mention` variable in
`update_message_for_mention()` function in `unread.js`. Fixed this by
correcting the calculation of `is_unmuted_mention`.