Names like “delegate”, “Instance”, “Placement”, “Props”, and
“ReferenceElement” are much too generic to make sense as named
imports.
The downside is that we now need to write tippy.default(…) instead of
tippy(…) (because ES module namespace objects cannot be callable), but
that cost is worthwhile.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit extracts various methods called post the current
message list is updated in "narrow.js" such as update_unread_banner,
handle_post_view_change, etc. into a separate method --
"handle_post_message_list_change".
This allows us to be able to call these methods independently
in case we need to update the filter and the corresponding
message lists.
This is a preparatory commit to #30114.
The 'Select channel' dropdown in 'Add default channels' modal is
the LAST dropdown element on the modal and it does not contain
`data-stream-id` attribute.
.attr('data-stream-id') would return undefined for this element
and as a result the returned `Set` would have its last element a
`NaN` --- passing a `NaN` inside 'data' field of 'channel.post' threw
an error.
We tweaked the selector string to selectively map over the elements with
'data-stream-id' attribute.
Also we removed '.toString()' converting stream-id to a string (stream-id is a
'number' type).
This reverts commit eada57921e.
This does have CSS applied to it via webpack.
See
```
new HtmlWebpackPlugin({
filename: "5xx.html",
template: "html/5xx.html",
chunks: ["error-styles"],
}),
```
There was a stale comment here saying we needed to do this for
private messages too, but `convert_message_topic` only modifies
`message` if its type is "stream".
Previously we relied on `echo.reify_message_id` to set the new
`id` and `locally_echoed` value, but it was setting this on
the message stored in `waiting_for_id`, which isn't guaranteed
to be the same as the message in the message store. Once
`process_new_message` stops mutating the message it gets and
returns a new message object, this would have caused a bug.
We already changed callsites in the codebase to use the message
returned from `process_new_message` instead of assuming the raw
message passed in will be mutated. This fixes a few remaining tests.
Since this file doesn't link any stylesheet, no CSS is applied to
these classes.
Tested change by pasting the content of it in `link_malformed`
and rendering that template using a malformed email confirmation link.
Use user events to update profile tab for a
synchronized experience across all users.
Fixes#26692.
Co-authored-by: Kunal Sharma <v.shm.kunal@gmail.com>.
Co-authored-by: Angelica <angelica.ferlin@gmail.com>.
Prevents modal from closing when `Save changes` is clicked
after editing a profile field. Also, disables the `Save changes`
button until at least one field has been edited.
Fixes part of #26692.
Co-authored-by: Kunal Sharma <v.shm.kunal@gmail.com>.
Co-authored-by: Angelica <angelica.ferlin@gmail.com>.
In `custom_user_profile_fields.hbs`, the name attribute has been
introduced to profile fields to facilitate the future use of the
`get_current_values` function in retrieving field values.
Fixes part of #26692.
Co-authored-by: Kunal Sharma <v.shm.kunal@gmail.com>.
Co-authored-by: Angelica <angelica.ferlin@gmail.com>.
This commit separates the `get_current_values` function from the
`launch` code, allowing it to be exported and utilized independently.
Fixes part of #26692.
Co-authored-by: Kunal Sharma <v.shm.kunal@gmail.com>.
Co-authored-by: Angelica <angelica.ferlin@gmail.com>.
When navigating "back" or "forward", the left sidebar state
should be restored.
Earlier, "more topics" expanded was not considered a distinct
state.
This commit makes it possible to correctly place you in the
"more topics" view or not, depending on where you were.
Fixes#29548.
We use "prop-element" class only to handle save-discard widget
and not anywhere else, so there is no need to have this class
for elements that do not use save-discard widget.
This commit refactors code to handle realm authentication methods
in a better way. We remove the get_complete_data_for_subsection
function and instead let populate_data_for_request handle the
request data for authentication methods.
We also remove the "prop-element" class from each authentication
setting checkbox and instead add it to the container div as a
the list of those checkboxes represent a single field, i.e.
the realm_authentication_methods field received from the server
and the authentication_methods field sent to 'PATCH /realm'
endpoint.