Following important changes are being made here:
* color_class lib is removed since it not used anywhere now.
* We don't need the `dark_background` class since the background
color is already adjusted based on color scheme. So, all
instances of it being used is removed.
stream_privacy template has conditions to show stream privacy icon
for all the cases, so we use it here since we also want to show
`#` icon for public streams.
Until now, lists with 3+ digit markers would have their beginnings cut off
to align with 2 digit markers. We fix that by having custom styling for
markers where we align markers only up to 2 digits, and let larger numbers
take up more space pushing the list item content forward as required to fit
the marker.
Separates the context dictionary that is used for `send_email` for
the `followup_day1` and `followup_day2` emails.
Prep commit for updates to `followup_day2` email.
The previous implementation leaked database connections, as a new
thread (and thus a new thread-local database connection) was made for
each timer execution. While these connections were relatively
lightweight in Python, they also incur memory overhead in the
PostgreSQL server itself. The logic for managing the timer was also
unclear, and the unavoidable deadlock in the stopping logic was rather
unfortunate.
Rewrite with one explicit worker thread which handles the delayed
message sending. The RabbitMQ consumer creates the database rows, and
notifies the worker to start its 5s timeout. Because it is controlled
by a condition variable, it does not hold the lock while waiting, and
can be notified to exit.
Despite the timestamp being hidden while sending the message, the link
on the timestamp (message url) was still hoverable and clickable, and
had a tooltip.
Here we disable the tooltip, but
https://github.com/zulip/zulip/issues/25069 remains open for the link
part.
At times, it might get confusing for users who are on
slow connections if their messages has not been sent
even after 5s. Including a spinner that will only show
up after 5 seconds has elapsed will keep user informed
about their slow connection.
5s is set as minimum time because showing up a spinner
before than might be distracting for users on normal
connections.
Fixes: #19328.
This commit changes behaviour of banners
in user groups panel and emoji settings panel
under organization settings.
Now banner in these panels is only
shown when user is an administrator or user
does not have permissions to perform actions
on panel.
Fixes#24157.
The flatpickr keyboard UI functions are very confusing. We previously
had a bug where typing keys that were not keyboard shortcuts or
numeric values could throw an exception due to accessing hotkey.name
when hotkey was undefined.
Fix this, and add a bundle of comments improving the documentation of
this confusing code path. Unfortunately, the implementation is still
somewhat mysterious; we leave debugging that to future work.
Fixes#24773.
Co-authored-by: Tim Abbott <tabbott@zulip.com>
In `insert_syntax_and_focus`, we now explicitly focus the textarea
before inserting the content, rather than relying on insert() to do
this for us. A comment is added documenting the quirks of insert that
require this.
This fixes a bug where the compose box might not be focused after
inserting video call links, emojis from the picker, GIPHY gifs, and
some other buttons.
Per the issue #25045, this commit changes some occurences of `uri`
appeared in variable `root_domain_uri`. Files affected are some
html files that used this variables and a backend file
`context_processors.py` that set it as a key.
Following the issue #23380 and PR #25038, this commit changes all
occurences of `uri` into `url` in all comments, local variables,
handlebars templates (.hbs) function names and their callers in
all `.js` and `.ts` files.
When there are no operators to narrow down
the search to, pass into `deactivate()` if
we're in `recent conversations`.
If we are, it will go to `all messages`.
This is done by using `is_visible()`
function of `recent_topics_util`.
Removes undefined `time_input` from `invite_users_modal.hbs`.
The default input value for the expiration custom time limit is
not set until the "custom" option is selected from the dropdown.
Removes the undefined `csrf_input` from the same template. And
imports `csrf.ts` into `invite.js` to get the csrf token and
add it to the request data, which is the current pattern used
in other `/web/src` modules.
This commit breaks the cyclic dependency between "topic_list.js"
and "topic_list_data.js".
It achieves this by passing "search_term" generated by the
"get_topic_search_term" function to "topic_list_data.js" directly
through the function call from "topic_list.js".
Adds a new welcome email, `onboarding_zulip_guide`, to be sent four
days after a new user registers with a Zulip organization if the
organization has specified a particular organization type that has
a guide in the corporate `/for/.../` pages. If there is no guide,
then no email is scheduled or sent.
The current `for/communities/` page is not very useful for users
who are not organization administrators, so these onboarding guide
emails are further restricted for those organization types to
only go to new users who are invited/registered as admins for the
organzation.
Adds two database queries for new user registrations: one to get
the organization's type and one to create the scheduled email.
Adds two email logs because the email is sent both to a new user
who registers with an existing organization and to the organization
owner when they register a new organization.
Co-authored by: Alya Abbott <alya@zulip.com>
Refactors the logic for adjusting the delay for sending an email
to not land on a weekend so that it can be used to schedule any
number of onboarding emails we decide to send.
Consolidates duplicate testing into
`zerver/tests/test_email_notifications.py`. The initial test and
function were introduced in commit 610f2cbacf with the test
located in `zerver/tests/test_signup.py`.
Prep commit for adding new welcome / follow up email.
This commit fixes the alignment of the `search_close` icon on devices
with a width less than $sm_min (576px) by removing a top padding
of 5px and adjusting the position to top 5px from the previous 4px.
This is a follow up to #24673, we want to modify every webhook events to
follow the same pattern and consistency where branch name should only
show on opened and merged events.
Incresase the max number of stream topics shown when not zoomed
into the stream for more topics in the left sidebar to be a max
of 8 unread conversations and 12 when there are unreads.
This commit breaks the cyclic dependency between "top_left_corner.js"
and "unread_ui.js".
It achieves this by shifting the "animate_mention_changes" function
from "unread_ui.js" to "top_left_corner.js".
When a user opens a profile modal, the overlay is clicked
through in responsive mode, which results in unintended button/link
clicks. This commit removes the causing CSS properties
`pointer-events:none;` which was passing pointer-events to other
elements and `pointer-events:all` which is experimental and do no
effect.
This commit toggles the gear_menu on pressing the `g` keyboard hotkey,
if it's already open.
Fixes: #24417.
Co-authored-by: Tim Abbott <tabbott@zulip.com>
This commit renames the 'tornado_redirected_to_list' context
manager to 'capture_send_event_calls' to improve readability.
It also refactors the function to yield a list of events
instead of passing in a list data structure as a parameter
and appending events to it.
On mobile, the tooltip is triggered at the same time when right
sidebar is hidden when user clicks on a user name in the buddy
list. So, `instance.reference` node no longer exists in DOM.
This commit moves the code to select option on pressing "Enter" in
dropdown_keyboard_events as we handle other "keydown" events there.
This change is done for both MultiSelectDropdownListWidget and
DropdownListWidget components.
We also remove the usage of now depreceated "keypress" event with
this change.
This commit updates the code for MultiSelectDropdownListWidget and
DropdownListWidget components to select the first option on pressing
enter when focus is on search input.
Fixes#25024.
This commit renames dropdown_focus_events function in
DropdownListWidget and MultiSelectDropdownListWidget
components to dropdown_keyboard_events, as we will be
adding other keyboard events to select an option in
this function further commits.
Updates `Filter.describe_is_operator` to use switch/case instead
of if/else and adds case for "is:resolved" narrow so that it is
not shown as invalid when used with other search narrow filters.
In commit aa002f5c6d, a handlebars template was created for empty
narrow feed messages, which removed a number of div element ids,
and updated `narrow_banner.show_empty_narrow_message` to first
empty the main empty narrow div of any previous message content.
Removes the helper function for hiding the empty narrow messages
as `narrow_banner.show_empty_narrow_message` should empty the
empty message div of any text before rendering the updated empty
narrow for the new empty narrow banner text.
Also, cleans up a missed instance of 'uri' from commit b22578f
in the same test.