Commit Graph

53709 Commits

Author SHA1 Message Date
Aman Agrawal 0e5c6ec5b9 inbox: Fix inbox scrolled to top when returning from other narrows.
This has to do with narrows and inbox view sharing the same
scrolling container.
2023-09-21 16:50:01 -07:00
Aman Agrawal 6411dbe124 inbox: Allow user to escape out of empty inbox list.
Now pressing escape would work to set focus out of inbox if inbox
is empty.
2023-09-21 16:50:01 -07:00
Aman Agrawal 274eac3313 hotkey: Fix incorrect input to inbox change focus function.
inbox_ui.change_focused_element takes only 1 input.
2023-09-21 16:50:01 -07:00
Aman Agrawal f07a032b79 inbox: Add button to open stream popover in stream header. 2023-09-21 16:50:01 -07:00
Aman Agrawal 518dcb2ad1 inbox: Make topic actions menu accessible via keyboard. 2023-09-21 16:50:01 -07:00
Aman Agrawal 97a1b91b40 inbox: Add button to open topic menu popover. 2023-09-21 16:50:01 -07:00
Aman Agrawal a904de2d6e inbox: Only scroll to focused row when using keyboard to navigate.
Fixes #26780

This prevents inbox from suddenly scrolling when inbox view is
updated.
2023-09-21 16:50:01 -07:00
Aman Agrawal 425ab4ca13 inbox: Show unread mention indicator for topics and streams.
Fixes #26747
2023-09-21 16:50:01 -07:00
Aman Agrawal 53f6041dd5 inbox: Extract function to update stream data. 2023-09-21 16:50:01 -07:00
Aman Agrawal 35f7bf68ee inbox: Calculate unread count of headers based on active filters.
Fixes #26773

Now unread count of header is a sum of non hidden topics / DMs
unread count.
2023-09-21 16:50:01 -07:00
David Rosa de9220830b help: Document troubleshooting screen for mobile notifications.
- Adds instructions for getting to the "Troubleshooting" screen and
  contacting Zulip support.
2023-09-21 16:36:53 -07:00
Joelute 25841ad852 compose: Update text on warning banner when user is not allow to dm.
Previously, the text on the warning banner when the user is not allowed
to direct message is "Direct messages are disabled in this organization.".
While the text on the warning banner when the user is not allowed to
send message to stream is "You do not have permission to post in this
stream". These wording is inconsistent with each other and we should
change it to keep them consistent and aligned with each other.

Fixes: #21896.
2023-09-21 16:24:15 -07:00
Joelute f8f5196c75 compose: Allow the user to direct message bots despite of policy.
After the changes in #25572, users were no longer able to start a direct
message with bots if the organization disabled direct messages. However,
we should allow direct messages to bots regardless of the policy because
it's a useful interface for users to interact with various classes of
bots.

user_ids_string_to_ids_array was also modified to prevent cases where
the split function returned an array of [0] rather than [] when dealing
with a empty id string of "".

Fixes: #21896.
2023-09-21 16:24:15 -07:00
Aman Agrawal dc62e31d1f message_scroll: Update sticky header date more frequently.
To make the date change in recipient header more smooth, we
update it with throttled scroll event. This can cause some
performance regressions on slow computers during scrolling but
nothing I can notice even with 6x CPU slowdown on Intel i7 on mac.

This is an alternative to #25163 since implementing it seems harder
than expected. The date changing animation cannot be made smooth without
serious structural changes to how messages are rendered.
2023-09-21 16:17:47 -07:00
Zixuan James Li d3e4456562 linkifiers: Use only the handle for dragging.
So that the user can still select and copy text from the body of the
linkifier rows. It might be helpful if we extend this behavior to other
draggable rows, like those for custom profile fields settings.

