The `update_new_direct_message_button` function sets the text for the
new DM button to "New direct message" on every update cycle, which makes
no difference since the button starts with that text and never changes.
This adds the "New direct message" button back in the closed compose UI
for DMs view, to make the closed compose UI consistent across the app.
Since the closed compose UI is always visible, and one that is likely
to be used frequently, it makes sense to have the same UI across all
the views to avoid the mental overhead of figuring out how to compose
a message in different views.
This keeps the first item focused when user uses keyboard.
User can still move the focused item using mouse and click to select it.
Highlighting an item via mouse and then pressing enter would select
the highlighted item.
We change the code to update the visibility of information
density setting inputs only on successful completion of
request and not on receiving events.
Visibility of inputs is not being live updated on receiving
events because that leads to flashing of inputs when deselecting
the "Compact mode" checkbox due to the data being sent in
different events and data with the client being different for
time till the all events are received.
Previously, if someone changed the font-size or line height
settings to some value other than the legacy values, we set
dense_mode to False if it was True. This commit changes the
code to require clients to pass dense_mode as False in such
cases and raise an error otherwise.
We should flush the cache after commiting changes to DB to
make sure that the cache does not contain stale data when
updating multiple settings in a single request.
Bug:
A tooltip appears on hovering over a control button in the
message edit form. Now when the form was closed either using
Esc key (cancel) or Enter / Ctrl + Enter (save), the tooltip
didn't disappear. This resulted in a random tooltip visible
in the message list view.
Fix:
Since tippyjs doesn't hide tooltip even after the element is
hidden we need to explicitly hide the tooltip in those cases.
See https://github.com/atomiks/tippyjs/issues/938
This commit fixes the above mentioned bug by explicitly hiding
the tooltip instance.
Earlier the `generate integration url` button (fa-link) was still in
focus even after opening the modal.
This caused the modal to open multiple times when the user pressed the
enter key. This commit fixes that issue by focusing on the input
dropdown when the modal is opened.
Earlier the `Add a new emoji` button was still in focus even
after opening the modal. This caused the modal to open multiple times
when the user pressed the enter key. This commit fixes that issue by
focusing on the input field when the modal is opened.
Earlier the `edit` button was still in focus even after opening the
modal. This caused the modal to open multiple times when the user
pressed the enter key. This commit fixes that issue by placing the
carat at the end of the first input field when the modal is opened.
Earlier the `change your password` button was still in focus even
after opening the modal. This caused the modal to open multiple times
when the user pressed the enter key. This commit fixes that issue by
focusing on the input field when the modal is opened.
Instead of the PUSH_NOTIFICATIONS_BOUNCER_URL and
SUBMIT_USAGE_STATISTICS settings, we want servers to configure
individual ZULIP_SERVICE_* settings, while maintaining backward
compatibility with the old settings. Thus, if all the new
ZULIP_SERVICE_* are at their default False value, but the legacy
settings are activated, they need to be translated in computed_settings
to the modern way.
Fixes#30918.
This commit also adds a paper plane icon under `send-dm.svg`. `dm` is
used instead of `direct-message` to opt for brevity when using the
icons.
Fixes part of #30918.
We don't need `align-self: baseline;` for `fa-envelope` set in
`message_view_header` since this is a different icon and it appears
better without it like other icons.
We also don't need the explicit font-size for switching b/w 14px and
16px mode since `zulip-icon` class takes care of that by default.
This commit updates the banner text in the case of message sent
while in search view to match the narrow_to_recipient_banner text
displayed in other cases.
Earlier, on sending a message while narrowed to a search view
'!can_apply_locally()' resulted in error during local echo.
Reason:
In 'insert_new_messages' the call to 'maybe_add_narrowed_messages'
needs message ID to make a GET request to '/messages/matches_narrow',
but during local echo message ID is not available. We were using
'local_id' (a float) resulting in 400 error response.
Fix:
This commit fixes the bug by skipping the discussed GET request
during local echo.
Earlier, on sending a new message in a search view it didn't
appear in that view for the sender.
This was because the message event received by the sender
was processed by 'msg_list.view.rerender_messages' which
effectively did nothing because the message is not
rendered in the first place during local echo in that
message list view.
We can't determine locally if the message should be added
to the search narrow. So, we use maybe_add_narrowed_messages
when narrowed to such views.
This fixes the bug and the message appears in the search view.
We had to specify margin-bottom as 10px separately for
`modal_password_input`, `password_visibility_toggle` and
`settings-forgot-password` classes. We've added a div that encapsulates
all these 3 elements which are meant to be in the same row and gives it
a common margin-bottom.
This is a refactor commit.