Commit Graph

4360 Commits

Author SHA1 Message Date
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