Commit Graph

16 Commits

Author SHA1 Message Date
Anders Kaseorg e84bb9ff2c tests: Unmock state_data.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-09 15:34:58 -07:00
Anders Kaseorg 8e49ca163b tests: Unmock user_settings.
We previously auto-mocked this out of expediency, but that made it
impossible to test anything that uses the Zod schemata in the same
module.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-09 15:34:58 -07:00
Anders Kaseorg ba8b9a445b eslint: Fix unicorn/prefer-node-protocol.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-08 16:54:15 -07:00
evykassirer 5c6e3a7aac buddy_list: Refactor render code for readability. 2024-09-23 15:41:00 -07:00
Anders Kaseorg b545abe1e2 typos: Fix typos caught by mwic.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-20 13:55:00 -07:00
Anders Kaseorg 8fb1117cef eslint: Fix no-jquery/no-append-html errors that need test changes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-04 10:11:57 -07:00
evykassirer ea2818786e buddy_list: Convert module to typescript. 2024-02-22 16:05:27 -08:00
evykassirer 5434130171 buddy list: Calculate render data once per view.
The work now being done in set_render_data used
to be done in render_more, which is called in
batches of 20 rows at a time. This work only
needs to be done once per narrow/view, so this
is a great performance improvement.
2024-02-22 16:05:27 -08:00
evykassirer 231aa098cb buddy list: Create section in buddy list for users from narrow.
Fixes #21285.
2024-02-22 16:05:27 -08:00
Evy Kassirer 6e902defba
node tests: Use noop helper function pattern in test files.
Some files already were using `noop` in place of `() => {}`.
It's both clearer what it means and is easier to type.
This updates all test files to fully use `noop`, and
adds a shared import from the test lib file.
2023-12-14 14:51:33 -08:00
evykassirer 02845a1d59 buddy list: Rename key to more accurate user_id. 2023-11-21 08:49:52 -08:00
evykassirer 74e66b71ac buddy list: Rename sel variables to selector to avoid abbreviations. 2023-11-20 15:40:42 -08:00
evykassirer 1f8db236f5 buddy list: Rename user_presences to buddy-list-users-matching-view.
This switches to our preferred dash-separated classnames
instead of underscore-separated, and also updates the
classname to be differentiable from users that aren't
part of the current narrow.

Until the next commit that splits the buddy list, the
name is a bit inaccurate since it still contains all
the users.
2023-10-31 16:06:07 -07:00
evykassirer 6563e621fd buddy list: Simplify argument to get_data_from_keys. 2023-10-26 18:33:53 -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
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