Commit Graph

3922 Commits

Author SHA1 Message Date
evykassirer bedbaa3a41 message_view_header: Convert module to typescript. 2024-04-01 13:22:39 -07:00
Afonso Azaruja e217d35ccd link_preview: Fix extraneous shadow.
Fix extraneous shadow at bottom of link preview
in stream messages in dark theme, in private
messages for both themes and in mentions, group
mentions and direct mentions.

This is done by applying the same color, used
in the background, to the shadow. There are CSS
variables that hold the values of the background
color.

Fixes #28853.
2024-04-01 13:06:42 -07:00
Aman Agrawal d21f5c9b75 registration: Ask user how they found Zulip. 2024-04-01 12:44:12 -07:00
Aman Agrawal 293992fe60 portico: Enable tippy tooltips for all portico pages with common style. 2024-04-01 12:44:12 -07:00
sujal 6ee354ddd6 bot-url: Reset to blank state when integration type is changed.
If the integration type is changed in the modal, resets the values
for the stream, topic and events parameters to a blank state.
2024-04-01 11:39:03 -07:00
sujal fbcf31c9e0 bot-url: Add event filtering UI to generate bot URL modal.
Adds an option to the generate bot URL modal to filter for events
that will trigger notifications. This option is conditionally
displayed when only `all_event_types` is defined for the selected
integration.

If selected, the URL will display all events by default. There
are "check all" and "uncheck all" buttons to easily include or
remove all the events from the URL.

Fixes #27628.
2024-04-01 11:39:03 -07:00
sujal a61c06c425 bot-url: Disable stream dropdown widget when no integration is selected.
Previously, the stream dropdown remained active regardless of whether
an integration type was selected.
This commit addresses the issue by disabling
the stream dropdown widget when no integration type is selected
2024-04-01 11:39:03 -07:00
sujal 030fbfc3b7 bot-url: Remove topic if include topic option unchecked.
Previously, when a topic name was included in the URL
and the user unchecked the button for including a
topic, the URL was not being updated accordingly.

Expands the check for setting the topic parameter for
the topic not being an empty string and having the
include topic option checked.
2024-04-01 11:39:03 -07:00
N-Shar-ma 6f7e030eb2 compose: Increase gap between Draft button's text and the counter. 2024-04-01 13:31:15 -05:00
N-Shar-ma 13df423ae1 compose: Adjust alignment and size of Drafts button at smaller widths.
The padding on the sides of the Drafts button is reduced from 5 to 3px
at smaller width, so that it's not right up against the textareas when
hovered.

The text is also aligned to the Send button's edge, like at larger
widths.
2024-04-01 13:31:15 -05:00
Aman Agrawal 0b589ac70d emojisets: Retry fetch for emojiset in case of network failure.
Fixes #25964

