Commit Graph

2104 Commits

Author SHA1 Message Date
Anders Kaseorg 5327bcc5ac user_group_settings_ui: Merge into user_group_edit.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-09 10:58:50 -07:00
Anders Kaseorg 63b4e74cea views_util: Cut import of narrow.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-09 10:54:00 -07:00
Aman Agrawal e8ced3e74a hello: Fix google analytics not working.
Since GA was only imported in portico bundle which we don't use
in hello page due to bootstrap, GA was not loaded.
2023-10-08 17:30:02 -07:00
Anders Kaseorg 70748181da recent_view_ui: Cut import of user_card_popover.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 19:45:13 -07:00
Anders Kaseorg 27991bd5b0 topic_zoom: Merge into stream_list.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 19:43:55 -07:00
Anders Kaseorg a43ea3efaa pm_list: Cut import of topic_zoom.
topic_zoom.is_zoomed_in() can’t be true in pm_list.zoom_in, because
“more conversations” would not be visible in that state.  And it can’t
be true when pm_list.handle_narrow_activated calls pm_list.expand,
because “more topics” would not be visible in an all-DM view.  So the
only non-inert call is via click_handlers; move it there.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 19:43:55 -07:00
Anders Kaseorg 564e91f3a8 narrow: Cut import of hashchange.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 19:41:59 -07:00
evykassirer 4adfd57378 message_fetch: Rename batch size constants to specify narrow views.
This is in preparation for introducing a batch size constant for
the recent view.
2023-10-06 17:30:33 -07:00
Anders Kaseorg ba1895cb1c notifications: Rename to desktop_notifications.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 16:22:40 -07:00
Anders Kaseorg fcaf1fe7d5 notifications: Split out audible_notifications module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 16:22:40 -07:00
Anders Kaseorg 6ef08873d8 notifications: Split out compose_notifications module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 16:22:40 -07:00
Anders Kaseorg db20fd12e0 notifications: Split out message_notifications module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 16:22:40 -07:00
Anders Kaseorg e48771993b widgetize: Move widget registration to new widgets module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 13:17:51 -07:00
Anders Kaseorg 0c991d813f sent_messages: Lift event loop restarting to transmit.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 13:17:51 -07:00
Anders Kaseorg 339b1351f8 echo: Pass transmit.send_message as a callback.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 13:17:51 -07:00
Aman Agrawal b9dd4a14c9 hello: Write better variable names. 2023-10-06 12:51:57 -07:00
Aman Agrawal cbb09f4ee6 hello: Fix client logos not changing on hello page.
Since `zulip.com` doesn't has `/hello` in URL, the JS code
for hello page events was not running. We extract it to a new
file and just always run it.
2023-10-06 12:51:57 -07:00
Prakhar Pratyush b274169ccc util: Fix the 'find_wildcard_mentions' function.
The function considers @**all**, @**everyone**, @**stream**,
and @**topic** as wildcard mentions.

