This contains two more complex changes:
- The default versions of sorter and matcher assume that ItemType is a
string. But the Typeahead class works on a generic ItemType and I'm
not aware of a way to assert that this function is only called for
typeaheads with string items. For `matcher`, we can assert that the
items are strings. `sorter` is now a required option instead of an
optional one that could fall back to the default.
- `element` can be either an `input` element or a `contenteditable`
`div`. We distinguish between them using `.is("[contenteditable]"))`
but TypeScript doesn't understand that. So we replaced `this.$element`
with `this.input_element` where `input_element` is an object with the
`$element` and also a `type` specifying which type of element it is
(input or contenteditable).
`final_items` is a list of `ItemType` so it doesn't
make sense to wrap it in `$()`. Intead of creating a
"jquery list of objects", we generate a list of JQuery
objects. I also removed the unused `_index` in the
`map` call.
`this.source` will always be of type `function`,
so we can remove the ternary statement. And `source`
always takes one argument, so we can remove the
second argument.
As explained in the comment, when we're moving the server plan to the
remote realm's Customer object, the realm Customer may not have
stripe_customer_id set and therefore that value needs to get moved from
the server Customer.
puppet hard-fails if it can't find the binary to run in `$PATH`, so we
need to make the `unless` short-circuit to false if puppet itself is
not installed yet (as during initial installation).
Previously, "This profile field is required." tooltip was visible on
all custom profile fields, including those that were not required.
This commit fixes that by targeting only the required fields.
This package is replaced by libmagic1t64 1:5.45-3 for the Ubuntu
64-bit time_t transition, but hasn’t been deleted from the archive
yet.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Earlier, DM row remained highlighted when narrowed to different
part of left sidebar other than recent and inbox since on narrow
event, `handle_narrow_activate` wasn't properly handling unnarrow
events. It wasn't calling `update_private_messages` to update the
state of the DM list.
This commit fixes the behaviour by updating the state on narrowing
away from DM rows.
Fixes: zulip#27698.
Co-authored-by: Rinwaoluwa <peterodejobi9@gmail.com>
Earlier when users narrowed to recents or inbox, message_list.current
was updating to last dm row selected for first few filter checks in
'narrow_state' which in turn would set active_user_ids to last dm
row selected. This resulted in DM highlight lingering.
The narrow_state.filter is supposed to return undefined when narrowed
to recents or inbox.
This commit fixes the behaviour by setting 'current' undefined before
filter checks on narrow.
Fixes part of #27698.
The test data was not the correct representation of submessage's
content field. This caused the zod schema to throw error.
This is a temporary solution and eventually we have to move to an
efficient approach making the test data more representative and
accurate.
Discussion:
https://chat.zulip.org/#narrow/stream/6-frontend/topic/TypeScript.20migration/near/1766122
The 'events' array in 'get_message_events' is made of objects.
Each object has 'data' field which is of type 'any' because
'JSON.parse' returns 'any'. We need to parse it using zod
to add type-safety.
The reason I am parsing the entire array at once is because,
'events' array is made of objects of two different schema; and
the order matters. The first element is of different schema than
the rest.(.tuple().rest() used is for that purpose).
This validates the entire submessage content before it is passed to
'widgetize.ts'.
We need to validate the events array in 'submessage.js' using
zod. One of the schema needed is 'zform_widget_extra_data_schema'
in zform. If we import it inside 'submessage', it creates a
dependency cycle ; zform.js=>transmit.js=>server_events.js=>server_events_dispatch.js.
server_events_dispatch.js=>submessage.js=>zform.js
Hence I have moved the schema inside 'submessage' and imported it
inside 'zform.js'.
We sent entire 'events' array to 'widgetize.activate' and then
removed its first element(using .shift()); instead we should
send only relevant data ie. the entire array after the first element.
This also helps us avoid an extra check in node tests.
This commit refactors code to handle authentication methods
so that we need not update the type returned for
"realm_authentication_methods" by get_property_value
to be something different than what is the type for
realm object.
This change essentially means that we do not use the value
returned by get_property_value for authentication methods and
directly call realm_authentication_methods_to_boolean_dict.
Follow up to #29264.
Earlier, if a free plan (say legacy plan) with no next plan scheduled
was invoiced, we used to send an invoice overdue email if the last
audit log update is stale.
Actually, we don't need this data as the invoice step is just going
to downgrade the current plan. We should not wait for customer to
start uploading data in this case. Skip the email sending step and
invoice the plan to downgrade.