Fixes #26798
2023-09-21 15:27:16 -07:00
Alex Vandiver 11a1cb9630 narrow: Skip the realm_id limit on joins across to usermessage.
The unique index on `(user_id, message_id)` that is the
`zerver_usermessage` table is rather specific, and even the PostgreSQL
extended statistics are not enough for it to realize there is a
correlation between the `realm_id` in the message table and the
`user_id` in the usermessage table.  This means that adding the
`realm_id` limit when there is a join to `zerver_usermessage` flips
the query plan from a nested loop of unique usermessage index-only
scan, with an index scan of the messages pkey -- to a parallel hash
join of the messages limit with a index scan of just the user_id limit
on usermessages.  It thinks this is necessary because it thinks that
the `realm_id` limit may remove a large number of messages from the
usermessage set -- which is totally untrue.

Remove the `realm_id` limit if we have a usermessage join.
2023-09-21 13:58:34 -07:00
Daniil Fadeev 472ef3d890 user_card_popover: Remove redundant `userlist_placement` variable. 2023-09-21 11:25:18 -07:00
Daniil Fadeev f609bc1f21 user_card_popover: Move sidebar popover logic to its own function. 2023-09-21 11:25:18 -07:00
Daniil Fadeev dcb3db37ce user_card_popover: Stop exporting functions that shouldn't be.
These functions aren't used outside the user_card_popover module, so
we shouldn't export them.
2023-09-21 11:25:18 -07:00
N-Shar-ma c1741e94d2 typeahead: Allow highlighting across multiple words for user names.
`make_query_highlighter` called `highlight_with_escaping_and_regex`
once for each word in the phrase, due to which only 1 word searches
could be highlighted. For example searching for `two wo` resulted
in no highlighting at all in `two words`.

One call per word in the phrase was also redundant since the called
function can handle a multi word query. So now the entire phrase is
passed to the called function just once.
2023-09-21 11:24:13 -07:00
N-Shar-ma c3c8bad0de typeahead: Highlight only matching word prefixes in search suggestions.
Earlier mid word parts matching with the search query were also
highlighted (made bold), but since actual matching for showing search
suggestions is based on prefix matching, this highlighting logic is
now made to be in sync with the search suggestions matching logic.
2023-09-21 11:24:13 -07:00
N-Shar-ma d899c03da6 markdown: Fix 3+ digit marker lists retaining alignment for 2 digits.
Until now, lists with 3+ digit markers would have their beginnings cut
off to align with 2 digit markers. We fix that by having custom styling
for markers where we align markers only up to 2 digits, and let larger
numbers take up more space pushing the list item content forward as
required to fit the marker. Works for multiline and nested list items too.
2023-09-21 10:51:22 -07:00
Mateusz Mandera 00f4f77358 zilencer: Remove /json versions of push bouncer endpoints.
These don't make sense (because authentication here is not based on
session) and aren't used.
2023-09-21 10:42:15 -07:00
evykassirer ebdcbc28f6 search: Wrap long search suggestions.
CZO conversation: https://chat.zulip.org/#narrow/stream/101-design/topic/long.20search.20suggestions

