Commit Graph

7 Commits

Author SHA1 Message Date
evykassirer 605c4688b1 buddy list: Show self in search results.
We should search for what the user asked us to search for.
CZO conversation:
https://chat.zulip.org/#narrow/stream/101-design/topic/search.20buddy.20list.20for.20self/near/1630454

This commit also stops the user from being at the top of
the search list, so that the search list is fully
alphabetical (though still sorted by online status).

We switch to not having the user at the top of the list
only when there's search text in the search bar, otherwise
there'd be a visual jump that would happen just by opening
the search bar. There's almost always visual change when
entering text into the search input field, so that seems
like the time to change the sorting.
2023-10-02 12:05:42 -07:00
Lalit 1c8bf4f050 people: Make `get_by_user_id` type-safe.
We should make `get_by_user_id` type-safe in the sense that it's caller
should not expect undefined values and hence it's caller should not
need to validate the user ids.

To do this I extracted a method `maybe_get_user_by_id` which is
type-unsafe version of this function which will allow undefined values
and will behave exactly the same as the previous version. So the callers
which expects the undefined values from this function should use this
new function `maybe_get_user_by_id`.

Probably about half of these callers are implicitly iterating through
all users in the people.js data set and thus by construction should
never fail, but it's simpler to just convert all existing callers than
do that audit.
2023-07-02 16:57:16 -07:00
Lauryn Menard 73e5812831 node-tests: Update references to "private message" and "PM".
Updates any use of "private message" and "PM" in the `web/tests`
directory to instead use "direct messages".
2023-06-26 11:07:28 -07:00
Alex Vandiver 64b277d845 blueslip: Reduce cardinality of blueslip.error() calls.
Particularly when grouping in Sentry, pushing the ids and such into
the additional data section helps group like errors together better.
2023-05-09 13:16:28 -07:00
Lauryn Menard 0f7341dd48 narrow: Add frontend support for `dm:` narrow and `/dm/...` URL.
Adds support in the web app for `dm` operator. This will deprecate
the `pm-with` operator, but existing links/URLs are still supported
for backwards-compatilibity.

This commit updates the web app default behaviors to default to
the new narrow/URLs `dm/...` and `/#narrow/dm/...` when navigating
and searching in the app.

There is some general clean up of references to private messages
or PMs to be either direct messages or DMs in these changes.

The general API changelog and documentation updates will be done
in a final commit in the series of commits that adds support for
the various new direct message narrows.
2023-04-25 09:07:08 -07:00
Ujjawal Modi 915084fe82
timerender: Reword user activity info from "Last active:" to "Active".
Fixes #22758.
2023-04-07 09:24:15 -07:00
Anders Kaseorg cea1119423 node_tests: Move to web/tests.
This lets us simplify the long-ish ‘../../static/js’ paths, and will
remove the need for the ‘zrequire’ wrapper.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-23 16:04:17 -08:00