Earlier when compose box was opened or narrowed to pm, the recipient
pills were sorted according to user email strings instead of their
full names which was inconsistent with compose box placeholder text,
recipient row and message header.
This commit fixes the behaviour by introducing a `sort_email`
function to sort emails according to their full names and display
sorted pills.
Fixes: zulip#27375.
Co-authored-by: richardshaju <richardshaju66@gmail.com>
Earlier in drafts overlay, the order of pm recipients for the draft
was sorted differently to that of the pm group title.
This commit fixes the behaviour by sorting the drafts pm recipients
using `make_strcmp`.
Fixes part of zulip#27375.
Co-authored-by: richardshaju <richardshaju66@gmail.com>
Earlier in left sidebar, the recipient names were not sorted
consistently with the message header of the pm.
This commit fixes the behaviour by sorting the recipient names in
left sidebar with `make_strcmp`.
Fixes part of zulip#27375.
Co-authored-by: richardshaju <richardshaju66@gmail.com>
Earlier, in group direct message, the full names of group pm recipients
were sorted incorrectly which is used for tooltip on hovering over
recipient row and text placeholder of collapsed compose box. That
resulted in different order of recipient names.
This commit fixes the behaviour by using the `make_strcmp` to sort
the names to show in the tooltip and collapsed compose box.
Fixes part of zulip#27375.
Co-authored-by: richardshaju <richardshaju66@gmail.com>
Earlier, when narrowed to a group direct message, the header title
was sorted with respect to its email instead of their names. This
would result in message header and recipient row having different
order of recipients.
This commit fixes the behaviour by changing the order of the names
passed for the group message header using `make_strcmp`.
Fixes part of zulip#27375.
Earlier, the order of recipients in recipient row of group direct
message weren't in the same sorting pattern as that of message
title which would result in inconsistent order of recipient names.
This commit fixes the behaviour in `private_message_header` in
recipient row to sort the names using `strcmp`.
Fixes part of zulip#27375.
Co-authored-by: richardshaju <richardshaju66@gmail.com>
This also moves the 2px of reduced lefthand padding to the overall
width of the left sidebar, which will keep the left sidebar at its
same width (in other words, the message area will not shift any
further to the left, either).
Fixes#27565
This is part of a bigger refactor to calculate message container
attributes just from the message, so that we can create the message
container all at once instead of piecewise, to be able to convert
to typescript.
Where "pure function" means that the group's value isn't changed
in this function.
This commit also modifies the function to just take a message.
This is part of a bigger refactor to calculate message list group
attributes and creating the group all at once instead of piecewise.
This is necessary to convert this module to typescript, since a
partially formed group is hard to type.
This is part of a bigger refactor to calculate message container
attributes just from the message, so that we can create the message
container all at once instead of piecewise, to be able to convert
to typescript.
This is part of a bigger refactor to calculate message container
attributes just from the message, so that we can create the message
container all at once instead of piecewise, to be able to convert
to typescript.
This is part of a bigger refactor to calculate message container
attributes just from the message, so that we can create the message
container all at once instead of piecewise, to be able to convert
to typescript.
We're going to need to be able to build the message list view
in pieces and put it all together in the end, instead of assigning
values directly to a half-formed object (which is hard to type).
This is part of the work towards that.
When we convert this module to typescript, the type of `rendered_date`
will need to be a valid input to `$element.html`. Elsewhere in this
file, the date is a string. Here it's a JQuery object, which isn't
a valid input, but HTMLElement is, so this commit converts it to that.
I tested this manually and it still renders correctly.
This commit adds '*' as a keyboard shortcut to navigate to the starred messages view and the shortcut is documented in various required locations accordingly.
Fixes#31397.
It is better to have stream dropdown option value, which is the ID
of the stream, to be of "number" type.
This fixes the assertion error which occurred when someone tried to
subscribe the user to a stream from user profile modal.
This commit updates code to live update the groups UI if
realm or group level setting to manage groups is changed.
This commit also does some refactoring to better organize the
code in different functions.
And also, the code to hide/disable the UI if the user does not
have permission to manage the group in JS such that the same code
is used for live-updating as well.
This commit fixes the live update of subscribers list
on changing can_remove_subscribers_group setting.
Previously, whole members panel, including the pill container
to add subscriebrs, is re-rendered. But the click and input
handlers for the add subscribers UI is not added again after
re-rendering and thus they do not work.
This commit updates the code to just re-render the subscribers
list which is only needed to update the "Unsubscribe" button.