We can fail to load emojiset if browser is unable to connect to
internet or fetch failed midway due to a network error. We simply
wait for browser to come back online and retry.
2024-04-01 10:18:58 -07:00
evykassirer 9c055df695 settings_user_topics: Convert module to typescript. 2024-03-30 16:25:34 -07:00
evykassirer 741b8c308a user_topics: Always store stream name in UserTopic. 2024-03-30 16:25:34 -07:00
abdelrahman725 b0a4b8e439 passwords: Add keyboard accessibility for show/hide password icons.
Tweaked by tabbott to add the required tabindex configuration in the
password reset, password change, and registration forms as well.
2024-03-30 16:16:27 -07:00
evykassirer a43e9140f2 search: Convert module to typescript. 2024-03-30 15:27:02 -07:00
evykassirer c118d66943 typeahead: Rename input element type to be more specific.
This will be exported in an upcoming commit and a more
specific name will make more sense when using this type
in other files.
2024-03-30 15:27:02 -07:00
evykassirer 5cb32fe733 pill_typeahead: Simplify fake this objects. 2024-03-30 10:41:38 -07:00
evykassirer fc3ab45b46 typeahead: Pass input element to source instead of using hacky this. 2024-03-30 10:41:38 -07:00
evykassirer bdf4449ebf typeahead: Pass input element to updater instead of using hacky this. 2024-03-30 10:41:38 -07:00
evykassirer 9f83d14fb7 pill_typeahead: Use query passed to source instead hacky this. 2024-03-30 10:41:38 -07:00
evykassirer b4299d99fd typeahead: Pass query to updater instead of using hacky this. 2024-03-30 10:41:38 -07:00
evykassirer f0578c318c typeahead: Pass query to sorter instead of using hacky this. 2024-03-30 10:41:38 -07:00
evykassirer 9fc6793809 typeahead: Pass query to highlighter_html instead of using hacky this. 2024-03-30 10:41:38 -07:00
evykassirer cf9cf14dde typeahead: Pass query to matcher instead of using hacky this. 2024-03-30 10:41:38 -07:00
evykassirer 1f059f5906 composebox_typeahead: Use local `token` instead of typeahead `this`. 2024-03-30 10:41:38 -07:00
evykassirer ba41eace94 composebox_typeahead: Use local `completing` instead of typeahead `this`. 2024-03-30 10:41:38 -07:00
evykassirer c7b12c996c typeahead: Convert module to typescript.
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).
2024-03-30 10:41:38 -07:00
evykassirer 3f5be23854 typeahead: Clean up render function.
`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.
2024-03-30 10:41:38 -07:00
evykassirer 6aee4f270e typeahead: Simplify call to `this.source`.
`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.
2024-03-30 10:41:38 -07:00
evykassirer 954da81f4c typeahead: Replace this.options with direct fields on Typeahead. 2024-03-30 10:41:38 -07:00
evykassirer 5bcb4e55d8 desktop_notifications: Convert module to typescript. 2024-03-29 16:16:47 -07:00
tnmkr 79cc7db315 tooltips: Fix incorrect "required" tooltip on custom profile fields.
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.
2024-03-29 12:35:01 -07:00
adnan-td 87dee7a9b2 invite_user_modal: Replaced email text_area with input_pill.
This makes the widget considerably more attractive, and probably a bit
more usable.

Fixes #29391.
2024-03-29 11:13:03 -07:00
adnan-td 97cbf4e075 input_pill: Renamed removePillFunction to onPillRemove. 2024-03-29 11:13:03 -07:00
Tim Abbott 6be511ed48 invite: Use error status for failed invitation attempts. 2024-03-29 11:13:03 -07:00
Anders Kaseorg 2c13d0e43d eslint: Fix @typescript-eslint/no-unnecessary-type-assertion.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-29 09:37:38 -07:00
Anders Kaseorg 26ae533985 eslint: Fix @typescript-eslint/prefer-optional-chain.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-29 09:37:38 -07:00
Anders Kaseorg 4935276aa4 eslint: Fix @typescript-eslint/use-unknown-in-catch-callback-variable.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-29 09:37:38 -07:00
Anders Kaseorg 8f07d830f2 narrow_state: Remove unused narrowed_to_search, narrowed_to_starred.
They’re unused as of commit de0db7ad1a
(#28636).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-29 09:37:38 -07:00
Pratik Chanda 0708505acb left_sidebar: Fix DM row highlight linger on narrowing away.
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>
2024-03-28 14:09:04 -07:00
Pratik Chanda 8c89725fcc views: Fix message_list.current not updating to undefined on narrow.
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.
2024-03-28 14:09:04 -07:00
afeefuddin da80afd6f4 lightbox: Convert module to TypeScript. 2024-03-28 13:56:56 -07:00
afeefuddin 59c761fe32 lightbox: Pass HTMLElement consistently to parse_media_data. 2024-03-28 13:56:56 -07:00
afeefuddin 97d372c837 lightbox: Use ".append" to append nodes instead of ".html". 2024-03-28 13:56:56 -07:00
afeefuddin ce3e609d90 lightbox: Remove unneeded unit test. 2024-03-28 13:56:56 -07:00
N-Shar-ma 46147cd13c copy_and_paste: Add documentation for keyboard shortcuts for pasting.
Fixes: #29209.
2024-03-28 13:07:34 -07:00
N-Shar-ma 7895b05284 turndown: Enable turndown in production. 2024-03-28 13:07:34 -07:00
Varun Singh c29fbeca94 widgetize: Refactor type for 'extra_data'. 2024-03-28 12:59:58 -07:00
Varun Singh 894756addc submessage: Replace bogus test data with valid objects.
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
2024-03-28 12:59:12 -07:00
Varun Singh f1db30418b submessage: Convert module to TypeScript. 2024-03-28 12:59:12 -07:00