zulip/static/js
Suyash Vardhan Mathur 20a97bdb05 events: Add functionality to mark messages as unread.
Co-authored-by: Steve Howell <showell@zulip.com>
Co-authored-by: Tim Abbott <tabbott@zulip.com>

This commit adds the backend functionality to
mark messages as unread through update_message_flags
with `unread` flag and `remove` operation.

We also manage incoming events in the webapp.

Tweaked by tabbott to simplify the implementation and add an API
feature level update to the documentation.

This commit was originally drafted by showell, and showell
also finalized the changes.  Many thanks to Suyash here for
the main work here, which was to get all the tests and
documentation work moving forward.
2022-03-15 18:00:35 -07:00
..
analytics
billing pricing: Replace "Zulip Standard" with "Zulip Cloud Standard". 2022-02-09 11:00:24 -08:00
bundles styles: Rename night_mode.css to dark_theme.css. 2021-11-18 16:55:35 -08:00
portico js: Fix various sloppy uses of String#replace. 2022-03-04 12:26:49 -08:00
stats js: Fix various sloppy uses of String#replace. 2022-03-04 12:26:49 -08:00
types/stacktrace-gps
about_zulip.js about_zulip: Migrate to handlebars. 2021-06-15 11:55:20 -07:00
activity.js web_public_view: Replace `web_public_visitor` with `spectator`. 2021-06-16 07:46:34 -07:00
add_subscribers_pill.js edit subscribers: Generalize pill/button handling. 2022-02-22 16:29:36 -08:00
admin.js settings: Avoid dropdown_list_widget on same line as labels. 2022-03-15 16:08:41 -07:00
alert_popup.ts
alert_words.js alert_words: Fix alert words with HTML special characters. 2022-03-04 12:26:49 -08:00
alert_words_ui.js settings: render_alert_words_ui -> rerender_alert_words_ui. 2022-02-25 17:33:11 -08:00
all_messages_data.js
attachments_ui.js templates: Move uploaded_files_list to settings/. 2021-06-02 20:36:21 -07:00
avatar.js dialog_widget: Remove the `fade` parameter. 2021-10-26 18:20:17 -07:00
blueslip.ts lint: Fix typos found by codespell. 2021-10-19 16:51:13 -07:00
blueslip_stacktrace.ts dependencies: Upgrade JavaScript dependencies. 2022-03-01 23:09:46 -08:00
bot_data.js
browser_history.js docs: Consistently hyphenate “web-public”. 2022-01-28 17:45:45 -08:00
buddy_data.js hash_util: Rename _uri functions to _url. 2022-03-01 18:14:31 -08:00
buddy_list.js
channel.js docs: Fix many spelling mistakes. 2022-02-07 18:51:06 -08:00
click_handlers.js js: Fix various sloppy uses of String#replace. 2022-03-04 12:26:49 -08:00
color_class.ts ts: Convert color_class module to TypeScript. 2021-06-22 09:14:09 -07:00
color_data.ts ts: Convert color_data module to TypeScript. 2021-06-22 09:14:09 -07:00
colorspace.ts
common.ts ts: Convert common module to TypeScript. 2021-06-22 09:09:36 -07:00
components.ts ts: Convert components module to TypeScript. 2021-07-05 17:04:06 -07:00
compose.js compose: Fix resolved topic warning after send. 2022-03-15 17:59:15 -07:00
compose_actions.js compose: Show topic resolve warning only when compose is nonempty. 2022-03-15 17:59:15 -07:00
compose_closed_ui.js docs: Fix many spelling mistakes. 2022-02-07 18:51:06 -08:00
compose_error.ts compose: Use loading spinner as loading indicator. 2021-12-02 15:11:15 -08:00
compose_fade.js
compose_fade_helper.js
compose_fade_users.js
compose_pm_pill.js status_emoji: Show status emoji in compose_pm pills. 2022-02-11 13:30:08 -08:00
compose_state.js compose: Extend empty compose navigation logic to recipient boxes. 2022-01-21 16:40:13 -08:00
compose_ui.js message_scroll: Show scroll to bottom button. 2022-02-18 13:29:57 -08:00
compose_validate.js compose: Show topic resolve warning only when compose is nonempty. 2022-03-15 17:59:15 -07:00
composebox_typeahead.js docs: Add missing space in “time zone”. 2022-02-24 14:05:12 -08:00
condense.js condense: Do not cache message_content height of 0 from recent_topics. 2022-01-02 12:12:36 -08:00
confirm_dialog.js dialog_widget: Migrate modal to Micromodal. 2021-10-26 18:20:17 -07:00
copy_and_paste.js misc: Replace "day mode" with "light theme" in comments. 2021-11-26 22:03:29 -08:00
csrf.ts ts: Convert csrf module to TypeScript. 2021-07-05 17:04:06 -07:00
css_variables.js
dark_theme.js gear_menu: Allow user to configure preferred theme. 2022-02-18 11:29:48 -08:00
debug.js
deprecated_feature_notice.js deprecated_feature_notice: Migrate modal to dialog_widget. 2021-10-29 16:09:39 -07:00
desktop_integration.js
dialog_widget.js dialog_widget: Mention post_render in optional parameters for launch(). 2022-03-07 12:44:36 -08:00
drafts.js Revert "drafts: Use simplebar for scrollbar." 2022-02-28 15:26:47 -08:00
dropdown_list_widget.js dropdown_list_widget: Hide 'disable' button when nothing is selected. 2022-03-02 17:18:50 -08:00
echo.js docs: Fix many spelling mistakes. 2022-02-07 18:51:06 -08:00
emoji_picker.js js: Simplify indexing arrays from the end with Array#at. 2022-01-24 09:58:54 -08:00
emojisets.js docs: Add missing space in “emoji set”. 2021-09-08 15:31:28 -07:00
favicon.js lint: Fix JS style in last commit. 2021-11-01 11:07:01 -07:00
feature_flags.ts
feedback_widget.js docs: Fix many spelling mistakes. 2022-02-07 18:51:06 -08:00
fetch_status.js docs: Fix many spelling mistakes. 2022-02-07 18:51:06 -08:00
filter.js resolved_topic: Add and use predicate is_resolved. 2022-03-07 21:35:00 -08:00
flatpickr.js lint: Fix missing newline at EOF. 2022-01-28 11:51:29 -08:00
floating_recipient_bar.js js: Simplify indexing arrays from the end with Array#at. 2022-01-24 09:58:54 -08:00
fold_dict.ts fold_dict: Fix @typescript-eslint/member-ordering. 2021-10-17 07:15:09 -07:00
gear_menu.js gear_menu: Fix template variables passed from page_params. 2021-08-07 06:19:43 -07:00
giphy.js compose: Extract method to get compose click target. 2021-12-03 14:29:26 -08:00
global.d.ts ts: Convert ui_util module to TypeScript. 2021-07-05 17:04:06 -07:00
hash_util.js hash_util: Rename _uri functions to _url. 2022-03-01 18:14:31 -08:00
hashchange.js hash_util: Move enc/decodeHashComponent to shared. 2022-03-01 18:14:31 -08:00
hbs.d.ts
hotkey.js hotkey: Fix enter key being handled both by browser and the app. 2022-03-15 16:14:25 -07:00
hotspots.js hotspots: Remove intro_reply hotspot. 2021-12-07 21:55:59 -08:00
huddle_data.js
i18n.ts docs: Fix many spelling mistakes. 2022-02-07 18:51:06 -08:00
info_overlay.js user_settings: Add option to disable escape key navigation to default view. 2021-10-29 18:15:30 -07:00
input_pill.js status_emoji: Show status emoji in compose_pm pills. 2022-02-11 13:30:08 -08:00
invite.js invite: Add frontend support to send an invite which never expires. 2022-02-24 16:32:20 -08:00
keydown_util.ts
lazy_set.ts ts: Convert lazy_set module to typescript. 2022-01-18 13:24:02 -08:00
lightbox.js js: Fix various sloppy uses of String#replace. 2022-03-04 12:26:49 -08:00
linkifiers.js
list_cursor.js
list_util.ts ts: Convert list_util module to TypeScript. 2021-06-22 09:14:09 -07:00
list_widget.js dropdown_list_widget: Add support for Multiselect dropdown list widget (MDLW). 2021-07-29 10:09:03 -07:00
loading.ts js: Fix @typescript-eslint/restrict-template-expressions. 2021-09-22 18:06:06 -07:00
local_message.js
localstorage.js
markdown.js js: Convert .split(…).join(…) pattern to .replace(). 2022-03-04 12:26:49 -08:00
markdown_config.js hash_util: Rename _uri functions to _url. 2022-03-01 18:14:31 -08:00
message_edit.js resolved_topic: Implement resolve, unresolve, and display. 2022-03-07 21:35:00 -08:00
message_edit_history.js message-editing: Add support for dynamic elements in edit-history. 2022-02-22 15:00:01 -08:00
message_events.js compose: Show topic resolve warning only when compose is nonempty. 2022-03-15 17:59:15 -07:00
message_fetch.js specators: Fix persistent recent topics loading indicator. 2022-03-04 15:51:09 -08:00
message_flags.js
message_helper.js status_emoji: Show status emoji in message_body. 2022-02-11 13:02:56 -08:00
message_list.js message_list: Add helper for checking if a message list has unreads. 2022-02-18 14:48:31 -08:00
message_list_data.js message_list: Add helper for checking if a message list has unreads. 2022-02-18 14:48:31 -08:00
message_list_view.js message_edit: Don't display resolved topics as MOVED. 2022-03-10 12:00:53 -08:00
message_lists.js
message_live_update.js events: Add functionality to mark messages as unread. 2022-03-15 18:00:35 -07:00
message_parser.ts ts: Convert message_parser module to TypeScript. 2021-07-09 12:42:31 -07:00
message_scroll.js message feed: Notify user when messages are not being marked as read. 2022-02-18 14:48:31 -08:00
message_store.js status_emoji: Show status emoji in message_body. 2022-02-11 13:02:56 -08:00
message_user_ids.ts
message_util.js message_events: Ask server if cannot filter locally. 2022-02-17 12:56:33 -08:00
message_view_header.js icons: Replace fa-globe icon with a custom globe icon. 2022-03-01 11:36:38 -08:00
message_viewport.js js: Simplify more code using default parameters and destructuring. 2021-06-25 16:34:04 -07:00
muted_topics.js js: Rename muting module to muted_topics. 2021-06-30 16:32:55 -07:00
muted_topics_ui.js js: Rename muting_ui module to muted_topics_ui. 2021-07-09 10:00:45 -07:00
muted_users.js js: Split out muted_users module from muting. 2021-06-30 16:32:55 -07:00
muted_users_ui.js dialog_widget: Append dialog_widget to the body element. 2021-10-26 18:20:17 -07:00
narrow.js message feed: Notify user when messages are not being marked as read. 2022-02-18 14:48:31 -08:00
narrow_banner.js narrow_banner: Add special notice for spectators. 2022-02-15 17:21:41 -08:00
narrow_error.js narrow_banner: Move empty narrow messages to handlebar templates. 2021-12-07 13:38:48 -08:00
narrow_state.js docs: Fix many spelling mistakes. 2022-02-07 18:51:06 -08:00
navbar_alerts.js navbar_alerts: Add alerts for demo org deadlines. 2021-09-10 16:31:54 -07:00
navigate.js unread_ops: Add process_scrolled_to_bottom(). 2022-02-18 14:48:31 -08:00
notifications.js js: Fix various sloppy uses of String#replace. 2022-03-04 12:26:49 -08:00
overlays.js modal: Add support for event handler on closing a modal. 2022-02-08 16:50:46 -08:00
padded_widget.ts ts: Convert padded_widget module to TypeScript. 2021-07-05 17:04:06 -07:00
page_params.ts settings: Add user_can_create_web_public_streams function. 2021-11-23 10:48:20 -08:00
password_quality.ts js: Fix @typescript-eslint/restrict-plus-operands. 2021-09-22 18:06:06 -07:00
peer_data.js
people.js events: Add functionality to mark messages as unread. 2022-03-15 18:00:35 -07:00
pill_typeahead.js eslint: Fix unicorn/prefer-code-point. 2021-12-03 14:33:53 -08:00
pm_conversations.js js: Split out muted_users module from muting. 2021-06-30 16:32:55 -07:00
pm_list.js node tests: Remove tricky UI-related tests for pm_list. 2022-03-15 11:33:16 -07:00
pm_list_data.js pm list: Extract pm_list_data module. 2022-03-15 11:33:16 -07:00
pm_list_dom.js
poll_widget.js poll: Handle duplicate poll options. 2021-11-10 09:07:03 -08:00
popover_menus.js tippyjs: Avoid unsafe allowHTML API in favor of <template> elements. 2022-03-03 10:13:24 -08:00
popovers.js edit_history: Use modern edit history format in frontend. 2022-03-04 10:25:48 -08:00
presence.js js: Remove unused buddy_data.huddle_fraction_present function. 2022-02-03 10:59:33 -08:00
reactions.js js: Avoid _.first, _.last, _.initial, _.tail. 2022-01-24 15:54:21 -08:00
ready.ts ts: Convert ready module to TypeScript. 2021-06-22 09:14:09 -07:00
realm_icon.js
realm_logo.js misc: Replace "night" and "day" with "dark" and "light". 2021-11-26 22:03:29 -08:00
realm_playground.js
realm_user_settings_defaults.ts user_settings: Add option to disable escape key navigation to default view. 2021-10-29 18:15:30 -07:00
recent_senders.js
recent_topics_data.js recent_topics: Split into three modules. 2021-06-10 15:53:05 -07:00
recent_topics_ui.js hash_util: Rename _uri functions to _url. 2022-03-01 18:14:31 -08:00
recent_topics_util.js recent_topics: Don't rely on ":visible" to avoid forced reflow. 2021-11-08 18:30:44 -08:00
reload.js js: Fix various sloppy uses of String#replace. 2022-03-04 12:26:49 -08:00
reload_state.ts
reminder.js hash_util: Rename _uri functions to _url. 2022-03-01 18:14:31 -08:00
rendered_markdown.js js: Fix various sloppy uses of String#replace. 2022-03-04 12:26:49 -08:00
resize.js left-sidebar: Make subscription link non-sticky. 2022-02-11 14:28:09 -08:00
rows.js
rtl.js eslint: Fix unicorn/prefer-code-point. 2021-12-03 14:33:53 -08:00
schema.js
scroll_bar.js docs: Fix many spelling mistakes. 2022-02-07 18:51:06 -08:00
scroll_util.js
search.js
search_pill.js
search_pill_widget.js
search_suggestion.js search_suggestions: Remove filters unusable by spectator. 2022-02-10 11:37:38 -08:00
search_util.ts
sent_messages.js dependencies: Upgrade JavaScript dependencies. 2021-06-08 10:15:52 -07:00
server_events.js web_public_view: Replace `web_public_visitor` with `spectator`. 2021-06-16 07:46:34 -07:00
server_events_dispatch.js events: Add functionality to mark messages as unread. 2022-03-15 18:00:35 -07:00
settings.js change_password: Migrate modal to dialog_widget. 2021-11-23 15:41:54 -08:00
settings_account.js CVE-2021-3967: Only regenerate the API key by authing with the old key. 2022-02-25 14:00:52 -08:00
settings_bots.js modal: Add support for linking the submit button to a form element. 2021-11-22 15:00:38 -08:00
settings_config.ts invite: Add frontend support to send an invite which never expires. 2022-02-24 16:32:20 -08:00
settings_data.ts settings_data: Remove redundant check from user_can_edit_topic_of_any_message. 2021-11-24 10:37:51 -08:00
settings_display.js default_language: Migrate modal to dialog_widget. 2021-11-16 17:02:29 -08:00
settings_emoji.js dialog_widget: Remove the `fade` parameter. 2021-10-26 18:20:17 -07:00
settings_exports.js
settings_invites.js invite: Add frontend support to send an invite which never expires. 2022-02-24 16:32:20 -08:00
settings_linkifiers.js dialog_widget: Remove the `fade` parameter. 2021-10-26 18:20:17 -07:00
settings_muted_topics.js settings: Clean up muted_topics/users rendering logic. 2022-02-25 17:33:11 -08:00
settings_muted_users.js settings: Clean up muted_topics/users rendering logic. 2022-02-25 17:33:11 -08:00
settings_notifications.js settings: Grey out muted streams in personal settings. 2022-03-03 14:51:15 -08:00
settings_org.js js: Convert .split(…).join(…) pattern to .replace(). 2022-03-04 12:26:49 -08:00
settings_panel_menu.js
settings_playgrounds.js
settings_profile_fields.js settings: Fix external account profile field initialization order. 2022-02-28 16:30:49 -08:00
settings_realm_user_settings_defaults.js settings: Fix behavior of realm-level notification batching settings UI. 2021-12-03 16:03:02 -08:00
settings_sections.js settings: Add sorting feature for list of alert words. 2022-02-25 17:33:11 -08:00
settings_streams.js
settings_toggle.js settings: Change "Settings" to "Personal" in the toggle tab. 2021-07-01 11:47:14 -07:00
settings_ui.js docs: Fix many spelling mistakes. 2022-02-07 18:51:06 -08:00
settings_user_groups.js status_emoji: Show status emoji in compose_pm pills. 2022-02-11 13:30:08 -08:00
settings_users.js js: Fix various sloppy uses of String#replace. 2022-03-04 12:26:49 -08:00
setup.js channel: Simplify password change tracking. 2021-10-05 10:23:43 -07:00
spectators.js docs: Add missing space to compound verbs “back up”, “log in”, etc. 2022-02-07 19:20:54 -08:00
spoilers.ts js: Fix @typescript-eslint/restrict-template-expressions. 2021-09-22 18:06:06 -07:00
starred_messages.js frontend: Add new user_settings module for user's settings. 2021-08-01 15:30:17 -07:00
starred_messages_ui.js dialog_widget: Append dialog_widget to the body element. 2021-10-26 18:20:17 -07:00
stream_bar.js stream_data: Rename get_invite_only helper method. 2021-11-22 15:32:14 -08:00
stream_color.js stream_color: Fix stream color not updating to default. 2022-02-09 16:20:24 -08:00
stream_create.js stream_settings: Implement dropdown widget for "stream post policy". 2022-03-10 15:11:35 -08:00
stream_create_subscribers.js stream create: Overhaul create-stream add-subscribers UI. 2022-03-07 16:58:58 -08:00
stream_create_subscribers_data.js stream create: Overhaul create-stream add-subscribers UI. 2022-03-07 16:58:58 -08:00
stream_data.js stream_settings: Improve stream_post_policy_values order, description. 2022-03-10 15:11:06 -08:00
stream_edit.js stream_settings: Implement dropdown widget for "stream post policy". 2022-03-10 15:11:35 -08:00
stream_edit_subscribers.js edit streams: Change headings and move filter box. 2022-03-04 12:01:09 -08:00
stream_events.js settings: Pass a single object to settings_notifications functions. 2021-09-21 14:56:27 -07:00
stream_list.js hash_util: Rename _uri functions to _url. 2022-03-01 18:14:31 -08:00
stream_muting.js settings: Grey out muted streams in personal settings. 2022-03-03 14:51:15 -08:00
stream_pill.js node tests: Directly test simple stream_pill helpers. 2022-02-22 16:29:36 -08:00
stream_popover.js resolved_topic: Add and use predicate is_resolved. 2022-03-07 21:35:00 -08:00
stream_settings_containers.js stream settings: Extract stream_settings_containers.js. 2021-12-16 15:28:11 -08:00
stream_settings_data.js hash_util: Rename _uri functions to _url. 2022-03-01 18:14:31 -08:00
stream_settings_ui.js manage streams: Promote "Announce stream" in UI. 2022-03-03 10:08:08 -08:00
stream_sort.js minor: Move filter logic for stream sort to utils.js. 2021-06-08 14:58:45 -07:00
stream_topic_history.js message_edit: Fix live update bug in left sidebar. 2021-06-29 10:00:52 -07:00
stream_topic_history_util.js
stream_ui_updates.js subscribers: Improve selector for editing subscribers. 2022-02-08 15:21:45 -08:00
sub_store.ts js: Fix @typescript-eslint/restrict-template-expressions. 2021-09-22 18:06:06 -07:00
submessage.js minor: Use warn instead of error for widgets. 2021-06-14 17:46:16 -07:00
subscriber_api.js subscribers: Extract subscriber_api. 2022-02-22 16:29:36 -08:00
templates.js
timerender.ts tippyjs: Avoid unsafe allowHTML API in favor of <template> elements. 2022-03-03 10:13:24 -08:00
tippyjs.js settings: Grey out muted streams in personal settings. 2022-03-03 14:51:15 -08:00
todo_widget.js docs: Fix many spelling mistakes. 2022-02-07 18:51:06 -08:00
top_left_corner.js
topic_generator.js js: Rename muting module to muted_topics. 2021-06-30 16:32:55 -07:00
topic_list.js docs: Add missing space to compound verbs “back up”, “log in”, etc. 2022-02-07 19:20:54 -08:00
topic_list_data.js resolved_topic: Implement resolve, unresolve, and display. 2022-03-07 21:35:00 -08:00
topic_zoom.js
transmit.js reminder: Don't ack server for reminder / scheduled messages. 2021-11-10 09:12:23 -08:00
tutorial.js
typeahead_helper.js js: Convert .split(…).join(…) pattern to .replace(). 2022-03-04 12:26:49 -08:00
types.ts lint: Fix typos found by codespell. 2021-10-19 16:51:13 -07:00
typing.js typing_notifications: Send requests only if send_private_typing_notifications. 2021-10-07 17:40:32 -07:00
typing_data.js js: Convert _.uniq(a) to Array.from(new Set(a)). 2022-01-24 15:54:21 -08:00
typing_events.js typing_notifications: Show several users are typing if num of typists > 3. 2021-10-07 16:32:08 -07:00
ui.js deprecated_feature_notice: Move code to a separate module. 2021-06-15 11:58:45 -07:00
ui_init.js CVE-2022-23656: Fix cross-site scripting vulnerability in tooltips. 2022-03-01 14:26:42 -08:00
ui_report.ts ts: Convert ui_report module to TypeScript. 2021-06-22 09:09:36 -07:00
ui_util.ts tippyjs: Avoid unsafe allowHTML API in favor of <template> elements. 2022-03-03 10:13:24 -08:00
unread.js events: Add functionality to mark messages as unread. 2022-03-15 18:00:35 -07:00
unread_ops.js events: Add functionality to mark messages as unread. 2022-03-15 18:00:35 -07:00
unread_ui.js message feed: Notify user when messages are not being marked as read. 2022-02-18 14:48:31 -08:00
upload.js js: Simplify indexing arrays from the end with Array#at. 2022-01-24 09:58:54 -08:00
upload_widget.ts upload_widget: Convert $e.get(0) to $e[0]. 2021-11-05 17:34:13 -07:00
user_events.js js: Shorten Object.prototype.hasOwnProperty.call to Object.hasOwn. 2022-01-24 09:57:09 -08:00
user_group_pill.js node tests: Directly test user_group_pill helpers. 2022-02-22 16:29:36 -08:00
user_groups.ts js: Fix @typescript-eslint/restrict-plus-operands. 2021-09-22 18:06:06 -07:00
user_pill.js status_emoji: Show status emoji in compose_pm pills. 2022-02-11 13:30:08 -08:00
user_profile.js hash_util: Rename _uri functions to _url. 2022-03-01 18:14:31 -08:00
user_search.js
user_settings.ts user_settings: Add option to disable escape key navigation to default view. 2021-10-29 18:15:30 -07:00
user_status.js user_status: Fix status emoji handling of deactivated custom emoji. 2021-11-20 20:57:54 -08:00
user_status_ui.js popovers: Add "busy" status to default emoji status set. 2022-02-22 10:33:31 -08:00
util.js edit_history: Use modern edit history format in frontend. 2022-03-04 10:25:48 -08:00
vdom.js
watchdog.ts ts: Convert watchdog module to TypeScript. 2021-07-09 12:42:31 -07:00
webpack_public_path.js
widgetize.js widgets: Avoid adding the widget_elem if it already exists. 2021-07-24 09:52:14 -07:00
zcommand.js zcommand: Rename enter_day_mode to switch_to_light_theme. 2021-11-26 22:03:29 -08:00
zform.js
zulip_test.js stream create: Overhaul create-stream add-subscribers UI. 2022-03-07 16:58:58 -08:00