Updates warning string when linking to a private stream/channel when
composing a message in the web app to use channel instead of stream.
Updates error banner when using a stream/channel wildcard mention
when composing a message in the web app to use channel instead of
stream.
Part of stream to channel rename project.
Updates the translated strings in filter.ts to use channel instead
of stream.
The updates to the untranslated search streams will be done in a
separate commit.
Part of the stream to channel rename project.
Updates a chunk of translated strings that overlap between files,
with the streams settings overlay being the starting point for
finding these strings, to use channel instead of stream.
Part of stream to channel rename project.
Updates translated error and warning strings when creating a new
stream in the web app to use channel instead of stream.
Part of stream to channel rename project.
Updates the translated empty narrow messages in the web app to use
channel instead of stream.
Updates the message view header that has the same text as the empty
narrow when a stream/channel does not exist or the user does not
have access to the stream/channel because it is private.
Part of stream to channel rename project.
Updates hash_util.decode_operand to handle a URL with channel and
the stream name and ID encoded in the URL.
For example "/#narrow/channel/12-test" where 12 is the ID of the
stream named "test".
Part of stream to channel rename project.
"Stream events" field in "Stream details" section uses hardcoded
link for "stream events" topic. This link breaks if the organization
language is set to something other than English and the "stream events"
topic has a translated name. The field also does not handle scenarios
where the organization switched languages and thus "stream events"
topic is in different languages depending on when the stream was created.
Additionaly, we are currently undergoing a major change to rename
"Streams" to "Channels" and as part of this change "stream events" will
be renamed to "channel events". We currently don't have a plan for
linking these together or moving messages to the new topic.
Keeping these points in mind, it is best to remove this field for now.
This expresses the height of the message row without need of
margical margins.
Extending the correct line-height to timestamps also means that
single-line messages will be the height of their combined content
and padding, and not erroneously held open by an oversize 28px
timestamp line-height.
Those corrections mean, too, that .message-time only needs to have
its line-height declared a single place, regardless of context.
A confirmation toast is shown when a message is moved
using the "Move only this message" option. The toast
contains the link to the new location of the message.
Fixes#29702
The variable `select_stream_id` was assumed to be of type number when
it actually was of type string. A strict equality check was performed later
down in the code between `select_stream_id` and `current_stream_id`
(which is of type number).
This commit converts the variable `select_stream_id` to type number.
This establishes the same 5px bottom margin on all Markdown
elements, which will aid in converting such values to variables
as part of the information-density project.
Because paragraphs have a 3px bottom margin, the 2px top margin
on ordered and unordered lists would collapse into it, for 3px
of space total. So setting 0 on these special selectors has no
effect.
A single call to this function doesn't have a material performance
impact when tested with 20k messages while scrolling in combined feed
view; likely because only 400 messages can be in the structure at any
give time given render windows.
But calling this in a loop somewhere would be a bad idea.
We want to make it easier to find stream details such as creator,
creation date and stream id. The commit replaces the "Email address"
section in General tab of stream overlay with a new section called
"Stream details", "Email address" is now a field in this section.
If the stream does not have a creator, we only show the stream creation
date in creation details.
Fixes: #25648.
This is a prep commit to add a .pill-label wrapper around .pill-value
and other flair text. This extra flexbox structure will help us
vertically align this pill with surrounding text when adopting it to be
used inline.
We also introduce a new class to target this pill. The intention is that
this will more descriptive than contextually styling .pill-container.
This is so that it better matches existing buttons in this overlay. For
example the "Reset to default notifications" button in Personal tab.
This is a prep commit.
Update the tooltips for the "Cancel" and "Spinner". Provide clear
information about the draft saving behavior when a message fails to
send successfully.
Fixes part of #29100.
Previously, links were displayed for the user's name,
but now they are presented as pills. These pills are rendered
using the user_display_only_pill.hbs template.
To obtain the avatar of a user,
the small_avatar_url_for_person function is utilized.
The term 'subscriber' might be misleading as it doesn't accurately
reflect the purpose of the list, which simply contains all users
within the organization. To enhance clarity and maintain consistency,
I've replaced the classname 'panel_subscriber_member_list'
with 'panel_user_list'.
This function now accepts an argument for message content in the
message object returned and use compose_state.message_content()
to preserve the behavior for existing callers.
Preparation for #28626
Renamed the function to position_inside_code_block and changed the
parameters to accept a string and number (index), and check if the
position in the string is inside a code block (as per previous logic).
Preparation for #28626.
This could happen e.g. when quote-replying a message,
because we open the composebox before adding the quote
reply content. We need to make sure that we don't restore
a draft when opening the composebox, because otherwise
that draft will be replaced with the quote reply.
This will let us initialize the data before the UI is ready
to be initialized. We'll need to do this in an upcoming commit
where we clear a flag on page load before the reload code
initializes.
If a user starts typing before they see that a draft was restored,
this makes that experience a little smoother by adding some
separation between the old draft and the new text.
Now when the user opens a narrow that has a draft saved for
that particular conversation, the draft will automatically
be restored in the compose box. This will make it easy to
return to a draft after clicking away, and also will make
it less confusing when people close the compose box by
accident. Note that this only restores the draft when
there is a full recipient specified (stream and topic,
or at least one PM recipient).
Fixes part of #18555.
Fixes#11218 and #17396.
We used to keep the draft, assuming that clearing the composebox
was an accident. Now we want to delete the draft, in preparation
for auto-restoring drafts when opening the composebox for narrows
with drafts associated with them. If a user opens the composebox
and sees a draft they don't want anymore, clearing the box is a
way we expect them to try to delete it.
Previously, the sorting was broken due to
incorrect referencing of the property.
The code has been updated to use the "referrer_name"
property instead of "ref".
It's possible that for a given narrow event if we didn't fetch any
messages in the `num_after` or `num_before` space, we could have
arrived at `newest` or `oldest` messaged based on the `anchor` used.
This fixes the bug where `fetch_status` for `found_newest` didn't
update to be `true` when using `newest` anchor and `num_after = 0`.
We forgot to restore the date on sticky header if the header
is no longer sticky.
Reproducer:
* Have two messages with same sender on different dates next to
each other in a stream narrow.
* Scroll so that sticky header is on the 2nd message.
* Scroll down fast so that to avoid us capturing the sticky header
over the first message.
* Scroll up slowly so to see the group header of the messages have
the date of the second message.
In commit 449febf036, the tooltip that provided information about
the announcement stream was replace with inline text on the form.
Removes the now unused template and code in stream_create for this
tooltip.