Earlier, the function didn't have a check to match @**topic**
in the message_content.
2023-10-06 11:38:37 -07:00
Aman Agrawal 1a867a43a7 left_sidebar_inbox_popover: Move to new popovers folder. 2023-10-06 11:24:40 -07:00
Aman Agrawal 115de0e847 inbox_ui: Fix unable to insert new stream.
There were 2 issues:
* Wrong format for creating new Map object used.
* Use of `topic_dict` instead of `topics_dict`, which resulted
in `stream_key` being present in `topics_dict` even after stream
has been marked as read. This made inbox believe that the
stream was already rendered even though it was not.
2023-10-06 10:50:34 -07:00
Anders Kaseorg 9dc1e8ed17 sent_messages: Finish .received → .saw_event rename.
Commit 3cc2adcd3b (#25423) missed this
in the rename, resulting in extra creation of no-op timers.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 10:49:42 -07:00
N-Shar-ma 4e9c1293e2 compose: Only save as draft when the compose state is about to change.
Up until now, we unconditionally saved any message content as a draft
whenever the composebox was `start`ed. This led to a lot of unnecessary
saving of drafts even when the composebox stayed undisturbed.

To fix this, now we only save the draft when the compose state is about
to be overidden, which is by either changing the recipient narrow or by
restoring another draft.

Fixes: #26976.
2023-10-06 09:22:41 -07:00
Aman Agrawal 895439ad83 register: Move style to css file. 2023-10-06 09:19:01 -07:00
Aman Agrawal e1b22a04e7 register: Fix for small widths. 2023-10-06 09:19:01 -07:00
Aman Agrawal 15e837ff25 org_registration: Fix page for mobile widths. 2023-10-06 09:19:01 -07:00
Lauryn Menard f19d7e36ee recipient-row: Remove logic for floating recipient bar.
In #23900, the floating recipient bar was replaced with a sticky
recipient bar. The logic in `id_for_recipient_row` was not updated
for that change, so we update that function to just get the first
message in the group and return that message ID.
2023-10-06 09:13:27 -07:00
Anders Kaseorg 971a003180 compose_actions: Extract compose_reply module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 09:07:43 -07:00
Aman Agrawal f85f904fc1 user_profile: Remove redundant call to popovers.hide_all.
`show_user_profile` is only triggered by clicks. Even `enter`
keypress is triggers a click via
`popover_items_handle_keyboard_with_overrides`.
2023-10-06 09:03:46 -07:00
Aman Agrawal 6cfb7239c8 popover_menus: Remove hide_all from on_show functions.
Since popovers only open after a click, all popovers hide already
if the clicks were outside them.
2023-10-06 09:03:46 -07:00
Aman Agrawal 4e4daf2ce5 overlays: Call open and close hooks for modals too.
Right now, the hooks only have a popovers.hide_all call but this
may need to audited when used in future. Added a comment to
that effect.
2023-10-06 09:03:46 -07:00
Aman Agrawal 3cbfe6f31f tests: Remove unnecessary mocks of recent_view_util.
Since is_visible was refactored to use a variable, these mocks
are not required.

Also, since is_visible return `false` by default, mocking it
to return false is not required.
2023-10-06 08:35:21 -07:00
Anders Kaseorg c56f784489 compose: Move update_email to compose_state.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 08:34:39 -07:00
Anders Kaseorg 833a15e121 compose: Move call button display functions to compose_call_ui.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 08:34:39 -07:00
Anders Kaseorg 9c70f92514 reload: Move initialize to new reload_setup module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 08:34:39 -07:00
Anders Kaseorg c4d338a6ab drafts: Extract drafts_overlay_ui module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 08:30:31 -07:00
Anders Kaseorg d5064fc7b2 narrow: Extract narrow_title module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-05 16:26:45 -07:00
Aman Agrawal f2a00c7b9d inbox: Render rows in sorted order.
Fixes #26962

We sort topic and dm data by latest_msg_id and render them.

For updates, we remove rows which for which latest_msg_id was
changed and them insert them again at the correct index.
2023-10-05 15:52:02 -07:00
Aman Agrawal 1d126078a2 unread: Add option to include max msg id in unread topic/dm data. 2023-10-05 15:52:02 -07:00
Aman Agrawal 57c1c56028 inbox: Migrate data objects to use Map.
Since Map store values in insertion order, it will be required
to show rows sorted by time.

This is not pretty but can be improved when
https://github.com/handlebars-lang/handlebars.js/pull/1996
is released.
2023-10-05 15:52:02 -07:00
Aman Agrawal ab1eb78c21 inbox: Fix incorrect dict being accessed.
topics_dict[stream_key] is a dict of topics and doesn't have
is_hidden property. We actually want to access streams_dict
here.
2023-10-05 15:52:02 -07:00
Anders Kaseorg dd584ba8a9 stream_settings_ui: Move set_color to stream_settings_api.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-05 15:32:04 -07:00
Alex Vandiver 62015a0b48 portico: Remove now-unnecessary twitter-tweet CSS and JS.
The content that this affected was removed in acd0c5568a.
2023-10-05 15:06:10 -07:00
Anders Kaseorg c4221332cd stream_color: Add missing $ prefix to set_colorpicker_color parameter.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-05 14:52:13 -07:00
Anders Kaseorg e8a2a5ce36 compose: Move initialize to new compose_setup module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-05 14:42:19 -07:00
Anders Kaseorg 6e725f0d17 compose: Move call link insertion to new compose_call_ui module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-05 14:42:19 -07:00
David Rosa 13e1a389b0 help: Fix missing icons in "Stream permissions".
This brings back the icons in the legend for the Stream permissions
tables that disappeared somehow.
2023-10-05 12:11:51 -07:00
evykassirer c54ca567a9 typeahead: Only return early from blur if parentElement is specified.
From a bug reported here:
https://chat.zulip.org/#narrow/stream/9-issues/topic/Typeahead.20fails.20to.20automatically.20close/near/1655321
2023-10-05 11:51:42 -07:00
Tim Abbott 3d804ef186 pm_list: Rename handle_narrow_deactivated.
It did the same thing as handle_narrow_activated when passed the
home_msg_list filter.

We still leave a renamed version for use by the inbox/recent views.
2023-10-05 10:31:23 -07:00
Tim Abbott 0a189119aa stream_list: Rename handle_narrow_deactivated.
It did the same thing as handle_narrow_activated when passed the
home_msg_list filter.

We still leave a renamed version for use by the inbox/recent views.
2023-10-05 10:31:23 -07:00
Tim Abbott 20b2323c67 left_sidebar: Deduplicate handle_narrow_deactivated.
handle_narrow_activated did the same thing is passed the home_msg_list
filter.
2023-10-05 10:31:23 -07:00