Commit Graph

53645 Commits

Author SHA1 Message Date
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
Anders Kaseorg 487d61caf5 tests: Fix direct mutation of ES modules again.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-20 22:08:20 -07:00
Satyam Bansal 9cde3abd4d bot-settings: Add modal to generate Integration URL.
Fixes part of #25976.
2023-09-20 17:49:51 -07:00
Sahil Batra bd631c4424 group_settings: Sort groups list by name. 2023-09-20 15:40:11 -07:00
Sahil Batra 00424748f4 settings: Disable submit button when no input is changed.
We now disable the submit button if no input is changed
in modals used for editing name and descriptions of
stream and user groups. The button is enabled if any
value is changed.
2023-09-20 15:40:11 -07:00
Sahil Batra a37c91e5f9 group_settings: Use tippy-zulip-delayed-tooltip for buttons.
This fixes an issue where the "Change group info" and "Delete group"
buttons would display a tooltip immediately upon closing the modal
opened by clicking on them.
2023-09-20 15:40:11 -07:00
Sahil Batra 107ebc140b group_settings: Show "not-allowed" cursor when not allowed to add users.
This commit adds code to show the "not-allowed" cursor when hovering over
pill input in "Add members" section if a user is not allowed to add members
to the group like we do for "Add subscribers" section in stream settings.
Previously the "not-allowed" cursor was show only when hovering over "Add"
button.
2023-09-20 15:40:11 -07:00
Sahil Batra f6d3b2667f user_group_creation: Add simplebar to user group creation form.
This commit adds simplebar to user group creation form and makes
it consistent with stream creation form.

This also fixes transparency issue in footer of group creation
form dark theme.

Fixes #24443.
2023-09-20 15:40:11 -07:00
Sahil Batra 5a6a8a63e1 group_settings: Fix placeholder in pill input for members.
This commit fixes placeholder text in the pill input for user
group members UI in "#groups" overlay to mention members instead
of subscribers. For this we add a new template instead of using
add_subscribers_form.hbs and thus this commit also updates
the class names used in javascript code accordingly.
2023-09-20 15:40:11 -07:00
Sahil Batra c4ba7699bd groups_settings: Fix placeholder in search input for members list.
This commit updates placeholder for search input in user group
members list to be "Filter members" instead of "Filter subscribers".
2023-09-20 15:40:11 -07:00
Sahil Batra 8dba149364 group_settings: Fix messages shown when adding users to a group.
This commit fixes the messages shown when adding users to a group
to use "add" instead of "subscribe".

Fixes part of #24443.
2023-09-20 15:40:11 -07:00
Sahil Batra a3124ddcb3 settings: Rename search-container class.
This commit renames search-container class used in stream and
user group settings overlay to list-toggler-container since
the element does not contain search UI and instead contains
the toggler for "Subscribed" and "All streams" and similarly
for "Your groups" and "All groups".
2023-09-20 15:40:11 -07:00
Sahil Batra 5518a0073e group_settings: Show loading spinner in group edit modal.
This commit adds code to show loading spinner on clicking
submit such that modal does not closes before the request
succeeds and error, if any, is shown inside the modal.

And as a result we remove the saving indicator and "Saved"
message which was shown on request completing successfully
but it should be fine as we already have this behavior for
stream settings.
2023-09-20 15:35:26 -07:00
Sahil Batra cb203fbe9a user_groups: Do not allow empty group names in backend.
We now raise error if a user tries to create a group with
empty name or tries to update a group name to be empty.
2023-09-20 15:35:26 -07:00
Karl Stolley 301e1c07b8 left_sidebar: Hold hoverable area to + icon.
This shifts the 8px of margin to the wrapper, preserving the space
to the right of the + icon, but no longer allowing it to shift the
hover state or trigger the tooltip when clicking actually activates
the search filter.

Fixes #11494 (at least the one fixable part; the rest should be
closed as wontfix)
2023-09-20 15:31:41 -07:00