Fixes#11832
This lets the user see more options than the three that appear
in the typeahead menu, and prevents them from inputting invalid
stream names.
This change replaces the input field with the dropdown, and
updates everything that referred to the classnames of the old
input field, so that they now get the data they need from the
new dropdown.
Previously, we stopped the composebox from closing on
in-composebox clicks by stopping propagation from the
composebox click handler. This was an issue because
we need to propagate the event to bootstrap in
situations like dropdown clicks. We can avoid closing
the composebox on in-composebox clicks by just checking
if the click is in the composebox.
This is a helpful prep commit for the upcoming compose
stream dropdown, which needs to change the list of
stream names when the user changes their stream subscriptions.
After merging #24423, it was found that there were still an email yet to be updated with the new lines introduced in that PR. This commit updates both the email and plain-text versions.
This is a continuation of #24260 where we have redrafted the "contact us"
line in various emails, but the plain-text versions of those emails remains
untouched. We want to also update those versions and ensure that they match
with our emails.
Fixes: #25198.
This commit sets the transition to "none" for the dropdown
list widget element during focus to remove a weird fade-in
effect. We have to set this to none as the existing CSS
sets transition for all button elements inside ".new-style"
div. This commit adds the CSS for select element too,
as both are using same CSS, but since there was no transition
effect for select elements before as well, we can do this
change safely.
Updates the empty narrow banner when there are no starred messages
for a more general use case. Previously, it indicated that the
user hadn't starred anything yet, which could be confusing for an
experienced user who had just cleared out their starred messages.
Several onboarding emails sent to new users/organizations used the
same "contact us" language. Adds new macros for the "contact us"
line for Zulip Cloud and self-hosted realms to eliminate repetition.
The suitable macro for Zulip Cloud vs self-hosted organizations is
decided conditionally, by checking corporate_enabled.
Fixes#24260.
This prep commit renames 'muted_topic_ui_row.hbs'
to 'user_topic_ui_row.hbs'.
This includes minor refactoring, as it is now the
template for rows with any visibility_policy,
not just MUTED.
This is a prep commit that renames 'get_muted_topics'
to 'get_user_topics_for_visibility_policy'.
The function is refactored to add support for
visibility policies other than MUTED.
Installs which are upgrading to current `main`, and are upgrading for
the very first time from an install which was originally from git,
have a `/home/zulip/deployments/current` which, unlike all later
upgrades, is not a `git worktree` of `/srv/zulip.git`, but rather a
direct `git clone` of some arbitrary URL. As such, it does not have
an `upstream` remote, nor a cached `zulip-git-version` file.
This makes later attempts to determine the pre-upgrade revision of
git (for pre-deploy hooks) fail, as without a `zulip-git-version`
file, `ZULIP_VERSION` is insufficiently-specific (e.g. `6.1+git`), and
there is no guarantee the necessary tags exist either.
While we can make fresh git installs set up an `upstream` and run
`./tools/cache-zulip-git-version` going forward (see subsequent
commit), that does not address the issue for deploys which already
exist. For those, we must configure and fetch a `remote` in the old
checkout, followed by re-generating a cached `zulip-git-version`.
Fixes: #25076.
Changes `AjaxRequest` name to more clear one `AjaxRequestHandler`,
also moved this type to `types.ts` with a comment to move it into
`channel.js` once it migrates to typescript.
Removes direct dependency cycle between `reload.js` and `server_events.js`
by calling `reload.add_reload_hook(cleanup_event_queue)` from `server_events`
initialize function which registers a hook to run on reloading.
Created a function `call_hooks` which loops over all the registered hooks
and executes them on performing a reload.
There was a direct dependency between `admin.js` and `settings.js` which
was due to the fact that we needed to call `build_page` of both modules
in each other's `launch` function.
This is solved by lifting those `build_page` calls up from both modules to
`hashchange.js` which is the module which calls the `launch` function
of both modules.
Switch to a full keyboard-shortcut advertising tippy tooltip for
show_all_private_messages in left sidebar by adding a class
`.tippy-left-sidebar-tooltip` which adds tooltip with LONG_HOVER_DELAY
and default placement right with fallback placement equal to bottom.
Fixes part of #24311.
Added tippy tooltips for all_messages, recent_topics, and drafts
in left sidebar by adding class `.tippy-left-sidebar-tooltip`
which add tooltips with LONG_HOVER_DELAY and default placement right
with fallback placement equal to bottom.
Fixes part of #24311
Added new tippy tooltips class `.tippy-left-sidebar-tooltip`
which add tooltips with `delay: LONG_HOVER_DELAY`, appended to body,
and default placement right with fallback placement equal to bottom.
Fixes part of #24311
This commit removes tooltips from the Mentions and Starred messages
as they do not advertise any keyboard shortcuts and do not provide
any additional information beyond what is already visible in the UI.
Fixes part of #24311
Added a tippy tooltip in `tippyjs.js` that delegates to
`#compose-send-button`. Content of tippy tooltip is changed
dynamically as per value of `user_settings.enter_sends`.
`user_settings.enter_sends` returns true if send shortcut is
`enter` and flase if shortcut is `Ctrl + Enter`.
Fixes#24619
Previously, we didn't notify the starred messages code path when
processing the event that a message was deleted, resulting in the
displayed counter potentially being stale until the app is reloaded.
Fixes#25190.
This replaces any "url_format_string" or "url_format" with
"url_template" for the linkifier settings, including HTML ids, template
variables, and etc.
This is not affected by any external API changes.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This removes the validator argument for 0423_realmfilter_url_template,
which do not really alter the database schema. It otherwise fails
the migration because the filter_format_validator function is removed.
Migration 0094_realm_filter_url_validator is modified because we can no
longer refer to filter_format_validator.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This is mainly updating the variable names and relevant docstrings
without actual change to the behavior of the command.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This swaps out url_format_string from all of our APIs and replaces it
with url_template. Note that the documentation changes in the following
commits will be squashed with this commit.
We change the "url_format" key to "url_template" for the
realm_linkifiers events in event_schema, along with updating
LinkifierDict. "url_template" is the name chosen to normalize
mixed usages of "url_format_string" and "url_format" throughout
the backend.
The markdown processor is updated to stop handling the format string
interpolation and delegate the task template expansion to the uri_template
library instead.
This change affects many test cases. We mostly just replace "%(name)s"
with "{name}", "url_format_string" with "url_template" to make sure that
they still pass. There are some test cases dedicated for testing "%"
escaping, which aren't relevant anymore and are subject to removal.
But for now we keep most of them as-is, and make sure that "%" is always
escaped since we do not use it for variable substitution any more.
Since url_format_string is not populated anymore, a migration is created
to remove this field entirely, and make url_template non-nullable since
we will always populate it. Note that it is possible to have
url_template being null after migration 0422 and before 0424, but
in practice, url_template will not be None after backfilling and the
backend now is always setting url_template.
With the removal of url_format_string, RealmFilter model will now be cleaned
with URL template checks, and the old checks for escapes are removed.
We also modified RealmFilter.clean to skip the validation when the
url_template is invalid. This avoids raising mulitple ValidationError's
when calling full_clean on a linkifier. But we might eventually want to
have a more centric approach to data validation instead of having
the same validation in both the clean method and the validator.
Fixes#23124.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This is implemented by replacing all matches of "%(var_name)s" in a URL
format string with "{var_name}". Since we do want to ensure that the
templates aren't broken after this migration, a RuntimeError is raised
to let the maintainer know that certain linkifier cannot be converted
automatically if it does not pass the uri_template.validate check.
Also, we need to escape "%%", which is used to represent "%" in the old
format string syntax, as well as "{" and "}", which is a part of the
URL template syntax.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>