Commit Graph

63 Commits

Author SHA1 Message Date
Aman Agrawal
0f1cccc1cc inbox: Don't show focus outlines without inbox relevant keypress.
Untill user uses a keypress that inbox handles, we don't show
focus outlines.
2025-07-22 17:23:47 -07:00
Aman Agrawal
626524ba8e inbox: Attempt to fix inbox scrolling to top unexpectedly.
Inbox can suddenly scroll to top due to a rerender when user
is trying to scroll down. A possible caues for this is
`move_focus_to_visible_area` being triggered on scroll but the
element located using:

```
document.elementFromPoint(inbox_center_x, inbox_row_below_filters);
```

being out of view. To fix it, we try to locate the element in the
same animation frame. This will remove the possibility of element
being out of view when we try to set focus to it.
2025-07-22 17:12:50 -07:00
Aman Agrawal
fa9165236d inbox_ui: Minor refactor.
Use `inbox-folder` class to check if the row is an inbox folder.
2025-07-22 17:04:56 -07:00
Aman Agrawal
e8aa6e9ecf inbox_ui: Fix scroll jumb when coming back when scrolled down.
Used the same method used to fix it in recent view.
2025-07-22 17:04:56 -07:00
Anders Kaseorg
a29ed94e5b web: Switch to Zod mini API.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Anders Kaseorg
21db47989d web: Use Zod z.optional() functionally.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Aman Agrawal
2ba72101a2 inbox: Simplify keyboard navigation.
This makes use of `data-col-index` attribute on the elements
to know which column to focus based on user input.
2025-07-18 16:41:26 -07:00
Aman Agrawal
35c0de27fe hotkey: Add y hotkey support for inbox and recent view. 2025-07-18 16:41:26 -07:00
Aman Agrawal
47f42ed149 inbox: Redesign to show channel folders. 2025-07-18 16:41:26 -07:00
Sayam Samal
b6ff748602 inbox: Standardize inbox filter input.
This follow-up commit replaces the current inbox filter input
implementation with the redesigned input component.

Fixes part of #34476.
2025-07-03 11:45:35 -07:00
Aman Agrawal
2a325b4530 inbox: Save and restore search text for inbox and channel view. 2025-07-01 13:46:40 -07:00
Aman Agrawal
adb2884d59 inbox_ui: Fix buggy save and restore of navigation state.
The previous logic only worked correctly when user moved from
inbox view to channel topic list view and vice versa.

The logic failed if user moves out of inbox since then `save` state
is never called and hence when restore is called, the navigation
state gets reset.

Fixed by also saving state when inbox is hidden.
2025-07-01 13:46:40 -07:00
Aman Agrawal
6e73238ea3 inbox_ui: Rename save and restore functions for general use.
These functions can now also be used to save and restore
search text.
2025-07-01 13:46:40 -07:00
Tim Abbott
e298eddefc inbox: Fix calls to is_complete_for_stream_id.
The call from the inbox code was asking the wrong question -- it wants
to know if we've fetched full topic data to know whether to ask for
it. The new name for the function moved in
7d55ad3c13 helped reveal it.

