Variable for storing the dropdown widget is now
declared in stream_settings_components and this
commit also adds some helper functions to get
and set the filter value.
This is a preparatory commit to avoid import
cycles in further commits for fixing live
update when channels are archived.
There is no need to store the archived status filter value in a
variable, instead value can just be derived by calling "value"
function on DropdownWidget.
This is a preparatory refactor for further commits which will fix
live-update behavior when archiving channels.
Add a warning banner when a user mentions a group (non-silent) where none
of the members are subscribed to the current stream. The banner informs
the user that the mention won't notify anyone.
Fixes#33545.
Fixes#31315.
We want to parse sender:me with the email when turning it into
a pill, but not before then so that "Sent by me" is still the
search string in the suggestions.
This commit separates the "resolve topic" permissions from the
topic editing permissions, through the introduction of setting -
"can_resolve_topics_group" which user group whose members
can resolve topics.
Fixes#21811
Add the `is:muted` search operator.
`-is:muted` is an alias for the `in:home` operator.
Co-authored-by: Kenneth <Kenneth012004@outlook.com>
Fixes#16943
Previously, mentions from muted channels were incorrectly excluded when
narrowing down to `-in:home`. Additionally, messages from all muted
topics were missing in the results.
This commit solves the above listed issues.
The relevant legacy logic being removed dates to when we didn't
support unmuting or following topics.
Use both the last_moved_timestamp and last_edit_timestamp to show
edited and moved indicators/tooltips in the message list view of
the web app, instead of parsing the message edit history array.
We still maintain and build the message edit history array as it's
used for calculating the narrow terms when there is a near operator
and a message has been moved to a different channel or topic.
Updates the tooltip for message edit indicators to include both
the moved and edited time if a message has been both moved and
edited.
Previously, all buttons within .subsection-changes-save were targeted,
potentially leading to multiple requests while a request was in
progress. This change ensures that the triggering element is properly
handled by preventing the default form submission action.
Previously, `is_spectator_compatible` in `hash_parser.ts` ignored all
operators and operands beyond the first pair in a narrow.
This was fixed by iterating through each operator-operand pair individually.
This commit hides sidebar menu option button instead of showing
it with "Mark all messages as read" option, for home view when
there are no unread messages.
This commit serves as the base commit for redesigning the alert banners
by migrating them to use the new banner component. We use a new name
to refer to these banners — "Popup banners", which is more descriptive
about their behavior.
The Popup banners are appended to the container in a stacking order,
i.e., the most recent popup banner appears on the top and the oldest one
is sent to the bottom of the stack. These banners also inherit the
animations from the alert banners for visual appeal.
This commit also fixes the bug where clicking on the "Try now" button
in the popup banner resulting from an error in the `/json/messages`
endpoint resulted in call to restart_get_events in server_events.js
instead of load_messages in message_fetch.ts.
Fixes#31282.
Removed `is_billing_admin` user property as it is no longer used since
billing permissions are now determined by `can_manage_billing_group`
realm setting.
Updates narrow_state.stream_id to have a boolean parameter, that
defaults to false. When true, the function will return an ID or
undefined based on the stream data that we have. When false, the
function will return the operand of the channel narrow term when
it's a valid number or undefined if it's not.
Replaces all uses of narrow_state.stream_sub()?.stream_id to
instead use the updated stream_id function with only_valid_id set
to true.
When the channel operand would return NaN for the ID value, we now
return undefined, so that there is only one invalid value being
returned by narrow_state.stream_id.
This function is called when entering a message feed view. Therefore,
it should always have a defined MessateListData filter.
Follow-up clean up from reworking the home view to use a Filter
object.
Renames is_for_stream_id to narrowed_to_stream_id, and updates it
to use narrow_state.stream_id for the comparison check instead of
getting the full StreamSubscription object.
Previously, when searching for extremely long queries,
they would overflow beyond the screen.
This commit fixes the bug by ensuring that long
search queries do not overflow.
Fixes: #29568
This commit enables topic suggestions for
channel links of the format
[#channel name](path)>some topic.
Previously no typeahead suggestion was shown
for above format.
Selecting a topic will result in link of format
[#stream name > topic name](topic path)
Typing `>` after the fallback md stream link also
shows topic suggestions, parallel to the standard
Fixes#32556
This does lookups by email address, which is very much a legacy way to
do things, and could throw exceptions if trying to lookup details on
an unknown user ID.
This is a pre-commit to add the function
"format_array_output_based_on_and_preference()" which will take
two parameters- string array and a boolean whether we want and
based output or not. This function return a string formatted
using Intl.ListFormat.
Previously, for spectators, when a negated search operator was
present, navigating forward or backward triggered the "signup/login"
modal.
This commit fixes this issue.