Commit Graph

4695 Commits

Author SHA1 Message Date
Anders Kaseorg ebd4468a81 drafts_overlay_ui: Convert .data("draft-id") to .attr.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-07 12:57:14 -07:00
Anders Kaseorg 49e1c919c3 drafts: Convert .data("draft-id") to a module variable.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-07 12:57:14 -07:00
evykassirer 3cad639a82 typeahead: Add textarea input type for the composebox. 2024-05-07 11:12:01 -07:00
evykassirer 9cb9733f71 composebox_typeahead: Remove unused second argument to caret(). 2024-05-07 11:12:01 -07:00
evykassirer 67eaf55c56 composebox_typeahead: Use startsWith. 2024-05-07 11:12:01 -07:00
evykassirer 181e05ede7 composebox_typeahead: Always return list from get_sorted_filtered_items.
`source` is expecting a list so `false` doesn't make sense here.
It was working before because the code that calls `source` in
`bootstrap_typeahead` just does falsey checks.
2024-05-07 11:12:01 -07:00
evykassirer 3a67b96966 composebox_typeahead: Return undefined from filter_mention_name.
This feels more semantically correct than returning false.
2024-05-07 11:12:01 -07:00
Aman Agrawal 3ffffd77ff stream_popover: Fix broken move topic to stream popover.
`data("typeahead").unlisten()` of move topic to stream popover
crashed since we removed `data('typeahead')` in #29973.
2024-05-07 09:16:34 -07:00
Pratik 982097f0a7 user_profile_modal: Change "edit" icon and "copy link" icon.
This commit replaces the fontawesome "edit" and "copy-link" icon found
in the user profile modal with the corresponding zulip icons.

It also moves the functional classes like
user-profile-manage-own-copy-link-button from the icon element to its
container, including adding a new div wrapping the icon in
user-profile-manage-others-edit-button.
2024-05-06 18:14:40 -07:00
Pratik 3b2bf7b2b9 modal_css: Refactor css of header of user profile modal.
This commit enhances the layout of user profile modal header by using
flexbox properties.
2024-05-06 18:14:40 -07:00
Pratik fdbce9d889 profile_modal: Replaces underscore style classes with hyphenated one.
This commit replaces the underscore-style classes of user profile modal
with the hyphenated one.
2024-05-06 18:14:40 -07:00
Anders Kaseorg 467e5a4361 drafts: Fix implicit use of any.
Attempting to convert .data("draft-id") to .attr mysteriously breaks
draft saving, so I’ll leave that for future work.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 16:12:27 -07:00
Anders Kaseorg 3fc5800d53 compose_ui: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 16:12:27 -07:00
nimishmedatwal acf13e49cf rendered_markdown: Fix code getting copied when visiting playground.
Fixes #29844.
2024-05-06 15:50:39 -07:00
Anders Kaseorg 20e4659e68 portico header: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 15:02:45 -07:00
Anders Kaseorg 34c465e475 portico header: Remove nonsense _full-height-no-scroll code.
e.target is the wrong element, and even if this were to successfully
add the _full-height-no-scroll class to <body>, that’s not a child of
.portico-hello-page.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 15:02:45 -07:00
Anders Kaseorg 0315c22c97 portico header: Delete bogus change handler.
Its selector looks like it’s missing a ‘.’, but “fixing” it breaks the
page even more, and trying to decipher this mess of event handlers
that poorly replicate what should be native behavior is making my
brain hurt.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 15:02:45 -07:00
Anders Kaseorg 0a30bb9ee8 message_edit_history: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 15:02:45 -07:00
Anders Kaseorg 0c11a842c1 bootstrap_typeahead: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 15:02:45 -07:00
Anders Kaseorg 7360fd2a67 bootstrap_typeahead: Remove create and lookup API.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 15:02:45 -07:00
Anders Kaseorg acf93eac4b bootstrap_typeahead: Store values in a WeakMap.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 15:02:45 -07:00
Anders Kaseorg 328f246092 ui_report: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg 5b92fbacaa stats: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg 70d140ec59 settings_linkifiers: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg 515eecd15c reactions: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg 298b1aa1e6 signup: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg c53c7cb929 invite: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg b59b3f6952 channel: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg 7b48b7e4e5 settings_linkifiers: Avoid mutating the response object.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg e23f81c72c settings_linkifiers: Fix array/string confusion.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg 7fb19cff98 upgrade: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg 8ec694a854 sponsorship: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg fbfdc19cc0 billing helpers: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg d1e2fefad2 billing: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg 719ff6d79c settings_components: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg 1bde66242c popover_menus: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg bde758c8ae scroll_util: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg 897dffa598 poll_modal: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg b054050ee8 unread: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg 6ed50d1c80 e2e-tests: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg 819bccfec1 submessage: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Karl Stolley 2f4988c67c left_sidebar: Correct vertical alignment on 'more conversations.' 2024-05-06 09:54:36 -07:00
Aman Agrawal dc216090d2 narrow_state: Fix combined feed narrowing near msg id of muted message.
Combined feed always narrowed to the first unread id regardless
of if it was muted or not since we were not actually using the msg_id
that we found after all the hard work of doing all the checks for it.
2024-05-06 09:36:37 -07:00
Aman Agrawal 4efcc33dc2 echo: Remove checks on current message list.
Originally, we only wanted to do local echo in the current
view. However, now that we're looking at navigating the user to the
conversation that they send a new message to, it's going to be quite
common that we immediately visit a destination different from the
current view, where local echo in that different view would be
valuable.

The most interesting block was added in
af188205cb / #8989. But in
6637f2dbb7, the key logic for checking
`msg_list.data.fetch_status.has_found_newest` was duplicated in the
`add_new_messages` code path, which critically also updates
`update_expected_max_message_id` and thus may close a race with
fetching message history for a view we're being navigated to, where
the locally echoed message might fail to appear at all.

This change does come with a slight regression: If we are looking at a
search view where the filter is one that we cannot apply locally, a
newly sent message will now be locally echoed (returning the compose
box for drafting another) even though it cannot be displayed in the
current view, which means that the message will not appear in either
the compose box or the current view for the brief period before we get
a reply from the server in this scenario. This is a minor detail,
likely not worth troubling ourselves over.

Given our intent to experiment with navigating the user out of the
search view in this scenario, this is likely not important.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2024-05-05 00:23:58 -07:00
Aman Agrawal 24a167229d message_scroll: Fix check for when to fetch new messages for the view.
The `at_rendered_bottom` check was incorrect since it includes
bottom whitespace in the calculation to check if we are at the rendered
bottom. This is can cause us to not fetch new messages if user stops
scrolling when bottom whitespace is partially visible leading to
a bad UX.
2024-05-04 19:07:56 -07:00
Anders Kaseorg d507706371 zulip_test: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-04 18:55:17 -07:00
Anders Kaseorg fd8b2c557f global: Rename with normal TypeScript module extension.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-04 18:55:17 -07:00
Anders Kaseorg 74237dfd4c global: Convert TypeScript declarations to module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-04 18:55:17 -07:00
Anders Kaseorg 3c06c899c5 katex_server: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-04 18:53:34 -07:00
Anders Kaseorg d4841bbeff settings_components: Fix HTMLSelectOneElement selector.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 15:58:25 -07:00
Anders Kaseorg 40440248e6 support: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 15:39:55 -07:00
Anders Kaseorg 2be5cb0223 settings_user_topics: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 15:39:55 -07:00
Anders Kaseorg 939b88b9a7 settings_realm_domains: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 15:39:55 -07:00
Anders Kaseorg 4032f9c0cb people: Fix bogus filter_people_by_search_terms type.
It actually returned Map<number, true>.  Set<number> is more
efficient.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 15:39:55 -07:00
Anders Kaseorg fb7bad235d message_store: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 15:39:55 -07:00
Anders Kaseorg 4340f400b8 message_store: Fix bogus update_status_emoji_info type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 15:39:55 -07:00
Anders Kaseorg 7a10d8329b message_store: Fix get_cached_message type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 15:39:55 -07:00
Anders Kaseorg fe6744ae54 input_pill: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 15:39:55 -07:00
Anders Kaseorg 90978c3233 settings_components: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 15:39:55 -07:00
afeefuddin 1a42798b1d type: Add type HTMLSelectOneElement.
Combining HTMLSelectElement & {type: "select-one"} into one type to
improve code readability.