This commit also changes some styling for the pills,
to ensure that they are properly aligned when search
results wrap.
2023-09-21 08:58:31 -07:00
evykassirer da72c9069c search: Rename class to search-input to avoid bootstrap.
The class `search-query` is a bootstrap classname, and using
a name unique from that both lets us rely on bootstrap less
and also not have to override some boostrap styles.
2023-09-21 08:58:31 -07:00
evykassirer 3e089c7ac6 search: Remove extra filter check before closing search.
Existing callsites to `close_search_bar_and_open_narrow_description`
already do this filter check, so this is extra and unnecessary.
Doing the check always before calling this function probably
makes more sense given the name of the function sounding like
it always takes action.
2023-09-21 08:58:31 -07:00
YashRE42 cb04ae1f95 search: Redesign search box.
Fixes #21798.
2023-09-21 08:58:31 -07:00
evykassirer ea619ff75f message basics e2e: Add expect_home in two places to match other tests. 2023-09-21 08:58:31 -07:00
evykassirer 62b31e8b01 search: Close search bar when typeahead closes with no search input.
Currently the search bar doesn't close when you e.g. click outside
of the search input field. In the new design we do we want the search
bar to close on most blur events. Instead of setting up a new blur
handler, this commit checks if the search bar should be unexpanded
any time the typeahead is hidden (which does usually happen on blur).
2023-09-21 08:58:31 -07:00
evykassirer 63c424c5bc typeahead: Ignore blurs that change focus within the `parentElement`. 2023-09-21 08:58:31 -07:00
evykassirer c4ff1a1158 typeahead: Add option for tab to not have enter functionality. 2023-09-21 08:58:31 -07:00
evykassirer b5b671c360 typeahead: Add closeInputFieldOnHide callback from hide().
This commit adds a function to make it easier to close
the search bar consistently in any siuation where the
typeahead closes, to avoid being in broken middle states.
2023-09-21 08:58:31 -07:00
evykassirer d43d8ba127 typeahead: Add openInputFieldOnKeyUp option. 2023-09-21 08:58:31 -07:00
David Rosa 448788c545 help: Add mobile instructions to change the privacy of a stream. 2023-09-21 08:57:22 -07:00
David Rosa be932400e3 help: Add mobile instructions to change stream description. 2023-09-21 08:57:22 -07:00
David Rosa ef0f418078 help: Add mobile instructions to rename a stream. 2023-09-21 08:57:22 -07:00
David Rosa f2180875e0 help: Update "Change the privacy of a stream".
- Updates page to follow current help center documentation patterns.
- Adds `tip` to change a stream's privacy via stream settings.
2023-09-21 08:57:22 -07:00
David Rosa a3ae87ccb7 help: Update "Change stream description".
- Updates page to follow current help center documentation patterns.
- Revises intro text.
- Adds `tip` to change stream description via stream settings.
2023-09-21 08:57:22 -07:00
David Rosa 069c34b514 help: Update "Rename a stream".
- Updates page to follow current help center documentation patterns.
- Adds Markdown include `tip` to rename stream via stream settings.
2023-09-21 08:57:22 -07:00
Anders Kaseorg acd0c5568a corporate: Remove Twitter third-party JavaScript and branding.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-21 08:53:37 -07:00
Philip Durbin 47288c7d79
settings: link to list of emoticon translations.
Under "Emoji" under "Preferences", we link to the rules explaining
what emoticons exist, e.g., :) translates to 😄, etc.

These docs: https://zulip.com/help/configure-emoticon-translations

Fixes #18147.
2023-09-21 08:46:29 -07:00
David Rosa 2ebf7ae643 help: Add mobile instructions in "Starting a new topic".
- Adds mobile instructions block.
- Adds two more related articles.
2023-09-21 08:41:40 -07:00
David Rosa 6588190918 help: Delete "Start a new topic" page in favor of "Starting a new topic".
- Deletes page, updates references, and adds URL redirect.
2023-09-21 08:41:40 -07:00
David Rosa 83883b08a6 help: Add "View your bots" page.
- Adds new page with instructions for how to view your personal bots.

Fixes #26796.
2023-09-21 08:38:32 -07:00
David Rosa cf5bc5bd1d help: Fix formatting issue in "Dark theme" page. 2023-09-21 08:38:07 -07:00
Daniil Fadeev bb58fecf28 user_card_popover: Fix keyboard navigation opening manage menu.
`focus_first_popover_item` was executed right after the click handler
 had asked to open the popover, but before the popover was mounted to
 the DOM, causing the popover to not work correctly when opened via
 the keyboard.
2023-09-21 00:29:43 -07:00
Daniil Fadeev 0ab788c9c9 user_card_popover: Migrate "Manage menu" popover to Tippy.
Fixes part of #23632.
2023-09-21 00:29:43 -07:00
Daniil Fadeev 732a1403e1 user_card_popover: Create an API for `user_card_popover` module.
This API will serve as the primary entry point for the
`user_card_popover` module. It will help to control and check the
state of all the popovers in this module.
2023-09-21 00:29:43 -07:00
Daniil Fadeev cda95b0485 user_card_popover: Fix "Manage Menu" popover focus on the second item. 2023-09-21 00:29:43 -07:00
Daniil Fadeev f3938acc71 user_card_popover: Fix blueslip error messages. 2023-09-21 00:29:43 -07:00