Renames the function called to open the web app modal to convert
a demo organization to a permanent organization to instead be
show_convert_demo_organization_modal, as "do_" functions in the
codebase typically means it's called after any checks/dialogs.
This commit adds an option to change the notification settings
of a channel from default to custom in the Notifications menu
of Personal settings.
Fixes#19849.
This commit introduces a class
`decorated-stream-name-dropdown-widget`. The class extracts
the styles applied to channel dropdowns in commit:
9ae704510f org_settings: Correctly display long channel names,
so they can be reused at other instances.
This commit ensures that long channel names, including those
containing multiple words, are properly abbreviated in the channel
dropdown widgets in organization settings.
Follow up to commit:
9ae704510f org_settings: Correctly display long channel names,
which handled long single-word channel names.
This commit adds a variable `push_notifications_disabled` to the
checkboxes used in the notifications table in Settings > Notifications.
The variable is used to control the mobile push notifications
disabled tooltip.
The only other flavor we have seen so far is ConnectionResetError, but
that is just as much a client error which we should log and move on,
and not log an exception for.
We shouldn't show duplicate suggestions in the typeahead, but
duplicate pills were still possible by typing a term twice in
the search bar and pressing enter after each one, and this
commit prevents that from putting duplicate pills in the search
bar.
Adds delete_expired_demo_organizations to the archive_messages
management command, which is run as a cron job.
Adds "demo_expired" as a `RealmDeactivationReasonType` to be
used for this specific case of calling do_deactivate_realm.
The function loops through non-deactivated realms that have a
demo organization scheduled deletion datetime set that is less
than the current datetime.
Previously, typing "channels: public" would show "Channels public"
in the typeahead, which was especially confusing because we'd show
"All public channels" until the term was completely typed out.
Calling settings_data.user_can_access_all_other_users on every call to
this function could be expensive when using this function in loops
over every user in the organization.
After the previous commit, those calls are still somewhat expensive
for guest users.
This fixes an important issue where this function being called in a
loop can consume as much as 1ms per iteration for users who are in a
lot of groups.
This commit removes the deprecated `keypress` event.
Now, we use the `keydown` event.
Earlier, we used `keypress` because it allowed us to distinguish
between lowercase and uppercase characters using `event.which`.
For example:
* For 'r':
* keypress.which = 114
* keydown.which = 82
* For 'R':
* keypress.which = 82
* keydown.which = 82
As shown, `keydown.which` cannot distinguish between 'r' and 'R',
which is why `keypress` was helpful.
Now, modern browsers support `event.key` on `keydown`, which directly
gives 'r' or 'R' as needed. This makes `keypress` unnecessary, and
we can safely rely on `keydown` with `event.key` to get the exact
character.
An earlier commit in this PR #34825, in which we replaced
the `event.which` with `event.key` plays a major role as a prep
commit to help removing `keypress` event in this commit.
The `keydown` and `keypress` event handlers defined in
`emoji_picker.ts` were using `event.which`, which is deprecated.
This commit makes changes to use `event.key` instead.
With this we introduce selection expansion when
the selection spans across multiple inline expressions
or expressions within mutliple math blocks.
This makes the selection consistent with what is pasted
while also fixing some bugs encountered in cases such as:
1. Focus present in an inline math expression and
anchor present in a different inline math expression
and vice-versa.
2. Focus present in a math block and anchor present
in a different math expression outside that math block
and vice-versa.
3. When selecting expressions within a math block, the
first expression wasn't retained in the past because
of the selection not containing <annotation>.
Fixes#33676.
Also fixes
https://chat.zulip.org/#narrow/channel/9-issues/topic/.F0.9F.93.82.20pasting.20LaTeX/near/2159869
and other related issues.
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
This commit adds a "Alphabetize choices" button for SELECT also known as
"List of options" type custom profile fields. The
options themselves can get out of order from either user text input, or
from list modifications like addition or drag.
We follow case-insensitive alphabetization such that "vim" comes before
"VS Code". This is similar to how we alphabetize elsewhere like stream
lists.
Fixes: #28607.
Co-authored-by: Tanmay Kumar <tnmdotkr@gmail.com>
Previously, the placeholder text displayed incorrectly after
applying filters.
This commit refactors `list_widget` to check if combinations of
filters applied, such as role and search filters. It ensures that the
correct placeholder message is displayed.
Fixes: #32971.
In get_raw_unread_data, 1:1 or self messages are added to pm_dict.
However, if a DirectMessageGroup is the recipient, the message is
added to huddle_dict by default.
To keep API compatibility, we override this behavior to populate
pm_dict for 1:1 and self DMs when a DirectMessageGroup exists.
This ensures clients relying on pm_dict continue to work during
and after the migration.
This PR fixes part of issue #25713.
Previously, the export_search command only supported the legacy
Personal recipient type for 1:1 direct messages. With this change,
the command first checks for a DirectMessageGroup for the two users
and uses it if present. If not, we fall back to the legacy logic. This
keeps compatibility as we migrate 1:1 DMs to use DirectMessageGroup.
Earlier, we were appending view all subscribers link using
JQuery.append, which leaves open the possibility for the component to
be appended multiple times if the function calling it gets called
multiple times.
It is better to have the link div in right_sidebar.hbs
and then insert the html when required.
Searching e.g. "NASA" would put "nasa" in the search bar if you
selected "search for NASA" in the typeahead. This probably looks
weird to users, so let's not lowercase search operands.
Previously, the "Forgot password" action was bit difficult to
locate due to its position. This commit adjusts its placement
to enhance discoverability and improve the user experience.
Fixes#33654
Set the inbox search input width to 100% to prevent overflow on small
devices. This Ensures the search box stays within its container for a cleaner
layout. Setting the element's width to 100% overrides the default width.
When the override-topic checkbox becomes checked, and the topic-input
gets its "hide" class removed, place the cursor inside the textbox.
Close the stream dropdown before processing the selected option, to
prevent it overriding the focus.