Commit Graph

4605 Commits

Author SHA1 Message Date
Sahil Batra c41a352a12 invite: Use include_default_realm_subscriptions parameter in webapp.
This commit adds code to use include_default_realm_subscriptions
when user selects "Subscribe to default streams" checkbox
in the invite modal instead of passing the stream ids of
default streams.
2024-05-14 14:20:07 -07:00
Sahil Batra 016917679e invites: Do not show streams if user cannot subscribe others.
We do not show the streams list in invite modal if the user
does not have permission to subscribe others to stream and
show a notice mentioning it.
2024-05-14 14:20:07 -07:00
Anders Kaseorg 4d407c6b8d copy_and_paste: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-14 14:12:05 -07:00
Anders Kaseorg 2e776bf8dc copy_and_paste: Fix CSS selector injection bug.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-14 14:12:05 -07:00
Anders Kaseorg a41d0b16e6 user_topics_ui: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-14 14:01:04 -07:00
Anders Kaseorg c50b28610c user_topics_ui: Fix backwards setTimeout arguments.
Introduced by commit 401c8bbb21
(#27254).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-14 14:01:04 -07:00
Aman Agrawal f57fb0862e message_edit: Fix event handlers lost on restoring edit form.
To avoid event handlers being lost when we restore a message edit
form we go through the process of creating the edit form for the
message again. This has the additional benefit of updating the
status of buttons based on org settings like GIF or upload button.
2024-05-14 12:21:49 -07:00
Aman Agrawal ca8f04ea35 message_list_view: Remove unnecessary parameter passed.
Since we are already selecting the previously selected id in
`reselect_selected_id` there is no need to pass the message id here.
2024-05-14 12:21:49 -07:00
Aman Agrawal a30029c8ad upload: Don't render upload button instead of hiding.
Doesn't make sense to hide the upload button button later when
we can just not show it if the browser doesn't has support for
it.
2024-05-14 12:21:49 -07:00
Aman Agrawal 7a831617af message_edit: Directly use currently_editing_messages for checks.
Makes it easier to search and verify changes related to
currently_editing_messages.
2024-05-14 12:21:49 -07:00
Sahil Batra 9d87131fa8 settings: Use new format to update can_mention_group setting.
This commit updates the webapp code to use new format to update
the can_mention_group setting.
2024-05-14 12:17:15 -07:00
Anders Kaseorg 6479cc5970 unread_ops: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-14 12:15:44 -07:00
Anders Kaseorg 0cbc6cb82b unread_ops: Remove unused bulk_update_read_flags_for_narrow arguments.
Introduced by commit 664f29b4f1
(#28560).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-14 12:15:44 -07:00
Anders Kaseorg d7a9cb6c12 unread_ops: Simplify handle_mark_unread_from_here_error with callback.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-14 12:15:44 -07:00
Anders Kaseorg a54d178b8a unread_ops: Fix do_mark_unread_by_narrow arguments after rate limiting.
Introduced by commit f0d87fcf6e
(#23605); propagated by commit
0bef960b34 (#29521) and commit
42a6929f5c (#30047).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-14 12:15:44 -07:00
Shubham Padia 4ee37244bb recent_topics: Change background color in dark mode on hover on a row.
Fixes #30083.
We have used the dark theme color for the left sidebar row hover:
`--color-background-active-narrow-filter`. We are not using that variable
directly since we don't want a change in that color affecting the color in
recent conversations.
We've also used a single color on hover compared to 2 different colors
for unread and read row before. Light mode also uses a single color on
hover.
Relevant CZO conversation:
https://chat.zulip.org/#narrow/stream/101-design/topic/Hover.20color.20in.20Recent.20conversations.20dark.20mode.2E/near/1797727
2024-05-14 11:46:37 -07:00
Anders Kaseorg 2e8fdab896 user_pill: Avoid unnecessary array allocations.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-13 18:12:54 -07:00
Anders Kaseorg c0c852046d user_group_pill: Avoid unnecessary array allocations.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-13 18:12:54 -07:00
Anders Kaseorg b3fbfd9da8 stream_pill: Avoid unnecessary array allocations.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-13 18:12:54 -07:00
Tim Abbott 4bf8c19b32 message_view_header: Fix misleading variable name.
It never contained only icon data.
2024-05-13 17:56:30 -07:00
nimishmedatwal 941c5daf36 navbar: Describe views in top navbar.
Adds description in views styled like stream descriptions also adds a
help center link to the appropriate page at the end of each
description.

Fixes #29769.
2024-05-13 17:56:30 -07:00
afeefuddin d36e19389d add_subscribers_pill: Convert module to TypeScript. 2024-05-13 16:57:02 -07:00
afeefuddin bf3eb2c269 user_pill: Fix type annotations.
Change the type annotation of current_items in create_item_from_email
to InputPillItem<CombinedPillItem>.
2024-05-13 16:57:02 -07:00
afeefuddin 0927e03677 user_group_pill: Fix type annotations.
Change type annotations of get_user_ids and create_item_from_group_name
to accept CombinedPillContainer and InputPillItem<CombinedPillItem>
respectively.
2024-05-13 16:57:02 -07:00
afeefuddin 0f622d3025 stream_pill: Fix type annotations.
Change type annotations of get_user_ids and create_item_from_stream_name
to accept CombinedPillContainer and InputPillItem<CombinedPillItem>
respectively.
2024-05-13 16:57:02 -07:00
afeefuddin 0b7c63a695 typeahead_helper: Add type CombinedPillItem. 2024-05-13 16:57:02 -07:00
Aman Agrawal 80d19fe15d css: Fix theme switch changing color of elements at different intervals.
Due to these transitions the theme switch from dark <-> light was
not pleasant as the background color and color changed at different
intervals.
2024-05-13 13:21:10 -07:00
evykassirer d4d57193df message_store: Clarify display_reply_to type for stream/dm messages. 2024-05-13 12:51:00 -07:00
evykassirer 724306df10 recent_view_ui: Convert module to typescript. 2024-05-13 12:51:00 -07:00
N-Shar-ma 1121d317c2 compose: Restructure HTML for common compose textarea/preview parent.
Earlier, the compose textarea and the preview (container) occupied the
same grid area, 1 at a time. Now, they are both children of a common div
which is assigned the same grid area. This allows adding more elements
to the same grid area in the future.

This is purely a code change and should have no visible effects.

This is a prep commit for relocating the compose expand / collapse
buttons to the top right inside corner of the textarea / preview.
2024-05-13 12:11:29 -07:00
Temidayo32 91bd6e2b12 compose_closed_ui: Migrate module to TypeScript. 2024-05-12 17:41:22 -07:00
evykassirer 28c13f6d0e message_store: Modify get_pm_full_names to only take user ids.
This will let us properly call it from compose_closed_ui without
a full message object, which we need to convert it to typescript.
2024-05-12 17:41:22 -07:00
evykassirer 8fb1c0683e compose_closed_ui: Reduce usage of hacky message data structure. 2024-05-12 17:41:22 -07:00
Anders Kaseorg 3d8802b276 buddy_list: Fix empty_list_widget_for_list.hbs usage.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-12 16:51:47 -07:00
Aman Agrawal d4ea7e251b narrow: Fix browser back not navigation to previous selected message.
Reproducer:
* Go to a stream narrow.
* Scroll up to select a previous message.
* Click on a different stream in the left sidebar.
* Click browser back button, you land at first unread message instead
  of your selected message.

Fixed by updating the hash before we render the new message list.
2024-05-10 16:03:45 -07:00
Aman Agrawal 4619a1e028 recent_view: Make load more fetch substantially more data.
We keep fetching until we reach first unread message or have
50k messages worth of data displayed once user hits `Load more`
in recent view.
2024-05-10 16:03:45 -07:00
Prakhar Pratyush bf2360bcf2 onboarding_steps: Remove hotspot as an onboarding_step.
Earlier, hotspots and one-time notices were the valid
type of onboarding step.

Now, one-time notice is the only valid type.

Fixes #29296.
2024-05-10 12:30:22 -07:00
Aman Agrawal 97e3015ec1 stars: Fix flaky test due to message list not yet rendered.
With combined feed no longer cached, this test became flaky as
it took longer for combined feed to load.

Verified that other tests waiting on `.message-list` don't need
this change.
2024-05-10 11:59:18 -07:00
Kenneth Rodrigues 42a6929f5c mark unread: Use correct value of include_anchor in case of errors.
When the request to mark a thread as unread fails, we should use the
value of include_anchor that was sent in the request, not false.

Modified handle_mark_unread_from_here_error to take an object instead of
parameters.
2024-05-10 10:53:50 -07:00
Prakhar Pratyush ac2152fdfd onboarding: Replace channel messages in new organizations.
As a part of improving onboarding experience, this
commit updates the channels and messages initially
available in new orgs.

Fixes #29297.
2024-05-09 14:05:35 -07:00
evykassirer 08c916b337 recent_view_ui: Remove unused second argument to destroy_indicator. 2024-05-09 12:35:49 -07:00
evykassirer 67a15320ad recent_view_ui: Rename list_widget import to match convention. 2024-05-09 12:35:49 -07:00
evykassirer d7cab7c1d4 list_widget: Remove undefined from create's return type. 2024-05-09 12:35:49 -07:00
Aman Agrawal 4efc760c70 recent_view: Fix filter input focused on load.
Since there are no rows to set focus in recent view before initial
fetch, we were falling back to set focus on input filter after
rendering recent view.

Waiting for initial fetch to complete helps us set focus on the
table easily while recent view is also open for user to play with
if the load takes longer.
2024-05-09 11:02:12 -07:00
N-Shar-ma 74cdd6148e compose: Fix bug in preview where image at the end would be misaligned.
The `margin-bottom` was removed for the last element in the preview in
e55f5a1b59 to remove vertical shifts when
toggling preview mode, but it is not needed for image / video previews,
so now `margin-bottom` is not set to 0 for the last inline preview.
2024-05-09 10:48:02 -07:00
Anders Kaseorg e0f634ae11 poll_widget: Remove handle_events augmentation of jQuery interface.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-08 17:58:58 -07:00
N-Shar-ma cb58752909 widgets: Cache event handler instead of entire jquery for each widget.
In 61b3c698af we stopped restoring widgets
from the cache, so the only purpose of the cache remaining was to access
the event handler patched onto the widget jquery.

Now instead of the entire jquery object, we cache just the event handler
since that's the only thing we need from the cache, and do not patch it
onto the widget jquery object.
2024-05-08 16:47:07 -07:00
Kenneth Rodrigues 0bef960b34 mark unread: Use more efficient endpoint.
Use the "/json/messages/flags" instead of "/json/messages/flags/narrow"
when we have fully fetched the current view.
Update messages on the basis of id instead of updating the entire
narrow.

Fixes #28945.
2024-05-08 10:58:41 -07:00
Aman Agrawal 806ebdf5ad bootstrap_typeahead: Use `fixed` position for typeaheads.
Since the reference for these typeaheads is has a fixed position
unlike say message controls which move on scroll and need to be
repositioned, we can use `fixed` position for typeaheads too so
there is no jumps when user is trying to scroll when a typeahead
is active.

This basically replaces the commit where where we remove `fixed`
as an argument to `Typeahead` library. We can add it later if
any of our typeaheads don't need to be fixed positioned.
2024-05-08 10:05:27 -07:00
Aman Agrawal d1050376e1 bootstrap_typeahead: Fix compose typeahead overflowing when expanded.
When compose box is expanded, typeahead overlfows the top of the window.
We move the typeahead to the bottom of the screen and let
preventOverflow shift it into the visible area.
2024-05-08 10:05:27 -07:00
Aman Agrawal 4e87f35c7d typeahead: Use tippy to position typeaheads without a specified parent.
Except for search typeaheads which have a specific parent container,
we position typeaheads using tippy.
2024-05-08 10:05:27 -07:00
Aman Agrawal 689489573a bootstrap_typeahead: Remove fixed argument.
Tippy uses a different strategy for positioning items, so this
will not be required.
2024-05-08 10:05:27 -07:00
Karl Stolley 12984c9cef selected_message: Adjust light-mode border to specification.
This introduces the alpha described by @terpimost in #22059.
2024-05-08 09:59:40 -07:00
Karl Stolley 7baf3e5e4d selected_message: Correctly express outline colors as variables. 2024-05-08 09:59:40 -07:00
Aman Agrawal 55e6d2fbd0 message_fetch: Vary how much history we fetch based on date range.
To better make use of server load when fetching message history for
users, we limit how much history we fetch in the initial loading
experience based on how much time in the organization's message
history it corresponds to.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2024-05-08 09:47:05 -07:00
Aman Agrawal 6e2d501b71 left_sidebar: Fix underline overlapping with login icon. 2024-05-07 16:52:57 -07:00
Aman Agrawal c0706ca9f6 compose_recipients: Fix broken compose state after restoring draft.
After restoring a draft with no recipient, compose was broken
as `message_type` assertion fails.
2024-05-07 16:52:57 -07:00
Prakhar Pratyush 5b3641d92d help: Move 'channels-and-topics' to 'introduction-to-topics'.
Introduction to channel is now moved out as a new article,
the 'channel-and-topics' contains only introduction to topics,
hence renamed.
2024-05-07 16:51:48 -07:00
N-Shar-ma bb6e7ab537 compose: Add keyboard shortcuts to compose control buttons' tooltips.
For more discoverability, the keyboard shortcuts for preview, and bold,
italic and link formatting are now displayed in the tooltips of those
compose buttons.
2024-05-07 16:11:35 -07:00
N-Shar-ma 61b3c698af widgets: Always render and activate widgets in the current view.
Earlier we did not activate widgets if their rendered HTML was cached,
and also when narrowing to the combined feed view. This caused bugs with
widgets not being activated, and so not responding to any interactions.

Now we unconditionally render and activate widgets in the current view,
irrespective of the cached HTML or the view being narrowed to.
2024-05-07 12:59:47 -07:00
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