There also was a mention in a comment that was half-baked; wrote the
comment properly.
2025-06-19 13:05:15 -07:00
Aman Agrawal
861db87a60 inbox: Use a different filter value per channel.
Instead of using a common dropdown filter for inbox and channels
topic list, we use a different filter value for each of them.
2025-06-17 16:14:34 -07:00
Aman Agrawal
2b1789ae29 inbox: Use DEFAULT_FILTER instead of undefined.
While this case is not possible, it is better to use
`DEFAULT_FILTER`.
2025-06-17 16:14:34 -07:00
Aman Agrawal
4914dea7b4 channel_topics_list: Ignore stream being muted.
We display all topics unless muted in standard view regardless of
if the channel is muted.
2025-06-17 16:14:34 -07:00
Aman Agrawal
365f3cdeb9 inbox: Alter dropdown text for channel view. 2025-06-17 16:14:34 -07:00
Aman Agrawal
55d9ea95fb inbox_ui: Use list widget to render topics for channel view.
Rendering all the topics of a channel can be very expensive, so we
use list widget to progressively render the items.
2025-06-10 11:49:05 -07:00
Aman Agrawal
36b63adc03 inbox_ui: Fix empty view text for both channel and normal view visible.
Fixed by hiding inbox view empty text when channel view is visible.
To ensure normal inbox view empty text is hidden, we make it think
there is visible unread topics.
2025-05-13 10:21:50 -07:00
Aman Agrawal
eaeed0e0f8 inbox_ui: Store channel navigation state separately from inbox view.
We store last visited channel navigation state and restore it if
possible. This is store separately from inbox view state.
2025-05-09 15:13:56 -07:00
Aman Agrawal
1ace8b80f5 hash_util: Set channel URL based on user setting.
We now render channel feed URL or channel topics list URL in
all elements based on user setting.
2025-05-09 15:13:56 -07:00
Aman Agrawal
97c69e3038 inbox: Show inbox channel view based on user setting.
Fixes: #29574
2025-05-09 15:13:56 -07:00
Aman Agrawal
0ad2f8fc85 inbox_ui: Directly import inbox_util to code clarity. 2025-05-09 15:13:56 -07:00
Aman Agrawal
903e65aba8 util: Fix spelling mistake. 2025-05-09 15:13:56 -07:00
Harsh
c8763f919f compose-closed-ui: Use specific button label when composing to self.
When the compose box is closed, if the selected message is for the
direct conversation with the current user, then we show "Message
yourself" as the compose reply button text.

Adds `decode_dm_recipients_user_ids_from_url` helper function to
hash_util, which parses a narrow URL for DM recipient user IDs.
Checks that "dm" operand, which should be a string of user emails,
also passes the check for all the email addresses being valid
compose recipients.

Co-Authored-By: Lauryn Menard <lauryn@zulip.com>
2025-04-28 20:50:51 -07:00
Aman Agrawal
001c16ef86 inbox: Handle keyboard navigation for read topics.
Since inbox only has unread topics visible, rows having no
unread counter was not handled. Added that support so that
inbox style channel view can use it.
2025-04-24 16:22:13 -07:00
Aman Agrawal
c7eca03b68 inbox_ui: Use same type of item in cols_to_focus.
Instead of a mix of jQuery and HTMLElement, we only use
HTMLElement as item type for `cols_to_focus`.
2025-04-24 16:22:13 -07:00
Aman Agrawal
6fe93a3ff6 inbox_ui: Remove extra effort to return message object.
There is no difference in this case when a message object is
returned vs not. So, we just return as soon as we have the
requried data.

This will useful when won't have message ids associated with topic
easily when rendering inbox style channel view.
2025-04-10 11:52:03 -07:00
Aman Agrawal
22b50e2312 hashchange: Hide other views when showing a view in the same call.
Instead of having two calls everywhere to show a view and hide other
views, we move the logic to hide the other views inside the show
function of the view.

This will help as we will add other views to the app to keep the
logic to hide other views in the `show` function of the view to show.
So, the logic calling `show` for a view
doesn't have to iterate through hiding all the other views first.
2025-04-10 11:51:58 -07:00
Lauryn Menard
b48134a03e compose-closed-ui: Clarify object and type for reply to button.
Renames ComposeClosedMessage to ReplyRecipientInformation, and
exports the type from compose_closed_ui.ts so that the functions
that construct these objects from the recent conversations and
inbox views have the type available.

Also, renames the variables for these objects to not be "message",
so that it's clear that these are not Message objects.
2025-03-25 16:23:41 -07:00
Lauryn Menard
94fe5fc173 compose-closed-ui: Rename update_reply_recipient_label.
Renames update_reply_recipient_label to
update_recipient_text_for_reply_button.

This better matches the function that sets the default text for
the closed compose box button: set_standard_text_for_reply_button.
2025-03-25 16:23:41 -07:00
sanchi-t
874e7bacf9 popover_menus_data: Hide actions user can't take for archived channels.
Hide actions users cannot perform for messages and topics within
archived channels.
2025-03-07 18:08:41 -08:00
whilstsomebody
6c6d5fbb6a people: Use Intl.ListFormat rather than .join(",").
Fixes: #26936