Fixes #29909
2024-05-03 15:32:46 -07:00
Lauryn Menard d10ad01997 help: Rename and redirect archive-a-stream for channel. 2024-05-03 13:05:57 -07:00
Lauryn Menard 500f476de9 help: Rename and redirect change-the-stream-description for channel.
This also contains in-file edits for help/message-retention-policy.md,
help/create-a-channel.md, and help/configure-automated-notices.md.
2024-05-03 13:05:54 -07:00
Lauryn Menard b714bd9eec help: Rename and redirect set-default-streams-for-new-users for channel. 2024-05-03 13:02:20 -07:00
Lauryn Menard c931966e1b help: Rename and redirect stream-sending-policy for channel. 2024-05-03 13:02:20 -07:00
Lauryn Menard 5342d4ecfb help: Rename and redirect stream-permissions for channel. 2024-05-03 13:02:19 -07:00
Lauryn Menard 859340c914 help: Rename and redirect mute-a-stream for channel. 2024-05-03 12:55:39 -07:00
Lauryn Menard d97571e1df help: Rename and redirect manage-inactive-streams for channel. 2024-05-03 12:55:39 -07:00
Lauryn Menard 9c353d812e help: Rename and redirect message-a-stream-by-email for channel. 2024-05-03 12:55:39 -07:00
Lauryn Menard 14b899eb20 help: Rename and redirect create-streams for channel. 2024-05-03 12:55:39 -07:00
Lauryn Menard 4dbda25e2e help: Rename and redirect streams-and-topics for channel. 2024-05-03 12:55:39 -07:00
Anders Kaseorg ffd1a80ef4 common: Remove copy_data_attribute_value.
Commit 90d0531e20 (#23721) removed
envelope-link and data-admin-emails.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 12:45:46 -07:00
Anders Kaseorg eb45eca57b support: Replace common.copy_data_attribute_value with clipboard.js.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 12:45:46 -07:00
Anders Kaseorg 252b0f193e password_quality: Convert .data("minLength") et al. to .attr.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 12:45:46 -07:00
Anders Kaseorg 7a5e68161a list_widget: Convert .data("sort"), .data("sort-prop") to .attr.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 12:45:46 -07:00
Anders Kaseorg 382eec17e2 list_widget: Convert .data("empty") to .attr.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 12:45:46 -07:00
Anders Kaseorg 72688c26b5 invite: Convert .data("loading-text") to .attr.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 12:45:46 -07:00
Anders Kaseorg 64c2d442ac web: Convert .data("user-id") to .attr.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 12:45:46 -07:00
Anders Kaseorg 455f8a9c53 web: Convert .data("stream-id") to .attr.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 12:45:46 -07:00
Anders Kaseorg bc9a7ef274 components: Convert .data("tab-id") to .attr.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 12:45:46 -07:00
Anders Kaseorg 153847d617 web: Convert .data("search-results-empty") to .attr.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 12:45:46 -07:00
Anders Kaseorg ebea1eed18 sidebar_ui: Convert .data("animated-url"), .data("still-url") to .attr.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 12:45:46 -07:00
Anders Kaseorg 5950093ae0 settings_components: Convert .data("method") to .attr.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 12:45:46 -07:00
Anders Kaseorg 64c8262eaf settings_components: Convert .data("setting-widget-type") to .attr.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 12:45:46 -07:00
Anders Kaseorg abee323c77 web: Convert .data("code-language") to .attr.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 12:45:46 -07:00
Anders Kaseorg c2bae4c9d9 message_list_tooltips: Convert .data("is-bot") to .attr.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 12:45:46 -07:00
Anders Kaseorg 87ea4313cd web: Convert .data("message-id") to .attr.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 12:45:46 -07:00
Anders Kaseorg c97f6c6c71 loading: Remove dead data-spinner_obj access.
As of commit 7b00bd6f7e, this no longer
exists.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 12:45:46 -07:00
Anders Kaseorg 518daff9db lightbox: Set data-filename as an attribute, not an invalid property.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 12:45:46 -07:00
Aman Agrawal f07ed8b6b3 hashchange: Restore narrow state on `escape` keypress to `feed`.
If user goes to combined feed view on escape keypress, then
we restore their narrow pointer and offset by restoring it from
browser history if the their last narrow was the combined feed view.
2024-05-03 12:42:22 -07:00
Aman Agrawal 240f7b53b2 message_lists: Remove `save_pre_narrow_offset_for_reload`.
This is no longer required since narrow state is restored by
`reload` library and narrow history restores the narrow pointer
and offset when going back to a view.

Only regression here is we will no longer restore the pointer when
user navigates to the combined feed view without using browser back
button and combined feed view is the default view. This is fixed
in the next commit.
2024-05-03 12:42:22 -07:00
Aman Agrawal 2eb216f1da message_list: Only update selected id and banner for current list. 2024-05-03 12:42:22 -07:00
Aman Agrawal 439091998d hashchange: Restore pointer state for combined feed view.
Now, user can use browser back button to go their last selected
message in combined feed view.
2024-05-03 12:42:22 -07:00
Aman Agrawal 24f47e8993 narrow_history: Use a more accurate way to check hashchange status.
`hash_util.search_terms_to_hash` doesn't work correctly for all
hashes, main one being the combined feed view.
2024-05-03 12:42:22 -07:00
Aman Agrawal f786c2c5d7 hash_util: Fix wrong type specified for `hash` parameter. 2024-05-03 12:42:22 -07:00
Aman Agrawal 478a4a59bc hash_util: Make it clear that the function doesn't work for all views. 2024-05-03 12:42:22 -07:00
Karl Stolley fb9acf8911 message_row: Establish clarifying messagebox-includes-sender class. 2024-05-03 12:34:27 -07:00
Karl Stolley 6c5085b827 message_header: Bring over control hover selectors. 2024-05-03 12:34:08 -07:00
Karl Stolley 50c744db48 left_sidebar: Apply grid to 'more conversations' DM row. 2024-05-03 12:21:59 -07:00
Anders Kaseorg 6c9484e0be drafts_overlay_ui: Remove incorrect $ prefix from non-jQuery variable.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 11:42:43 -07:00
Karl Stolley 7e2811d633 message_view_header: Extract styles to own file.
This has the added value of being named in parallel with
web/src/message_view_header.ts
2024-05-03 11:12:55 -07:00
Sahil Batra a37deb9fbc settings: Use settings-field-label class in language widget label.
We now use "settings-field-label" class in the label of language
selection widget instead of "title" class to add the bottom margin.
2024-05-03 09:51:36 -07:00
Sahil Batra 62d2b93079 settings: Remove dropdown-title class.
We now use "settings-field-label" and "modal-field-label"
class on label elements in settings and modals respectively
to add the bottom margin which was previously done by
"dropdown-title" class as it is better to have more
generic names to use on label for all type of inputs.
2024-05-03 09:51:36 -07:00
Sahil Batra 040486776c modals: Add bottom margin to label elements.
This commit adds bottom margin to label elements of
different inputs by adding "modal-field-label" class
to the label elements. Some of them already have the
margin due to having dropdown-title class.
2024-05-03 09:51:36 -07:00
Sahil Batra 8c6e71a195 settings: Add bottom margin to label elements.
This commit adds bottom margin to label elements of
settings inputs in personal, organization, stream
and group settings using the recently added
"settings-field-label" class.

Most of the settings are dropdown settings, so the
label for them already had a margin as they use
"dropdown-title" class.
2024-05-03 09:51:36 -07:00
Sahil Batra e7a4790d33 settings: Remove extraneous hr element below "Field choices".
There is no need to have hr element below the "Field choices"
heading in custom profile edit form and this also makes it
consistent with the new custom profile field form.
2024-05-03 09:51:36 -07:00
Sahil Batra 916ea58aaf settings: Remove unused classes from label elements.
This commit removes classes like "title", "input-label"
and "emoji-theme" from label elements in settings and
modals as these are classes are neither used in JS
nor to apply any CSS.
2024-05-03 09:51:36 -07:00
Karl Stolley 6f4a58fe71 settings: Place and style .settings-field-label on Profile. 2024-05-03 09:51:36 -07:00
Karl Stolley 10df1c414f settings: Simplify field-hint selector. 2024-05-03 09:51:36 -07:00
Karl Stolley 8512ea124d settings: Add variable for field/hint bottom margin. 2024-05-03 09:51:36 -07:00
Karl Stolley 29508e54b0 settings: Extend use of settings-profile-user-field-hint class. 2024-05-03 09:51:36 -07:00
Karl Stolley 38f51683a4 settings: Improve settings-profile-user-field-hint class.
This slight transposition makes it read closer to the adjacent
`settings-profile-user-field` class.
2024-05-03 09:51:36 -07:00
N-Shar-ma 5d468ddef8 left_sidebar: Add colon `:` to the list of stream word separators. 2024-05-03 09:20:53 -07:00
Anders Kaseorg 519c520c32 tippyjs: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg 38f040ad79 search: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg 33430f06c3 list_widget: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg f44d343511 invite: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg 7cd3a99aad user_group_popover: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg 57c6bfadf6 stream_list: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg ba7fd860b1 spoilers: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg 43d83105c6 settings_invites: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg 51f929d032 settings_emoji: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg 343e80c6fa recent_senders: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg 6f18551b7a signup: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg 3e1736c776 narrow_state: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg 89af74f420 message_viewport: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg a3507b8a11 message_util: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg 52a992d858 message_edit_history: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg 189865f427 localstorage: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg 279d911420 lightbox: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg d235675a06 integration_url_modal: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg 2642f521c1 hotspots: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg 75eb9fb852 flatpickr: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg 2e9b313333 dialog_widget: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg e9d0e43668 condense: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg 9c6c09b6e0 compose_call: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg d1a2d42403 buddy_list: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg 7651a00566 blueslip: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
Anders Kaseorg 3c2fae1171 poll_data: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 09:13:07 -07:00
N-Shar-ma 1ba3cda229 compose: Refactor recipient area to use grid layout instead of flexbox.
This is a prep commit for moving the narrow to compose recipients button
before the input, and also aids in the overall compose area redesign.
2024-05-02 14:28:04 -07:00
Alex Vandiver 512d53d01a invites: Stop adjusting invited_at on resends. 2024-05-02 14:23:04 -07:00
Tim Abbott afafd04bf9 message_fetch: Increase message history fetching numbers.
Now that we've greatly reduced unnecessary data fetches, we have
greater freedom to increase these values while still having good
performance.
2024-05-02 13:59:19 -07:00
Tim Abbott a7a89dcc72 message_fetch: Remove on-idle backfill behavior.
This only every did a single extra fetch, and now that this fetch is
in the same direction as our main fetching sequence, no longer is
meaningfully different from just specifying a different value of
consts.maximum_initial_backfill_size.
2024-05-02 13:55:17 -07:00
roanster007 f999de2de2 message_edit: Fix local echo of message edit.
Previously, when a message is edited, it is locally echoed with its
pre-edit content.

This is because previously, when we tried to render the edited
message of the edit box during local echo, in order to update
the content, flags, and is_me_message properties of the message
object with that of those returned is markdown.render(), we used
the spread operator and created a new message object, and updated
the existing message object with this new one.

This was misconverted, since edit_locally() method already has a
fully-rendered message object to start with, and is just doing a
rerendering, it should be mutating what message it received, rather
than constructing a new local variable.
2024-05-02 13:51:15 -07:00
nimishmedatwal d73a5d06c0 compose(typeahead): Remove text color change on hover.
Fixes #29842.
2024-05-02 13:47:47 -07:00
Karl Stolley 165df5f1f6 message_header: Build message_header.css from zulip.css header styles. 2024-05-02 13:38:58 -07:00
Sayam Samal 4394e87ef1 popovers: Move from global popover min-width to per-popover basis.
This removes the common min-width being used across all popovers and
instead sets the min-width according to a popover's requirements.

This allows for greater control over the popovers since we have a
variety of use cases for them — which a single common min-width cannot
accommodate.
2024-05-02 13:31:37 -07:00
Karl Stolley 6325ef4896 message_row: Pull message-edit selectors out of .message_row selector. 2024-05-02 13:27:02 -07:00
Karl Stolley b5f3702de0 message_row: Pull .locally-echoed selectors out of .message_row stack. 2024-05-02 13:27:02 -07:00
Karl Stolley c5740f101f message_row: Pull .messagebox-content out of .message_row stack. 2024-05-02 13:27:02 -07:00
Karl Stolley 08c02ada1a message_row: Extract and flatten .messagebox selectors. 2024-05-02 13:27:02 -07:00
Anders Kaseorg eed2413514 unread: Fix addition to unread_mention_topics sets.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-02 13:23:40 -07:00
luska44 1038a3a35b
info overlays: Update the to-do list example to match documentation.
Fixes: #29832.
2024-05-02 12:52:58 -07:00
Prakhar Pratyush d7a9523170 compose_banner: Replace the close button with "Got it" button.
For onboarding banners, we replace the close button with
"Got it" button.

Also, the banner is marked as read for the user only after
the "Got it" button is clicked. Earlier it was marked as read
as soon as it was displayed.
2024-05-02 12:48:22 -07:00
Prakhar Pratyush a35b922f05 banner: Remove the stale 'banner-contains-button' class. 2024-05-02 12:48:22 -07:00
Lalit 0a66fada64 input_pill: Use "input" event handler for `textInputHook`.
Register our `onTextInputHook` to be called on "input" events so that
the hook receives the updated text content of the input unlike the "keydown"
event which does not update the text content before running the hook.
2024-05-02 12:01:30 -07:00
Aman Agrawal 7a3d564b41 sidebar_ui: Fix right sidebar acting as an overlay even on wide width.
When user search is active, right sidebar was acting as an overlay
since "expanded" class was incorrectly added to it whenever user
started a search.
2024-05-02 09:44:55 -07:00
Lauryn Menard db03369ac2 zulip-view-modal: Update translated strings for stream/channel rename. 2024-05-01 10:29:20 -07:00
Karl Stolley 0b68a1ee42 message_row: Flatten unread_marker selectors. 2024-04-30 17:35:36 -07:00
Karl Stolley 1695b8c240 unread_marker: Handle offset entirely through CSS variables. 2024-04-30 17:35:36 -07:00
Lauryn Menard 141e1d4c90 streams-settings: Update ID of overlay container element.
This commit renames ID of the container element of streams settings
overlay to channels_overlay_container for the stream to channel
rename.
2024-04-30 14:44:12 -07:00
Lauryn Menard ee84b277ec hash-util: Rename stream_edit_url to channels_settings_edit_url.
Renames the hash_util.stream_edit_url function so that it's clearer
this is for the settings overlay hash and for the stream to channel
rename.
2024-04-30 14:44:12 -07:00
Lauryn Menard 8e953d9896 streams-settings-overlay: Update hash for stream to channel rename.
Updates the base hash for the streams setting overlay to be
"channels" instead of "streams".

Because there are Welcome Bot and Notification Bot messages that
would have been sent with the "/#streams" hash, we will need to
support parsing those overlay hashes as an alias for "/#channels"
permanently.

Part of the stream to channels rename project.
2024-04-30 14:44:12 -07:00
Lauryn Menard 21ba90c0ff message-view-header: Use hash_util to generate stream settings link.
Updates the streams settings URL in the message view header to be
generated with hash_util.stream_edit_url, which correctly encodes
the stream name in the URL.
2024-04-30 14:44:12 -07:00
Lauryn Menard 00b572b808 compose-typeahead-test: Update confusing test string.
Replaces test string that used "#streams", but was not referring to
or testing anything related to the streams settings overlay.
2024-04-30 14:44:12 -07:00
N-Shar-ma b36cdfda0a compose: Remove the `message_too_long` banner.
Since the banner only repeated what the disabled Send button's and the
limit indicator's tooltips already said, it was redundant and has been
removed.
2024-04-30 14:16:10 -07:00
N-Shar-ma bfbf4f6f68 compose: Redesign limit indicator to show remaining characters count.
Additionally, the text colors have been updated for both light and dark
themes, it starts showing when 900 or less characters are left, as 999
was too soon, and has a tooltip to show the maximum characters limit.

Fixes: #28706.
2024-04-30 14:16:10 -07:00
Karl Stolley c5027e6bca message_row: Assign inner .date_row span a class. 2024-04-30 12:42:41 -07:00
Karl Stolley 5ad162496c message_row: Decouple and simplify date_row, sub-message text styles. 2024-04-30 12:42:41 -07:00
Karl Stolley 1b698eed1e message_row: Clean up unnecessary style and comment. 2024-04-30 12:42:41 -07:00
Karl Stolley c3c9d306f1 message_row: Clean up unused style declarations. 2024-04-30 12:42:41 -07:00
Karl Stolley 5851cdcca3 message_row: Pull .date_row out of nested selectors. 2024-04-30 12:42:41 -07:00
Karl Stolley 27ebc761e7 message_row: Place private message styles in sensible area. 2024-04-30 12:42:41 -07:00
PieterCK 2457a8b655 stream_settings: Fix stream row switching behavior.
Add a rule to the switch_rows(event) function to avoid
switching stream row when pressing up/down key by checking
the current URL hash and the add_subscribers_pill focus state.
Add a utility function to hash_parser to help implement new
switch_rows behavior mentioned above.

Fixes #29690.
2024-04-29 18:57:29 -07:00
Lauryn Menard d512652809 narrow: Update hash for moved message even if hash change in progress.
Adds a new trigger string to use for narrow.activate opts when
it is called due detecting a message move for the targeted message
ID: "retarget message location".

Updates narrow.save_narrow and narrow.hashchange to accept the
trigger as a parameter so that, even if the narrow was started via
a hash change in the web app, the URL and browser history is
updated for the current location of the targeted message.
2024-04-29 17:31:19 -07:00
Mateusz Mandera 96fda8cedb presence: Fix typo in a comment. 2024-04-29 17:07:18 -07:00
Aman Agrawal d79e84726a sidebar_ui: Fix flickering of invite users button when showing sidebar. 2024-04-29 16:54:15 -07:00
N-Shar-ma 7104c06459 css: Make all modal buttons half opaque when disabled, instead of grey.
Earlier, the primary modal button always turned grey on being disabled,
while other modal buttons remained as is in light mode, and grey in dark
mode. Now the styling is made consistent across all modal buttons, by
giving them all 50% opacity when disabled.
2024-04-28 10:38:58 -07:00
N-Shar-ma 6ee0825022 css: Make message send / save buttons half opaque when disabled.
So far, the Send buttons area would turn grey when the message could not
be sent. The Save button when editing a message would also turn grey
when the message could not be edited anymore. Now we simply make the
buttons half opaque instead of turning them grey in a disabled state.
2024-04-28 10:38:58 -07:00
N-Shar-ma 528e7e4a0e css: Redesign exit / close buttons.
We change the background colors for the close / cancel / exit buttons
in modals and messages (when editing them or viewing their source). The
border is also removed for those buttons in messages.
2024-04-28 10:38:58 -07:00
N-Shar-ma 09be97c584 message_edit: Show message source in full opacity.
When viewing the source of a message when not editable, the opacity of
the read-only textarea would be reduced to 0.5, like for any other read-
only textarea in dark mode. This was unnecessary for viewing message
source, so the opacity for this case is now set to 1.

Fixes: #28701.
2024-04-28 10:38:58 -07:00
Sayam Samal 7cc7be5ad8 topic_popover: Remove additional separator on spectator mode.
In spectator mode, the separators encapsulating the topic visibility
switcher wasn't being hidden since the `hidden-for-spectators` class
was being applied only to the `popover-menu-inner-list-item` element.

As a follow-up commit to c3e4358, this removes the additional
separator by shifting the `hidden-for-spectators` class to the
`popover-menu-outer-list-item` element instead, which is responsible
for showing the separators.
2024-04-27 13:16:17 -07:00
Shubham Padia 88e91fa494 custom_profile_fields: Disable submit if no property changed in edit.
We could have added a new function that would return early on the
first property that changed instead of using
`populate_data_for_request`. But we would still need to fetch
`field_data` in most cases. Using `populate_data_for_request` will
keep things simple and readable while the performance difference
should be negligible.
2024-04-26 18:13:04 -07:00
Shubham Padia 2c0518ff69 custom_profile_fields: Don't send extra params during editing in dialog.
Fixes #29750.
- We introduced an argument called `custom_profile_field` similar to
`sub` and `group` in `check_property_changed` and
`populate_data_for_request`.
- We could've introduced `field` param in `get_input_element_value`,
but I've kept it clean since it didn't have any similar kind of data input.
The performance difference due to this should be negligible.
- Introduced a span that would be parent to all `field_data` params
since it is needed by the diff infrastructure.
- If there is no data to be changed, we display our success status
without sending the PATCH request since save changed button is
always enabled.
2024-04-26 18:13:04 -07:00
Shubham Padia cb4c6452a5 refactor: Move read_field_data_from_form to settings_components.
This is a preparatory refactor since we need to use this function in
settings_components.ts which is a typescript file. Although the
original file seemed like the best destination for this function,
settings_components.ts seems like the second best destination.
2024-04-26 18:13:04 -07:00
Shubham Padia d6cf423dfc custom_profile_fields: Remove unnecessary `-{{id}}` suffix.
Removes unnecessary suffix from `edit_custom_profile_field_form.hbs`.
Conversation here:
https://chat.zulip.org/#narrow/stream/6-frontend/topic/Name.2Fhint.2Fetc.20optional.20in.20custom.20profile.20fields.2E/near/1784450
2024-04-26 18:13:04 -07:00
Shubham Padia f5112446dd custom_profile_fields: Refactor toggle `required` field.
Do not send unnecessary extra params when changing the value of
`required` field. Instead of searching realm.custom_profile_fields
for the field we are editing, we will just use the checkbox value to update
the field value, since we don't need to send other params like `name`,
`hint`, etc. to the API after API feature level 252 update.
2024-04-26 18:13:04 -07:00
Shubham Padia d28d9fec0d custom_profile_fields: Refactor toggle display_in_profile_summary.
Do not send unnecessary extra params when changing the value of
display_in_profile_summary. Instead of searching realm.custom_profile_fields
for the field we are editing, we will just use the checkbox value to update
the field value, since we don't need to send other params like `name`,
`hint`, etc. to the API after API feature level 252 update.
2024-04-26 18:13:04 -07:00
nimishmedatwal b141c28855 hashchange: Change #all-messages to #feed.
This commit changes the hash for the combined feed view from the
legacy #all-messages to #feed.

Fixes #27802.
2024-04-26 14:28:13 -07:00
Karl Stolley 10f0d5dce3 info_density: Extend Markdown-aligned space to message content area. 2024-04-26 12:41:46 -07:00
Karl Stolley 4909438f2c info_density: Describe interelement Markdown spacing as CSS vars. 2024-04-26 12:41:46 -07:00
Sayam Samal 84db245e3f topic_popover: Update popover menu option icons.
Following the topic sidebar action popover menu redesign using the new
"popover-menu" tippy theme, we update the icons of the menu options to
match the new UI.

Fixes part of #28699.
2024-04-26 10:35:21 -07:00
Sayam Samal c3e43586c8 topic_popover: Redesign popover using the "popover-menu" tippy theme. 2024-04-26 10:35:21 -07:00
Sayam Samal 79d8d00384 stream_popover: Update popover menu option icons.
Following the stream sidebar action popover menu redesign using the new
"popover-menu" tippy theme, we update the icons of the menu options to
match the new UI.
2024-04-26 10:35:21 -07:00
Sayam Samal de25006c3d stream_popover: Redesign popover using the "popover-menu" tippy theme. 2024-04-26 10:35:21 -07:00
Aman Agrawal cb081917ff list_widget: Fix recent view "load more" fails to render.
`callback_after_render` was not being called when `render` did
an early return which caused "load more" to not be updated.

This is noticeable now since we are doing fewer calls to
`process_messages` which also updates the `load more` banner.
2024-04-26 09:45:27 -07:00
Lauryn Menard e54047f9cf narrow: Adjust for moved message with canonical terms.
In narrow.activate, the adjusted_terms_if_moved helper uses the
raw terms from the URL for checking if a message was moved. If a
non-canoncial operator was in the URL for a narrow (e.g. "subject"
instead of "topic" and now "stream" instead of "channel"), then
the view wasn't updated correctly.

Update adjusted_terms_if_moved to use the canonical version of the
operator in the URL when adjusting the message history.
2024-04-26 09:41:26 -07:00
Kislay Verma 5c0cccc807 stream_created_modal: Replace stream with channel.
Replaced `stream` with `channel` in two places which were missed
in an earlier refactor.
2024-04-25 17:00:56 -07:00
Kislay Verma 30d15d58fb stream_settings_ui: Go to newly created stream.
On creating a stream, instead of being redirected to the topic
`stream events` of the newly created stream, the user is only
redirected to the newly created stream, to avoid translation
issues with this topic name. The topic `stream events`
will not be present if the realm language is not English.
2024-04-25 17:00:56 -07:00
Karl Stolley e16f22c430 info_density: Apply base font-size to message content area. 2024-04-25 16:58:39 -07:00
Karl Stolley d9fedd7450 info_density: Preserve legacy density behind .more-dense-mode. 2024-04-25 16:58:39 -07:00
Karl Stolley 0cfd4c8eed settings: Hyphenate dense-mode classes. 2024-04-25 16:58:39 -07:00
Karl Stolley 2763be8977 info_density: Correct legacy line height and apply to message box.
This fixes an incorrect value as noted by Anders Kaseorg on #29569.
2024-04-25 16:58:39 -07:00
Anders Kaseorg d63a9e23eb dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-25 16:46:03 -07:00
Anders Kaseorg 3c57564213 eslint: Fix unicorn/no-anonymous-default-export.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-25 16:46:03 -07:00
Aman Agrawal 263d1ae38e demo_request: Add form for user to request a demo.
This sends an email to us after user fills out and sends the form.
2024-04-25 13:09:05 -07:00
Karl Stolley 0ab7233ffa reactions: Flatten selectors for showing reaction button on touchscreens. 2024-04-25 12:45:41 -07:00
Karl Stolley 3c4d1510d5 reactions: Add 5px of bottom space to reactions area with reactions. 2024-04-25 12:45:41 -07:00
Karl Stolley c1c9db4955 reactions: Correctly size reaction-button content.
Matching the `line-height` on + with the height of the smiley icon
ensures proper vertical centering.
2024-04-25 12:45:41 -07:00
Karl Stolley 18b86ab29e reactions: Consolidate icon styles in reaction button. 2024-04-25 12:45:41 -07:00
Karl Stolley 9d45ecdef4 reactions: Remove unnecessary flex on reaction button. 2024-04-25 12:45:41 -07:00
Karl Stolley d939b9aae6 reactions: Reorganize and deduplicate reaction button CSS. 2024-04-25 12:45:41 -07:00
Karl Stolley d1b790cac1 message_row: Add variable for color on sender hover. 2024-04-25 11:57:01 -07:00
Karl Stolley 058ff15ee2 message_row: Relocate and consolidate sender-related selectors. 2024-04-25 11:57:01 -07:00
Karl Stolley 925020801d me_messages: Correct line-height and bottom spacing. 2024-04-25 11:57:01 -07:00
Aman Agrawal 103c37f23a message_list: Don't always cache "Combined feed" view.
Important changes in this commit:
* We only cache message list for "Combined feed" if it is the
  default view.

* We modify existing handling of home message list code so that
  it can be used to for any message list that we want to cache
  using a new `preserve_rendered_state` variable.

* narrow_state.filter() returns the filter of combined feed view  list
  instead of `undefined`.

* We start fetching messages from the latest message on app load.

* Messages in all messages data and Recent view are always synced.

* If combined feed view list is not cached, we don't track it's
  last pointer, effectively sending user to the latest unread
  message always .
2024-04-25 09:20:43 -07:00
Aman Agrawal 2ccbb9bc00 emojisets: Improve error handling when we fail to fetch an emojiset.
Now we retry 3 times with 10s delays before giving up if on loading
the emoji. Hopefully user will just refresh the page by that time
if the emojis still can't be displayed.
2024-04-24 17:45:21 -07:00
Akarsh Jain 1ce429ae7c settings: Fix stream permissions warning banner persistence issue.
Previously, the stream permissions warning banner failed to hide
after changes to the stream's privacy settings were saved or discarded.
This fix addresses the issue, ensuring the banner behaves as expected
by disappearing when changes to make the stream private are either
saved or discarded.

Fixes: #29625.
2024-04-24 17:43:09 -07:00
Pratik 07fbbcd142 css: Allow reaction button to be visible in message box.
It enables the reaction button to become visible when clicking on a
message-box in a mobile view.

Fixes #29529.
2024-04-24 17:41:34 -07:00
CIC4DA 4e5ab739d0 group_pill: Change the groups icon to zulip-triple-user-icons.
Fixes: zulip#28756
In this commit, we are changing the icon for group_pill from fontawesome group to triple-users-icon.
2024-04-24 17:37:38 -07:00
CIC4DA d7b9c2c21c typehead_list_item: Change the groups icon to zulip-triple-user-icon.
Fixes: zulip#28756
In this commit, we are changing the icon for groups in typehead from fontawesome-group to triple-user-icon.
2024-04-24 17:37:38 -07:00
CIC4DA ff41a95f5f user_group_info_popover: Add the zulip-triple-user-icon.
Fixes: zulip#28756
In this commit, we are adding a triple-user-icon in front of the group's name in the user_info_group_popover.
2024-04-24 17:37:38 -07:00
CIC4DA 3745e44963 navbar: Change the user list menu (narrow) to user-list.svg.
Fixes: zulip#28756
In this commit, we are changing the user list menu icon(narrow screen) from triple-users to user-list.
2024-04-24 17:37:38 -07:00
Kenneth Rodrigues 110ca73545 compose_tooltips: Improve tooltip logic for compose_reply_button.
Change compose_reply_button tooltip logic to show the correct tooltip.
Earlier in organizations where DMs were disabled, a stale tooltip was
being displayed.

Earlier if the user hovered over the compose_reply_button when it was
disabled and switched to a stream in which it was enabled before waiting
for the tooltip delay, the next time the user hovers over the
compose_reply_button the stale disabled tooltip is displayed instead of
the enabled one.

This is fixed by checking if the compose_reply_button is enabled on the
fly while rendering the tooltip via instance.setContent().

Fixes #29238.
2024-04-24 17:29:16 -07:00
Kenneth Rodrigues 47e9e770a6 tooltip_templates: Rename reply_button_disabled to be more descriptive. 2024-04-24 17:29:16 -07:00
Lauryn Menard e2732d95c2 all-wildcards: Update for "channel" wildcard as preferred to "stream".
Updates the logic for adding a wildcard mention syntax in a message
to use the "channel" wildcard instead of the "stream" wildcard.

Adds some TODO notes for eventually removing the "stream" wildcard
from the typeahead suggestions in the web app.

Part of stream to channel rename project.
2024-04-24 17:04:33 -07:00
Lauryn Menard 58b91202f4 web-narrow: Update operators to use channel and channels.
Updates operators used for narrow.activate and sent as narrow
parameters to the server to use channel and channels.

Part of stream to channel rename project.
2024-04-24 17:03:36 -07:00
Lauryn Menard 8d102cf12f web-search-suggestions: Update to use channel and channels.
Updates the search suggestions in the web app to use the modern
convention of "channel" and "channels".

Also, updates the "from" search suggestions to use the modern
canonical convention of "sender".

Part of stream to channel rename project.
2024-04-24 17:03:36 -07:00
Karl Stolley 8f3fc9f209 message_edit: Match textarea padding, line-height to preview area. 2024-04-24 14:38:36 -07:00
Karl Stolley 48b896b752 message_edit: Zero out browser-default top margin.
This prevents a vertical shift when toggling between editing and
previewing a message.
2024-04-24 14:38:36 -07:00
Karl Stolley a94cdd99d2 message_edit: Consolidate textarea styles under .message_edit_content. 2024-04-24 14:38:36 -07:00
Lauryn Menard 4dcb0258a5 web-i18n: Update frontend translated strings for stream rename channel.
Updates translated strings in web/ that do not need updates to any
tests. The majority of these strings are also unique to the file/
template that they are in. A few have overlap with one other file.

Some changes here update placeholders/variables in these strings to
no longer use stream so that all the translation updates for this
rename happen at the same time.

The exception to this are cases of "<z-stream>" placeholders in
these translated strings.

Part of the stream to channel rename project.
2024-04-24 14:35:04 -07:00
Lauryn Menard 36e00308b8 web-compose-warnings: Update banners for stream rename channel.
Updates warning string when linking to a private stream/channel when
composing a message in the web app to use channel instead of stream.

Updates error banner when using a stream/channel wildcard mention
when composing a message in the web app to use channel instead of
stream.

Part of stream to channel rename project.
2024-04-24 14:35:04 -07:00
Lauryn Menard ff98758ed0 web-compose-typeahead: Update wildcard string for stream rename channel.
Updates "Notify stream" string in the stream wildcard typeahead to
be "Notify channel" instead.

Part of stream to channel rename project.
2024-04-24 14:35:04 -07:00
Lauryn Menard c874183ea8 web-filter: Update translated strings for stream rename channel.
Updates the translated strings in filter.ts to use channel instead
of stream.

The updates to the untranslated search streams will be done in a
separate commit.

Part of the stream to channel rename project.
2024-04-24 14:35:04 -07:00
Lauryn Menard d7f9f8333e web-stream-settings: Update strings for stream rename channel.
Updates a chunk of translated strings that overlap between files,
with the streams settings overlay being the starting point for
finding these strings, to use channel instead of stream.

Part of stream to channel rename project.
2024-04-24 14:35:04 -07:00
Lauryn Menard ba766a564a web-stream-create: Update frontend errors for stream rename channel.
Updates translated error and warning strings when creating a new
stream in the web app to use channel instead of stream.

Part of stream to channel rename project.
2024-04-24 14:35:04 -07:00
Lauryn Menard 13299577da web-empty-narrow: Update translated banners for stream rename channel.
Updates the translated empty narrow messages in the web app to use
channel instead of stream.

Updates the message view header that has the same text as the empty
narrow when a stream/channel does not exist or the user does not
have access to the stream/channel because it is private.

Part of stream to channel rename project.
2024-04-24 14:35:04 -07:00
Lauryn Menard 8bc183e16e web-i18n-test: Update translation data for stream rename channel.
Updates the page_params.translation_data that's set in this test
for renaming stream to channel.

Part of stream to channel rename project.
2024-04-24 14:35:04 -07:00
Lauryn Menard 556629add0 web-hash-util: Decode URL with channel and encoded stream ID.
Updates hash_util.decode_operand to handle a URL with channel and
the stream name and ID encoded in the URL.

For example "/#narrow/channel/12-test" where 12 is the ID of the
stream named "test".

Part of stream to channel rename project.
2024-04-24 14:33:57 -07:00
tnmkr 225e004bba stream_settings: Remove "Stream events" field.
"Stream events" field in "Stream details" section uses hardcoded
link for "stream events" topic. This link breaks if the organization
language is set to something other than English and the "stream events"
topic has a translated name. The field also does not handle scenarios
where the organization switched languages and thus "stream events"
topic is in different languages depending on when the stream was created.

Additionaly, we are currently undergoing a major change to rename
"Streams" to "Channels" and as part of this change "stream events" will
be renamed to "channel events". We currently don't have a plan for
linking these together or moving messages to the new topic.

Keeping these points in mind, it is best to remove this field for now.
2024-04-24 08:55:53 -07:00
Karl Stolley bb5db2cc4b message_row: Replace sender-line margins with grid-coordinated line height.
This expresses the height of the message row without need of
margical margins.

Extending the correct line-height to timestamps also means that
single-line messages will be the height of their combined content
and padding, and not erroneously held open by an oversize 28px
timestamp line-height.

Those corrections mean, too, that .message-time only needs to have
its line-height declared a single place, regardless of context.
2024-04-22 14:17:39 -07:00
Karl Stolley 3c5adfe440 message_row: Introduce CSS variable for vertical margin. 2024-04-22 14:17:39 -07:00
Karl Stolley 31865db5c9 message_row: Introduce CSS variable for avatar column width. 2024-04-22 14:17:39 -07:00
Karl Stolley 085abf9c35 message_row: Remove unused variable. 2024-04-22 14:17:39 -07:00
Kislay Verma cb65b617fb message_move: Show confirmation toast.
A confirmation toast is shown when a message is moved
using the "Move only this message" option. The toast
contains the link to the new location of the message.

Fixes #29702
2024-04-22 10:57:52 -07:00
Kislay Verma cdb06ff9f0 stream_popover: Fix type bug.
The variable `select_stream_id` was assumed to be of type number when
it actually was of type string. A strict equality check was performed later
down in the code between `select_stream_id` and `current_stream_id`
(which is of type number).

This commit converts the variable `select_stream_id` to type number.
2024-04-22 10:57:52 -07:00
Adnan Shabbir Husain 9aa6bbcee0
modal: Fix invite link overflow in mobile view.
Added a flex div into the copy invite link dialog box.

Fixes #29524.
2024-04-22 10:48:31 -07:00
Karl Stolley 68ea6704a4 widgets: Unify spacing beneath widgets and spoilers. 2024-04-22 10:33:47 -07:00
Karl Stolley a3476af97c markdown: Move all inter-element spacing to bottom. 2024-04-22 10:33:47 -07:00
Karl Stolley fc8e16f5e4 markdown: Set 5px for bottom margin on p, blockquote.
This establishes the same 5px bottom margin on all Markdown
elements, which will aid in converting such values to variables
as part of the information-density project.
2024-04-22 10:33:47 -07:00
Karl Stolley 6e32ce9084 markdown: Clarify and reorder margin and padding on KaTeX. 2024-04-22 10:33:47 -07:00
Karl Stolley 282d900bea markdown: Remove unnecessary inheritance declarations. 2024-04-22 10:33:47 -07:00
Karl Stolley f97cecdfe2 markdown: Remove inapplicable margin-top values.
Because paragraphs have a 3px bottom margin, the 2px top margin
on ordered and unordered lists would collapse into it, for 3px
of space total. So setting 0 on these special selectors has no
effect.
2024-04-22 10:33:47 -07:00
Aman Agrawal 89127dadd6 upgrade: Avoid event_status redirect. 2024-04-22 09:23:12 -07:00
Aman Agrawal 9702ff3539 message_list_view: Clarify imprecise performance comment.
A single call to this function doesn't have a material performance
impact when tested with 20k messages while scrolling in combined feed
view; likely because only 400 messages can be in the structure at any
give time given render windows.

But calling this in a loop somewhere would be a bad idea.
2024-04-22 09:21:43 -07:00
Shubham Padia 6d4541a1eb custom_profile_fields: Don't show display summary tooltip on `required`.
Fixes #29814.
2024-04-22 09:16:31 -07:00
tnmkr bc8e6a86b5 stream_settings: Add new "Stream details" section in General tab.
We want to make it easier to find stream details such as creator,
creation date and stream id. The commit replaces the "Email address"
section in General tab of stream overlay with a new section called
"Stream details", "Email address" is now a field in this section.

If the stream does not have a creator, we only show the stream creation
date in creation details.

Fixes: #25648.
2024-04-20 19:03:43 -07:00
tnmkr c31016cac3 user_display_only_pill: Improve partial structure and css.
This is a prep commit to add a .pill-label wrapper around .pill-value
and other flair text. This extra flexbox structure will help us
vertically align this pill with surrounding text when adopting it to be
used inline.

We also introduce a new class to target this pill. The intention is that
this will more descriptive than contextually styling .pill-container.
2024-04-20 19:03:43 -07:00
tnmkr d934da7afe stream_settings: Remove custom styling from "Generate email" button.
This is so that it better matches existing buttons in this overlay. For
example the "Reset to default notifications" button in Personal tab.

This is a prep commit.
2024-04-20 19:03:43 -07:00
sujal eba0097c7f message_feed: Modify tooltips to clarify draft saving.
Update the tooltips for the "Cancel" and "Spinner".  Provide clear
information about the draft saving behavior when a message fails to
send successfully.

Fixes part of #29100.
2024-04-20 18:00:22 -07:00
sujal shah f144400d46 settings: Change links to user_pills in invitations seciton.
Previously, links were displayed for the user's name,
but now they are presented as pills. These pills are rendered
using the user_display_only_pill.hbs template.
To obtain the avatar of a user,
the small_avatar_url_for_person function is utilized.
2024-04-20 16:59:45 -07:00
sujal shah 16db1df416 templates: Use 'panel_user_list' as classname.
The term 'subscriber' might be misleading as it doesn't accurately
reflect the purpose of the list, which simply contains all users
within the organization. To enhance clarity and maintain consistency,
I've replaced the classname 'panel_subscriber_member_list'
with 'panel_user_list'.
2024-04-20 16:59:45 -07:00
Kislay Verma 156c708614 compose: Refactor create_message_object.
This function now accepts an argument for message content in the
message object returned and use compose_state.message_content()
to preserve the behavior for existing callers.

Preparation for #28626
2024-04-20 16:24:54 -07:00
Kislay Verma ecac0d6c80 compose_ui: Refactor cursor_inside_code_block.
Renamed the function to position_inside_code_block and changed the
parameters to accept a string and number (index), and check if the
position in the string is inside a code block (as per previous logic).

Preparation for #28626.
2024-04-20 16:24:50 -07:00
Tim Abbott 7beea02660 compose_state: Reuse has_savable_message_content. 2024-04-20 13:29:22 -07:00
evykassirer 2c2dfa4c3d draft: Only auto-restore drafts edited since adding the feature. 2024-04-20 13:27:25 -07:00
evykassirer 43120709f7 narrow: Move clear_message_sent_banners into reset_ui_state. 2024-04-20 13:27:25 -07:00
evykassirer 160b78a7e9 drafts: Don't restore drafts being actively sent or scheduled. 2024-04-20 13:27:25 -07:00
evykassirer 45a81650f4 compose: Add option to not restore drafts, to avoid overwriting.
This could happen e.g. when quote-replying a message,
because we open the composebox before adding the quote
reply content. We need to make sure that we don't restore
a draft when opening the composebox, because otherwise
that draft will be replaced with the quote reply.
2024-04-20 13:27:25 -07:00
evykassirer 14d83458c8 drafts: Separate initialize function into data and UI pieces.
This will let us initialize the data before the UI is ready
to be initialized. We'll need to do this in an upcoming commit
where we clear a flag on page load before the reload code
initializes.
2024-04-20 13:27:25 -07:00
evykassirer 0e369e7ff3 compose_send_menu_popover: Rename module to reflect broader uses. 2024-04-20 13:27:25 -07:00
evykassirer 3ef4e80dff compose: Add button to save draft and start a new message. 2024-04-20 13:27:24 -07:00
evykassirer fd4246def5 drafts: Append a space to draft when restoring it.
If a user starts typing before they see that a draft was restored,
this makes that experience a little smoother by adding some
separation between the old draft and the new text.
2024-04-20 12:31:51 -07:00
Riken Shah d48de6da08 compose: Restore the last draft when compose box is opened.
Now when the user opens a narrow that has a draft saved for
that particular conversation, the draft will automatically
be restored in the compose box. This will make it easy to
return to a draft after clicking away, and also will make
it less confusing when people close the compose box by
accident. Note that this only restores the draft when
there is a full recipient specified (stream and topic,
or at least one PM recipient).

Fixes part of #18555.
Fixes #11218 and #17396.
2024-04-20 12:31:51 -07:00
evykassirer cb3f22c30e drafts: Delete a draft if it is cleared from the compose box.
We used to keep the draft, assuming that clearing the composebox
was an accident. Now we want to delete the draft, in preparation
for auto-restoring drafts when opening the composebox for narrows
with drafts associated with them. If a user opens the composebox
and sees a draft they don't want anymore, clearing the box is a
way we expect them to try to delete it.
2024-04-20 12:31:51 -07:00
sujal shah 01e898252b setting_ui: Fix sorting by "Invited by" column.
Previously, the sorting was broken due to
incorrect referencing of the property.
The code has been updated to use the "referrer_name"
property instead of "ref".
2024-04-20 12:28:39 -07:00
Aman Agrawal 07699eb1d2 message_fetch: Allow updating fetch status without updating messages.
It's possible that for a given narrow event if we didn't fetch any
messages in the `num_after` or `num_before` space, we could have
arrived at `newest` or `oldest` messaged based on the `anchor` used.

This fixes the bug where `fetch_status` for `found_newest` didn't
update to be `true` when using `newest` anchor and `num_after = 0`.
2024-04-20 08:49:54 -07:00
Aman Agrawal fb8a05a683 server_events: Rename home_view_loaded related variables.
Gave them a more general name which reflected what they were
really doing.
2024-04-20 08:49:54 -07:00
Aman Agrawal 6d7856fa37 message_list_data: Move comments to the type definitions. 2024-04-20 08:49:54 -07:00
Aman Agrawal ca0f79ce34 message_list_view: Restore date on previous sticky header.
We forgot to restore the date on sticky header if the header
is no longer sticky.

Reproducer:
* Have two messages with same sender on different dates next to
  each other in a stream narrow.
* Scroll so that sticky header is on the 2nd message.
* Scroll down fast so that to avoid us capturing the sticky header
  over the first message.
* Scroll up slowly so to see the group header of the messages have
  the date of the second message.
2024-04-18 11:52:59 -07:00
Lauryn Menard b71f4b9342 stream-settings: Remove unused tooltip for announcement stream.
In commit 449febf036, the tooltip that provided information about
the announcement stream was replace with inline text on the form.

Removes the now unused template and code in stream_create for this
tooltip.
2024-04-18 08:52:53 -07:00
Pratik Chanda 3f1ffd0068 topic_list: Show topic row for empty conversations in left sidebar.
Earlier when a user narrowed to a new topic, there was no highlighted
topic row entry in the left sidebar under the respective stream.

This commit introduces the feature to show highlighted topic in the
left sidebar for a new topic thread. It checks if narrowed topic is
present in the list of topic names to add to it.
It disappears from the left sidebar when unnarrowed and the topic
contains no messages.

Fixes: zulip#22769.
2024-04-17 17:51:12 -07:00
Pratik Chanda e1a63d57a2 pm_list: Show DM row for empty conversations in left sidebar.
Earlier when a user narrowed to a new pm conversation, there was no
highlighted DM row entry in the left sidebar.

This commit introduces the feature to show highlighted pm thread in
the left sidebar for a new conversation. It adds narrowed dm to the
recent messages list if not already present.
It disappears from the sidebar if no message was sent and unnarrowed
from the DM.

Fixes: zulip#22769.
2024-04-17 17:51:12 -07:00
Kislay Verma 245357c868 stream_settings_ui: Go to newly created stream.
- On creating a stream, the user is redirected to the
 "stream events" topic of the newly created stream.
- If this is the first time the user has created a stream,
an explanatory modal is shown.

test_hotspots.py is modified to account for the new addition
of the first_stream_created_banner.

stream_create.test.ts is also modified accordingly.

Fixes #29375.
2024-04-17 15:35:19 -07:00
Kislay Verma a90f7cce6f settings: Add tooltip to clarify invalid Jitsi URL.
This commit adds a tooltip in organization settings,
when the save button is disabled due to invalid
Jitsi URL.

Fixes #27511.

Co-authored-by: Angelica Ferlin <angelica.ferlin@gmail.com>
Co-authored-by: Peterson Linn <linn@pajp.net>
Co-authored-by: Kislay Verma <kislayuv27@gmail.com>
2024-04-17 15:30:33 -07:00
Kislay Verma 5f35384c80 settings: Move init disable button function.
This commit moves the function
initialize_disable_btn_hint_popover from
stream_ui_updates.js to settings_components.js
due to circular dependencies.
Added opts parameter to append to the options for
the tippy instance.

Fixes #27511.

Co-authored-by: Angelica Ferlin <angelica.ferlin@gmail.com>
Co-authored-by: Peterson Linn <linn@pajp.net>
Co-authored-by: Kislay Verma <kislayuv27@gmail.com>
2024-04-17 15:30:33 -07:00
Karl Stolley 1878f920a8 katex: Properly align timestamps with KaTeX-only messages. 2024-04-17 12:46:30 -07:00
Tim Abbott 62fb452e9c keyboard-shortcuts: Improve home view labels. 2024-04-17 12:42:21 -07:00
Tim Abbott 2c62152a8b left-sidebar: Rename "All direct messages" => "Direct message feed".
This aligns with the new naming scheme for other left sidebar
elements.
2024-04-17 12:42:21 -07:00
nimishmedatwal 1594011b67 left_sidebar: Rename All messages to Global Feed.
Fixes part of #27802.
2024-04-17 12:42:21 -07:00
nimishmedatwal 561cc9eab3 user_profile: Add focus to subscribe button.
Also reduces the number of focusable elements between the "streams"
heading and the stream picker.

Fixes #26690.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2024-04-17 11:52:57 -07:00
evykassirer 2b2c6d642b people: Remove redundant is_known_user function. 2024-04-17 10:45:14 -07:00
evykassirer f6b87cf0fb pill_typeahead: Convert module to typescript. 2024-04-17 10:45:14 -07:00
evykassirer 22aca110a5 typeahead: Fix typing for pill containers with multiple pill types.
`pill_typeahead`, and possibly other places, call `typeahead_source`
for what were typed as different pill widgets but is actually
all the same combined pill widget that has pills of users, user
groups, and streams. This commit fixes that typing issue in
preparaton for the upcoming conversion of `pill_typeahead` to
TypeScript.
2024-04-17 10:45:14 -07:00
evykassirer 45e9c046d8 pill_typeahead: Differentiate between pills with type attribute.
The pill typeahead can have pills of three different types:
user, stream, and user_group. To be able to convert this
module to typescript, we need to add a `type` attribute
to differentiate between them.

This commit also adds a `user_or_mention` type to some
items in the composebox typeahead, because the composebox
typeahead shares some functions with the pill typeahead
and we need to be able to differentiate between the
pill types being passed there.
2024-04-17 10:45:14 -07:00
evykassirer 67486a43b2 composebox_typeahead tests: Add some missing attributes to user objects.
This doesn't fully add all missing attributes, but it adds ones that
will soon be needed in upcoming commits. Ideally eventually these
objects are full fake User objects with defaults for required
attributes.
2024-04-17 10:45:14 -07:00
evykassirer 1d16fdd7b9 typeahead_helper: Add test for compare_by_pms for missing codecov. 2024-04-17 10:45:14 -07:00
evykassirer 6264bf3b76 typeahead_helper: Fix types for sort functions.
The call to `typeahead_helper.sort_recipients` in
`pill_typeahead` shows that these parameters are
optional.
2024-04-17 10:45:11 -07:00
evykassirer 4dfe60a6c5 typeahead_helper: Move two functions from composebox_typeahead. 2024-04-17 10:45:10 -07:00
N-Shar-ma f39b57dd04 typeahead: Sort emojis by categories initially.
For more consistency between the emoji picker and the typeahead, now the
initial emoji list is ordered by categories for the typeahead too.

Tachnically, this means that `emoji_picker.rebuild_catalog` now updates
the typeahead's emoji data with category wise sorted emojis. Compose box
typeahead initialisation does not update the emoji data anymore.
2024-04-17 10:13:23 -07:00
roanster007 68b4298d8e settings: Add option to disable seeing typing notifications.
This commit adds an option to the advanced section of
Preferences settings, that would allow users to choose
whether to receive typing notifications from other
users.

Fixes #29642
2024-04-16 11:38:12 -07:00
roanster007 c7e2e048cb settings: Reorder starred_message_counts and fluid_layout_width.
This commit re orders the 'Use full width on wide screens' and
'Show counts for starred messages' settings of Preferences settings.
2024-04-16 11:33:25 -07:00
Mateusz Mandera 540d419ef7 events: Fix realm_upload_quota_mib value to be in MiB.
This was bytes until now.
2024-04-15 15:08:56 -07:00
Tim Abbott 3df46d542b Revert "message_reactions: Clean meassge reactions during initial processing."
This reverts commit c22a94dc89.

This broke live-update when adding new reactions.
2024-04-15 14:58:06 -07:00
N-Shar-ma 352e2ebc5a todo_widget: Move the `add-task-bar` from above to below the task list.
When users needed to add a new task in the todo widget, they would type
it in the field at the top, but the task would be appended to the list,
showing up at the very bottom, which can seem unintuitive.

Now the `add-task-bar` is at the bottom of the list, so that when a new
task is added, it'll appear right where it was typed. The task field
would then shift lower.
2024-04-13 21:56:33 -07:00
N-Shar-ma d8a8364d1a todo_widget: Allow tasks to be added through `/todo` command.
Uptil now, users could add tasks to a todo widget only after creating
it through the `/todo` command in the compose box.

Users can now add an initial list of tasks using the `/todo` command,
with each task on a new line in the compose box, where the 1st `:`
would separate a task from its (optional) description. Example:
`/todo\nTask1:description1\nTask2 without description`.

Fixes part of #20213.
2024-04-13 21:56:33 -07:00
N-Shar-ma 6df3ad251a todo_widget: Allow task list title to be set and edited by author.
Users can now name task lists by providing the task list title in the
`/todo` command on the same line. Example: `/todo School Work`. If no
title is provided by the user, "Task list" (which is also the
placeholder) is used as default.

The author of a task list can later edit / update the task list title
in the todo widget, just like the question in the poll widget.

Fixes part of #20213.
2024-04-13 21:56:33 -07:00
N-Shar-ma 8c000f348a widgets: Make Zod schema for widget extra data stricter and extendable.
The schema now ensures extra data is validated according to the widget
type. This also makes it easier to modify the extra data for any widget
or add new widget types in the future.
2024-04-13 21:56:33 -07:00
Olivier FAURE 29e32c3977
keyboard ui: Add early-exit to click handlers with shift.
Shift-clicking a link on most browsers should open the link in a new window, 
not navigate inside the current tab, just like ctrl-click opens in a new tab.
2024-04-13 21:48:03 -07:00
Varun Singh ee232bba05 settings_linkifiers: Convert module to TypeScript. 2024-04-13 21:45:44 -07:00
Varun Singh bc530162ca state_data: Add 'realm_linkifiers' to type. 2024-04-13 21:45:44 -07:00
Aman Agrawal 42c5a04804 hello: Apply same link styles to all the screen descriptions. 2024-04-13 21:32:50 -07:00
N-Shar-ma e7a19aca75 emoji_picker: Search result emojis now named as the matching alias.
This fixes the bug where on hovering / selecting an emoji picker search
results emoji, invariably its canonical name would show / be used, which
is not always the same as the matching alias. For example, searching for
"swe" would show the "sweeping" emoji, but its canonical name is "broom"
which can be a confusing search result for "swe".
2024-04-12 17:40:24 -07:00
Karl Stolley e43384bd90 markdown: Modernize presentation of spoiler headers. 2024-04-12 17:39:36 -07:00
Karl Stolley f2a1c96940 spoilers: Adjust HTML source order to match presentation. 2024-04-12 17:39:36 -07:00
Lauryn Menard a446033f32 filter: Use "channels" operator for the Filter class.
Update the Filter class to use "channels" as the canoncial operator
for public stream searches and web-public message fetch narrows,
but keep using "streams" for user-facing text and URLs.

When searching, "channels" does not create any suggestions until
a colon is added and then it shows suggestions with "streams". And
when a search string with channel as an operator is entered, then
it is replaced by "streams" as well.

Part of stream to channel rename project.
2024-04-12 13:44:25 -07:00
Lauryn Menard 1e7c5b38f8 filter: Use "channel" operator for the Filter class.
Update the Filter class to use "channel" as the canoncial operator
for streams, but keep using "stream" for user-facing text and URLs.

When searching, "channel" does not create any suggestions until
a colon is added and then it shows suggestions with "stream". And
when a search string with channel as an operator is entered, then
it is replaced by "stream" as well.

Part of stream to channel rename project.
2024-04-12 13:44:25 -07:00
Lauryn Menard e3a521f4ba filter: Use canonical terms when updating Filter for message moves.
Updates filter_with_new_params so that the terms used to update the
current narrow filter are the canonical version of the terms. This
assures that the adjustments we're making are correct.
2024-04-12 13:44:25 -07:00
Lauryn Menard 7761675497 tests: Update filter.test.js to use constants for message type.
Updates filter.test.js to use constants when checking the message
type ("stream" or "private") as this eliminates overlap with the
search/narrow operator "stream" and is useful prep for eventually
updating the frontend code to use "direct" as the message type
for direct mesages.

Part of stream to channel rename project.
2024-04-12 13:44:25 -07:00
PieterCK 9b107e3ce1 integrations: Fix styling of unordered lists inside ordered lists.
This change allows different types of lists to
be rendered properly inside the {{start_tabs}} /
{{end_tabs}} block in markdown.

Fixes zulip#29669

Suggested-by: Lauryn Menard <github:laurynmm>
2024-04-12 13:30:33 -07:00
joaoafonso07 5eff81407c
invite: Fix scrolling to invitation success/error messages.
Change the way scrolling was implemented by scrolling to the success
message. Done this by calling the scrollIntoView() method with the
success message id, it scrolls the element with id into the visible
area of the browser window.
This way the confirmation banner becomes visible, scrolling the
invitation modal to the top when a user sends invites or generates an
invite link.
Previously, it did not scroll, as we were passing the id of the whole
dialog element to the get_scroll_element function.

Fixes #28906.
2024-04-12 13:06:22 -07:00
Kenneth Rodrigues c22a94dc89 message_reactions: Clean meassge reactions during initial processing.
Clean reactions and set message_reactions in process_new_message.
Earlier, message_reactions was being set
after the predicate for the narrow was built,
as a result functions called while building the predicate
could not access it.
2024-04-12 12:42:54 -07:00
Kislay Verma 505d66afeb user_invite: Convert invite modal to tabbed format.
This commit converts the radio buttons (for
selecting email/link) to tab
components in the user invite modal.

The selected tab is in focus by default and arrow keys
can be used to toggle the selected tab.

Appropriate tooltips are shown when a tab is disabled.

Fixes #29392.
2024-04-12 08:23:00 -07:00
Jose Corte b41a116d42 onboarding: Fix formatting of registration page buttons.
This ensures that in the registration page the text does not overlap icons in any language.

Fixes #20563.
2024-04-12 08:15:24 -07:00
Aman Agrawal 402f589e76 user_topic_popover: Keep reference visible when popover is open.
In recent view and inbox view, we keep the topic visibility icon
visible when the topic visibility popover is visible.
2024-04-12 08:13:40 -07:00
Aman Agrawal 9a8ebf3a34 recent_view: Only normal show topic visibility indicator on focus.
This is now similar to how they behave in inbox view.
2024-04-12 08:13:40 -07:00
N-Shar-ma 633d814df9 upload: Rename variable `filename_url` to `syntax_to_insert`.
This variable holds the markdown syntax for a file that's to be inserted
into a message, hence the new name.
2024-04-11 16:52:33 -07:00
N-Shar-ma 7b7c52b7c9 copy_and_paste: Fix bug where an unlabelled image could be pasted twice.
This commit removes the unnecessary condition for a linked image to have
a label when checking whether to skip an image preview if its generating
link has already been copied.
2024-04-11 16:52:32 -07:00
N-Shar-ma 358bb6b342 message_view: For message sent by current user, always scroll into view.
Now whenever the bottom of the feed is visible, we always scroll to the
message/s just sent by the current user, updating the selected message
if necessary.

Scroll behaviour for messages sent by other users remains unchanged.

Fixes: #23298.
2024-04-11 16:39:58 -07:00
N-Shar-ma a7719184ad compose: Refactor code to combine 2 same if condition blocks into one.
The blocks were originally separated by some code for seemingly no
reason, so now the 2nd block is brought up and combined into the first.
An old irrelevant comment is also removed.
2024-04-11 16:34:33 -07:00
N-Shar-ma 94dc5723c6 compose: Scroll cursor at message's end into view when restoring draft.
When a long message is restored from a draft (or scheduled messages),
its end, and the cursor placed there, used to be out of view, giving the
impression that the message was not focused, when it actually was.

This is fixed by always scrolling the cursor into view.
2024-04-11 16:34:33 -07:00
Sayam Samal 610f46d74e actions_popover: Rename "View message source".
This commit renames "View message source" to "View original message".

The meaning of "original" in this context is very similar to what
source/source code means in software jargon, while being easier to
understand and translate for a non-tech savvy user.
2024-04-11 15:57:24 -07:00
Sayam Samal 27c85af6d9 message_controls: Remove view message source icon.
With this commit, if a user cannot edit or move his own message,
we no longer show the view message source icon.
2024-04-11 15:57:24 -07:00
Sayam Samal 7744c8b264 actions_popover: Fix content overflowing when the max-width is defined.
The simplebar core documentation, recommends to not style the element
initalising the simplebar at all and use an inner element instead.

Following the recommendation, we move the max-width property from the
popover tippy options, to the `.simplebar-content` element via the
`--popover-menu-max-width` custom property.

While doing so, we also simplify the max-width to `350px`, since the
responsiveness for smaller screen is already been taked care of in the
shared popover styling.

This prevents the issue where the content overflows and gets hidden
instead of wrapping, when the width of the popover reaches the set
max width (if any).
2024-04-11 15:57:24 -07:00
Sayam Samal f9ec17e78e popovers: Fix styling for multi-line menu options. 2024-04-11 15:57:24 -07:00
Sayam Samal 678a3eccab popovers: Fix width discrepancies in popover menus.
Following ca9b1060b7, we allow the content of popover menu items to
control the width of the popover.

While using `white-space: nowrap` works, we should instead use the
`max-content` intrinsic sizing so that, if necessary, we can still
provide a `max-width` to the popover which would then force the popover
menu content to wrap.
2024-04-11 15:57:24 -07:00
Sayam Samal ba64900373 popovers: Simplify popover menu top and bottom padding. 2024-04-11 15:57:24 -07:00
Sayam Samal f5bedd9501 hotkeys: Show Level 2 Shift key symbol for Shift key in popovers. 2024-04-11 15:57:24 -07:00
Sayam Samal 4105a38c1f popovers: Add minimum width to popover hotkey hints. 2024-04-11 15:57:24 -07:00
Sayam Samal dcb6252e57 popovers: Update popover hotkey hint colors. 2024-04-11 15:57:24 -07:00
Sayam Samal 19077fa1f6 actions_popover: Update icons for message actions menu options. 2024-04-11 15:57:24 -07:00
Sayam Samal 299aa7c39f popovers: Add hotkey hints support via a new handlebar template. 2024-04-11 15:57:24 -07:00
Sayam Samal 36e709c934 hotkeys: Rename adjust_mac_tooltip_keys to adjust_mac_hotkeys. 2024-04-11 15:57:24 -07:00
Sayam Samal 4b0e6ae3d8 actions_popover: Use the new "popover-menu" theme.
Fixes part of #28699.
2024-04-11 15:57:24 -07:00
Sayam Samal 422230e82d popovers: Add consistent tippy arrows which support all placements.
Added `tippy.js/dist/border.css` along with some custom CSS override,
to add arrows which inherit the border color and width of the popover,
while also supporting all placements.

Also consolidates the CSS styling of the popovers to the `tippy-box`
element, which is the recommended way to theme the element according to
https://atomiks.github.io/tippyjs/v6/themes/#creating-a-theme.
This further helps in unifying the styling of the popover and the arrow,
and prevents inconsistencies such as shadow of the popover being casted
onto the arrows.
2024-04-11 15:57:24 -07:00
Sayam Samal 6bf9c2bdfc popovers: Rename "navbar-dropdown-menu" theme to "popover-menu" theme.
Also renames the navbar dropdown related CSS terms, to their equivalent
popover related terms to accompany the name change of the theme.
2024-04-11 15:57:24 -07:00
Shubham Padia c44450c054
settings_users: Reverse order of roles in role filters.
Fixes #29687.
2024-04-11 15:35:01 -07:00
tnmkr 536f2e09e2 invite_user_modal: Always show scrollbar.
We now always show the scrollbar in invite modal body if it is scrollable.
This avoids confusion and makes it clear that some options are out of view.

Fixes #29393.
2024-04-11 14:41:38 -07:00
roanster007 0be93b8519 stream_settings: Fix error on stream setting update when compose closed.
Previously, when stream settings were updated, without opening the
compose box, assertion error were thrown.

This error was a result of a regression in compose_recipient, due to an
extra assert statement added during its typescript migration in
25ff0d4418.

This is fixed by removing the statement.
2024-04-11 11:28:55 -07:00
Karl Stolley 7291f0a919 info_density: Set font size, line height vars in dev. 2024-04-11 10:25:03 -07:00
Varun Singh 9ad7a9f0be data: Restrict parameter type to not be undefined.
Since the type of request_method(AjaxRequestHandler) has
been extended in the previous commit.Consequently the 'data'
field of 'request_method' has to be typed such that it
satisfies this change.

Because request_method's type can also be 'typeof patch' which
does not accept undefined 'data' field, I haved 'omit'-ted
'undefined' from 'data's type in function signature to satisfy
TypeScript.

Now ,in support of the changes I have made to two different function
sign(namely setting_ui.do_settings_change,dialog_widget.submit_api_request)
I am stating some points about data field inside these respective
function signs.

1.settings_ui.do_settings_change: For this 'data' was actually never
undefined. Each function call has a 'data' object passed( with one
or more fields).

2.dialog_widget.submit_api_request: For this case many function calls
actually didn't have 'data' field (ie.'data' was undefined).
BUT,for those cases it was defaulted to '{}'(see function sign).
So effectively 'request_method' didn't recieve an undefined 'data' for
this case too. I have removed the defaulting and passed '{}' in the
function calls for those cases, which effectively does the some job,
but satisfies the type.

For both these cases 'data' field isn't undefined and hence an Omit,for me
makes sense.
2024-04-11 10:08:45 -07:00
Varun Singh 9b9ea01dfa channel: Use TypeScript unions for 'AjaxRequestHandler'.
Type AjaxRequestHandler is used for typing request methods
(like channel.get, channel.post etc.)Use cases include
'request_method' parameter in settings_ui.do_settings_change
and dialog_widget.submit_api_request.

Problem with the type definition:
The current type definition( ie. 'typeof call' ) satisfies every
'request_method' type EXCEPT channel.patch request.One can notice
the difference b/w 'call' and 'patch' function in channel.ts .

Hence,We need to expand the AjaxRequestHandler type.I have unioned it
with 'typeof patch' is account for the case when 'request_method'parameter
is of type channel.patch.

Discussion:
https://chat.zulip.org/#narrow/stream/6-frontend/topic/setting_ui.20do_settings_change/near/1754557
2024-04-11 10:08:45 -07:00
Varun Singh b6473deca0 zod: Consistently use named imports. 2024-04-11 09:47:28 -07:00
Varun Singh 4985363bd7 poll_widget: Rename type to be more relevant. 2024-04-11 09:47:28 -07:00
Varun Singh 2d4bed4ab4 state_data: Fix alphabetical order. 2024-04-11 09:47:28 -07:00
evykassirer a8d261a68f dropdown_widget: Fix DropdownWidgetOptions.
Addresses this comment
https://github.com/zulip/zulip/pull/29611/files#r1559751399
2024-04-11 09:32:19 -07:00
Shubham Padia 3f6ceba39a settings_users: Add role filter to user list.
Fixes #18617.
- The role filter is added to both active and deactivated user
list. The original plan was to introduce a multi select checkbox
dropdown for the roles, but since that component is not ready yet,
we will use the dropdown component for the first iteration.
- To accomodate multiple filters, we have used an approach
similar to the one in recent_view_ui.js where we use dropdown
callback function and on("input") event on text search to set the
filter value in memory. The predicate functions uses these filters.
- We have also changed the default message when there are no
users to show to reflect `filters` instead of `current filter`.
2024-04-10 13:45:06 -07:00
Mahhheshh 68646cacfc message_edit_history: Add loading spinner.
Adds a loading spinner to the message history overlay,
improving the user experience by providing visual feedback while the
message edit history is loading.
2024-04-10 13:10:12 -07:00
evykassirer 16bf8d3df6 views_util: Convert module to typescript. 2024-04-10 12:19:52 -07:00
evykassirer 9366d42f14 dropdown_widget: Pass current value to get_options to avoid hacky this. 2024-04-10 12:19:52 -07:00
evykassirer c449bb35e2 narrow_title: Fix filter type. 2024-04-10 12:19:52 -07:00
Mahhheshh 619f85fac7 message_edit_history: Set cursor to default on hover. 2024-04-10 11:25:31 -07:00
N-Shar-ma 30b68214d3 settings: Do not scroll to save button when typing in textarea / input.
In an unsaved state, when focus is in a textarea or an input of type
text, we don't yet scroll the save button into view to not interrupt the
user's typing. When the input / textarea loses focus, we scroll then if
needed, triggered via the `change` event.
2024-04-10 11:18:17 -07:00
afeefuddin 61966e9d6e compose_tooltips: Convert module to TypeScript. 2024-04-10 11:17:20 -07:00
Lauryn Menard 39c5855b88 hash-util: Use NarrowTerm type from state_data.
Replaces the Term type in hash_util.ts with the NarrowTerm type
that is defined in state_data.
2024-04-10 11:15:27 -07:00
N-Shar-ma 7072794871 css: Make pills' content collapse according to width available.
We set `min-width: 0` on all nested flex containers for pills, not just
the pills label, which allows the label content to collapse as much as
needed with ellipsis when overflowing.

Fixes: #27205.
2024-04-05 09:14:37 -07:00
Aman Agrawal 4812c81968 click_handlers: Don't handle clicks with meta / ctrl keypress.
Fixes #17935

This allows users to ctrl + click a link to open it in new tab
without changing the state in the current tab.
2024-04-05 09:12:03 -07:00
Anders Kaseorg 64cabae46d web: Fix usage of .replace with variable replacement.
String.prototype.replace and String.prototype.replaceAll interpret
certain sequences such as $$ within a string provided as the
replacement argument.  Avoid this interpretation by providing a
function.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-05 09:11:23 -07:00
evykassirer d6f4424102 compose_actions: Convert module to typescript. 2024-04-04 16:34:42 -07:00
evykassirer 55cf08c4e6 compose: Allow stream_id of ComposeTriggeredOptions to be undefined. 2024-04-04 16:34:42 -07:00
evykassirer 5e0343816f page_params: Add narrow_topic. 2024-04-04 16:34:42 -07:00
evykassirer 85c5fe635e compose_actions: Include message type in opts for `fill_in_opts_from_current_narrowed_view`. 2024-04-04 16:34:42 -07:00
evykassirer 9cea1c0ee1 compose_actions: Include message type in opts for `complete_starting_tasks`. 2024-04-04 16:34:42 -07:00
evykassirer 2014c25cb4 compose_actions: Include message type in opts for `start`. 2024-04-04 16:34:42 -07:00
evykassirer 3ea46542ce compose_actions: Include message type in same_recipient_as_before opts. 2024-04-04 16:34:42 -07:00
evykassirer 1f7e419cee compose_actions: Include message type in show_compose_box opts. 2024-04-04 16:34:41 -07:00
evykassirer 5934081801 resize: Let bottom_whitespace_height be optional.
This aligns with the comment below of "Compute bottom_whitespace_height
if not provided by caller." I'd change this to do a check for if it's
undefined, instead of checking the type, but I don't understand
enough about `ResizeObserver` to feel confident that this would be
equivalent.
2024-04-04 16:34:41 -07:00
evykassirer d05c7a64c8 stream_data: Remove unused code branch. 2024-04-04 16:34:41 -07:00
Evy Kassirer 466560faa1
compose_actions: Fix automated scroll when resizing compose.
This code has been inoperative since 86073588be
upgraded the autosize library without migrating this event.
2024-04-04 16:33:05 -07:00
N-Shar-ma a3ed41efa0 typeahead: Redesign the function `compare_people_for_relevance`.
We make the following changes:

- Remove the dm partnership check before calling the comparator passed
by the caller, and instead have the more thorough `compare_by_pms` be
the final tie breaker. This deprioritization of dms fixes the bug where
dm partners would be prioritized even if they had not participated in
a stream conversation over recent senders who are not dm partners.

- Make the passed comparator optional, since the tie breaker is same as
the comparator that was passed so far for dms, and only pass it in case
of a stream conversation.
2024-04-04 13:13:11 -07:00
N-Shar-ma a8954ad00e tests: Add missing setup to typeahead_helper tests passing as a fluke. 2024-04-04 13:13:11 -07:00
N-Shar-ma 7c2772022b typeahead: Add check for all time dm partners to `compare_by_pms`.
For the rare case where there is no recent recipient count for a pair of
users when sorting, we now check if either has been a dm conversation
partner ever before.
2024-04-04 13:13:11 -07:00
Aman Agrawal 0a90a13bec popover_menus: Fix event handler trying to hide a hidden popover.
When user is trying to open a modal after clicking on a button
in a popover, we call popovers.hide_all() before opening the modal
which hides the popover but since the event handler call isn't
finished running yet, we call instance.hide() again resulting in
tippy throwing errors that this could be a memory leak.

We introduce a wrapper function for `instance.hide` which if
the popover/tooltip is visible before hiding it to fix it.
2024-04-04 12:51:35 -07:00
Lauryn Menard 80d4a704fe mentions: Replace "channel" wildcard when selected via typeahead.
Until "stream" is renamed to "channel" in user facing strings,
when "channel" is selected from the composebox typeahead options,
the "stream" wildcard syntax will be inserted in the message
content instead.

Adds some helper functions to util.ts to initially be used to
check/convert "channel" to "stream" during the rename process,
with the intention of then converting those helpers for the
reverse (check/convert "stream" to "channel") in the final part
of the rename process.

Part of project to rename "stream" to "channel".
2024-04-04 11:16:07 -07:00
Lauryn Menard e700e818e5 mentions: Add "channel" as a wildcard mention.
Adds "channel" to the `stream_wildcards` frozenset for stream
wildcard notifications on the backend/server.

Updates frontend/web-app to handle "channel" as the other stream
wildcards are handled in the typeahead and composebox modules.

Updates the API version and documentation for the addition of
"channel" as a wildcard mention. But does not change any of the
functionailty of (or deprecate) the "stream" wildcard at this
point.

Part of project to rename "stream" to "channel".
2024-04-04 11:16:07 -07:00
afeefuddin b32c837c6b settings_playgrounds: Convert module to TypeScript. 2024-04-04 10:45:53 -07:00
afeefuddin 50f35a22b3 state_data: Update realm properties. 2024-04-04 10:45:53 -07:00
afeefuddin af0a31f0e4 bootstrap_typeahead: Make updater property optional in TypeaheadOptions. 2024-04-04 10:45:53 -07:00
Prathamesh Kurve f9bc21f4bf
keyboard ui: Fix vim keyboard navigation from inbox view filter.
Fixes #29509.
2024-04-04 10:17:09 -07:00
Anders Kaseorg b9e55f2c4d eslint: Enable no-jquery/no-append-html.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-04 10:11:57 -07:00
Anders Kaseorg 8fb1117cef eslint: Fix no-jquery/no-append-html errors that need test changes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-04 10:11:57 -07:00
Anders Kaseorg 382af5f79f eslint: Fix no-jquery/no-append-html errors that need no test changes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-04 10:11:57 -07:00
Alex Vandiver 01860422af util: Do not use look-behind in wildcard mention checks.
92fa9ee78c switched this regex to match the server-side regex, but
Safari < 16.4 does not support look-behind in regexes.

Switch to matching on start-of-string or a positive character class.
2024-04-03 17:39:26 -07:00
Karl Stolley 6d5243148a timestamps: Calculate the maximum timestamp width in use.
Fixes: #26970
2024-04-03 17:38:43 -07:00
Karl Stolley 82d0eec0bc timestamps: Consolidate and simplify message-time properties.
This is better form, and also sets things up to render sample
timestamps for calculating their max width.
2024-04-03 17:38:43 -07:00
Karl Stolley 09d7105747 timestamps: Consolidate variable-based timestamp width. 2024-04-03 17:38:43 -07:00
Karl Stolley 1425d2f71f message_body: Hyphenate message-time class. 2024-04-03 17:38:43 -07:00
Karl Stolley c25975642a message_body: Remove status-time references.
The `.status-time` class was used only for setting a `top` value,
but that's made moot by the use of grid in the message area.
2024-04-03 17:38:43 -07:00
Anders Kaseorg 1e4427caf5 tests: Fix incorrect uses of .indexOf(…) > 0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-03 15:13:33 -07:00
Anders Kaseorg 1188a0f26d stream_settings_ui: Add missing $ prefix to jQuery object variable.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-03 14:10:21 -07:00