Co-authored by: CIC4DA <dhruv.jain9100@gmail.com>
2025-03-04 16:58:23 -08:00
Karl Stolley
d7ac4aa651 user_circles: Show deactivated icon in sidebars, inbox, recents. 2025-02-24 18:18:16 -08:00
Prakhar Pratyush
3d2fa9f788 inbox_ui: Fix buggy mark as read for empty string topic.
Earlier, marking empty string topic as read via Inbox UI
resulted in marking the stream as read.

This commit fixes the bug.
2025-02-18 09:47:13 -08:00
roanster007
41f30e1052 topics: Change topic links of left sidebar to use new permalinks.
This commit updates the topic links obtained from clicking
the topics in the left sidebar, recent view and inbox, and
those obtained from "Copy link to topic" to use the new
topic permalinks.

Fixes part of #21505.
2025-02-12 16:21:03 -08:00
Pratik Chanda
05fbee9f5a inbox_ui: Show unread @-mention indicator for DMs in inbox view.
Earlier, only unread @-mentions in streams were shown in inbox view
while DMs lacked this indicators.

This commit introduces unread @-mention indicators for DM rows in inbox
view using `unread_mention_dms` which stores `user_ids_string` mapped to
`message_id`s having mention.

Fixes part of zulip#28849.
2025-02-05 13:27:57 -08:00
Aman Agrawal
0313435b8d inbox_ui: Avoid AssertionError when starting new compose message.
This is hard to debug but likely not a critical UX bug.
2025-02-04 10:44:46 -08:00
Prakhar Pratyush
e63d9f1e89 inbox-search: Add support to search for empty string topics.
We show `realm_empty_topic_display_name` for empty string
topics in the inbox view.

This commit makes it possible for users to search for
the `realm_empty_topic_display_name` value to filter out empty
string topics.
2025-01-22 16:09:46 -08:00
Prakhar Pratyush
91899e627e inbox_row: Show realm_empty_topic_display_name for empty topic name.
This commit adds support to display `realm_empty_topic_display_name`
value in the Inbox UI for topics having the actual value of
empty string.
2025-01-10 14:32:55 -08:00
Anders Kaseorg
77f97762c6 eslint: Fix unicorn/explicit-length-check. (#32666)
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-11 09:19:46 -08:00
Anders Kaseorg
ec3177c834 web: Add explicit extensions to imports.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
sanchi-t
fa268877d3 stream: Show (archived) at the end of deactivated stream names.
When a stream is deactivated the title area and messages are
re-rendered to update the stream name with `(archived)` suffix.
2024-10-25 16:06:42 -07:00
Anders Kaseorg
9c2f38193d stream_data: Always initialize pin_to_top.
This simplifies the StreamSubscription type, and parallels how we
always initialize every other property that isn’t in
NeverSubscribedStream (audible_notifications, desktop_notifications,
email_notifications, push_notifications, wildcard_mentions_notify,
color, is_muted).  email_address was already optional.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-08 16:52:42 -07:00
evykassirer
d9f25d01a1 web: Use util.the for accessing element of single-item lists. 2024-08-20 09:48:15 -07:00
Aman Agrawal
2011e0df76 inbox_ui: Fix row_focus not synced with inbox rows.
Have one inbox row and focus on it. Mark the message as read in
another tab. Press `r` in the first tab will return an error as
the row_focus didn't change but there is no present. So, we
fix it by updating the row_focus if it can get out of bounds
when updating inbox view.
2024-08-02 09:36:37 -07:00
Tim Abbott
f61f138b75 tooltips: Clean up aria-label for visiblity tooltips.
Using different punctuation for the aria-label from the tooltip is
silly. Additionally, we don't need to repeat the channel name in
aria-label; it essentially will never be seen and the message list
copy of getting the channel name was buggy.
2024-07-25 08:24:14 -07:00
Pratik Chanda
1ccf5e3ac3 tooltip: Change tooltip info for default topic menu option.
Earlier tooltip info for the default topic menu notification option
had static string to display.

This commit changes the string info and includes channel name and its
corresponding privacy icon to display in the tooltip.
2024-07-24 13:34:52 -07:00
Prakhar Pratyush
f586366272 onboarding_steps: Update button text of onboarding modals to "Got it".
Changing the button text of one-time modals to introduce the recent and
inbox view to say "Got it" rather than "Continue" helps reinforce the 
vocabulary we're using "Got it" = dismiss one-time content forever.
2024-07-23 12:28:59 -07:00