zulip/web/tests
Prakhar Pratyush 8e1f0c4bcf topic_list: Fix "show all topics" flashing.
Earlier, 'all_topics_in_cache' used to return `false`
in the case where we were unsure if some topics were
present even before the user subscribed to the channel
and hence missing in the cache.

Returning `false` led to visible 'show all topics',
even if all the topics were already displayed. This was
helpful if the API call to fetch channel history failed,
as users had the option to make another request.

That resulted in a bug where "show all topics" was flashing
in channels with less number of topics. We used to display
"show all topics" initially and then hide it after the API
call confirmed that there were no new topics to display.

To fix this bug, we return `true`. So, the "show all topics"
is not displayed beforehand. We let the API call fetch the history
and rebuild the topic list based on the updated data.

Instead of show then hide. We now prefer, show if needed.

To fix the issue of API call failure and users having no option
to see all topics, we did prep work in the last commit
to add retry mechanism to the concerned API call.
2025-06-26 10:11:05 -07:00
..
lib stream_setting: Add setting for who can move messages out of channel. 2025-06-24 16:52:53 -07:00
templates popovers: Add hotkey hints support via a new handlebar template. 2024-04-11 15:57:24 -07:00
activity.test.cjs tests: Add library function to create message lists. 2025-06-19 10:50:21 -07:00
alert_words_ui.test.cjs alert_words: Update label in the alert words removal status banner. 2025-04-25 12:26:02 -07:00
alert_words.test.cjs people: Remove is_current_user legacy helper. 2025-03-05 15:56:57 -08:00
blueslip_stacktrace.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
bot_data.test.cjs bot_data: Remove the stale 'get_editable' function. 2025-02-12 15:08:32 -08:00
browser_history.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
buddy_data.test.cjs tests: Add library function to create message lists. 2025-06-19 10:50:21 -07:00
buddy_list.test.cjs people: Optimize is_person_active. 2025-06-06 10:53:03 -07:00
channel_folders.test.cjs channel_folders: Add support for channel folders in webapp. 2025-06-10 11:51:58 -07:00
channel.test.cjs channel: Remove PATCH as POST workaround. 2025-05-05 12:13:00 -07:00
clipboard_handler.test.cjs people: Defer loading user data during app load. 2025-05-20 13:55:48 -07:00
color_data.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
common.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
components.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
compose_actions.test.cjs compose: Rename functions to reflect attention level. 2025-06-20 15:54:59 -07:00
compose_closed_ui.test.cjs compose-closed-ui: Use specific button label when composing to self. 2025-04-28 20:50:51 -07:00
compose_fade.test.cjs stream_settings: Add new topics_policy setting. 2025-06-17 17:05:58 -07:00
compose_paste.test.cjs emoji: Remap ':smile' emoji and update the settings UI. 2025-04-07 17:34:52 -07:00
compose_pm_pill.test.cjs user_pill: Use user_id to get user info instead of email. 2025-06-18 11:27:59 -07:00
compose_state.test.cjs compose: Prefer using recipient_ids over recipient_emails. 2025-05-16 10:51:29 -07:00
compose_ui.test.cjs stream_settings: Add new topics_policy setting. 2025-06-17 17:05:58 -07:00
compose_validate.test.cjs stream_setting: Add setting for who can move messages out of channel. 2025-06-24 16:52:53 -07:00
compose_video.test.cjs compose_reply_label: Show realm_empty_topic_display_name for topic="". 2025-01-14 13:52:55 -08:00
compose.test.cjs compose: Rename functions to reflect attention level. 2025-06-20 15:54:59 -07:00
composebox_typeahead.test.cjs compose_typeahead: Check for unique full name syntax in query. 2025-06-18 11:27:59 -07:00
conversation_participants.test.cjs people: Optimize is_person_active. 2025-06-06 10:53:03 -07:00
demo_organizations.test.cjs demo-orgs: Move helper function to get days remaining until deletion. 2025-04-29 12:25:28 -07:00
deprecated_feature_notice.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
dispatch_subs.test.cjs message_view: Live update on losing access to a stream. 2025-04-29 09:46:19 -07:00
dispatch.test.cjs settings: Add a new topics_policy realm setting. 2025-06-17 17:05:58 -07:00
drafts.test.cjs drafts: Use library functions in test. 2025-06-19 10:50:21 -07:00
echo.test.cjs people: Defer loading user data during app load. 2025-05-20 13:55:48 -07:00
emoji_picker.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
emoji.test.cjs emoji: Remap ':smile' emoji and update the settings UI. 2025-04-07 17:34:52 -07:00
example1.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
example2.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
example3.test.cjs tests: Add library function to create message lists. 2025-06-19 10:50:21 -07:00
example4.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
example5.test.cjs message_list: Fix message list missing messages. 2024-12-18 10:21:48 -08:00
example6.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
example7.test.cjs unread_ops: Avoid jQuery sizzle extension :visible. 2025-05-18 16:22:15 -07:00
example8.test.cjs tests: Add library function to create message lists. 2025-06-19 10:50:21 -07:00
fenced_code.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
fetch_status.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
filter.test.cjs filter: Do not set anchor as first_unread for starred messages view. 2025-06-09 16:21:09 -07:00
fold_dict.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
gear_menu_util.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
hash_util.test.cjs stream_data: Fix parsing of slugs for inaccessible channels. 2025-02-05 14:01:11 -08:00
hashchange.test.cjs hash: Fix logic for handling web public narrows. 2025-03-11 12:43:02 -07:00
hotkey.test.cjs hotkey: Merge uses of M hotkey. 2025-06-20 15:56:19 -07:00
i18n.test.cjs node test runner: Prevent Handlebars quirks. 2025-01-07 09:43:33 -08:00
input_pill.test.cjs input_pill: Add disabled flag to make a pill disabled. 2025-01-29 12:36:10 -08:00
internal_url.test.cjs inbox: Show inbox channel view based on user setting. 2025-05-09 15:13:56 -07:00
keydown_util.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
lazy_set.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
left_sidebar_navigation_area.test.cjs left_sidebar: Hide menu option for home view if all messages are read. 2025-03-10 13:08:39 -07:00
linkifiers.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
list_cursor.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
list_widget.test.cjs recent_conversations: Improve sorting behavior. 2025-03-11 10:48:31 -07:00
markdown_parse.test.cjs emoji: Remap ':smile' emoji and update the settings UI. 2025-04-07 17:34:52 -07:00
markdown.test.cjs hash_util: Set channel URL based on user setting. 2025-05-09 15:13:56 -07:00
message_edit.test.cjs stream_setting: Add setting for who can move messages out of channel. 2025-06-24 16:52:53 -07:00
message_events.test.cjs settings: Add frontend to change allow_edit_history to integer field. 2025-02-25 18:18:23 -08:00
message_flags.test.cjs web: Add parameters to API requests for empty topic name support. 2025-01-10 14:32:55 -08:00
message_list_data.test.cjs message_list: Fix message list missing messages. 2024-12-18 10:21:48 -08:00
message_list_view.test.cjs message-edit: Use last_moved_timestamp for edited/moved indicators. 2025-03-11 16:42:28 -07:00
message_list.test.cjs message_list: Fix just_unsubscribed for empty views. 2025-03-25 16:04:55 -07:00
message_store.test.cjs message_view: Live update on losing access to a stream. 2025-04-29 09:46:19 -07:00
message_view.test.cjs stream_settings: Add new topics_policy setting. 2025-06-17 17:05:58 -07:00
muted_users.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
narrow_local.test.cjs tests: Add library function to create message lists. 2025-06-19 10:50:21 -07:00
narrow_state.test.cjs tests: Add library function to create message lists. 2025-06-19 10:50:21 -07:00
narrow_unread.test.cjs narrow_state: Refactor get_first_unread_info to take a defined filter. 2025-03-06 17:42:50 -08:00
navbar_alerts.test.cjs demo-orgs: Move helper function to get days remaining until deletion. 2025-04-29 12:25:28 -07:00
notifications.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
password.test.cjs change_password_modal: Hide the dialog spinner when action fails. 2025-02-06 09:40:57 -08:00
peer_data.test.cjs peer_data: Ensure potential_subscribers is only called with full data. 2025-05-14 15:00:45 -07:00
people_errors.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
people.test.cjs people: Defer loading user data during app load. 2025-05-20 13:55:48 -07:00
pill_typeahead.test.cjs pill_typeahead: Clean up unnecessary rewires in test. 2025-05-20 17:03:00 -07:00
pm_conversations.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
pm_list_data.test.cjs tests: Add library function to create message lists. 2025-06-19 10:50:21 -07:00
pm_list.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
poll_widget.test.cjs widgets: Remove author tip for polls without question. 2025-03-25 10:48:28 -07:00
popover_menus_data.test.cjs stream_setting: Add setting for who can move messages within channel. 2025-06-24 16:52:53 -07:00
postprocess_content.test.cjs markdown: Experiment with custom bullets, counters. 2025-05-12 18:08:28 -07:00
presence.test.cjs presence: Fix exception on trying to get user from ID. 2025-03-03 10:06:04 -08:00
reactions.test.cjs reactions: Correctly convert template output to a jQuery object. 2025-05-08 17:13:25 -07:00
realm_playground.test.cjs typeahead: Replace code block language hint text with more clear options 2025-05-01 16:36:20 -07:00
recent_senders.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
recent_view.test.cjs hash_util: Set channel URL based on user setting. 2025-05-09 15:13:56 -07:00
reload_state.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
reload.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
rendered_markdown.test.cjs message_link: Add support for empty string topic in syntax. 2025-01-31 14:23:15 -08:00
resolved_topic.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
rtl.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
saved_snippets.test.cjs saved_snippets: Add support for editing saved snippets. 2025-03-13 10:58:36 -07:00
scheduled_messages.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
scroll_util.test.cjs scroll_util: Account for $elem not direct child of scroll container. 2025-01-23 15:53:09 -08:00
search_suggestion.test.cjs search_suggestion: Prevent duplicate terms in default suggestion. 2025-06-07 22:59:14 -07:00
search.test.cjs search_pill: Prevent adding duplicate search pills. 2025-06-07 22:59:14 -07:00
server_events.test.cjs popup_banners: Redesign connection banner to use new banner component. 2025-03-10 11:21:11 -07:00
settings_bots.test.cjs settings: Add two new realm settings to restrict bot creation. 2025-01-30 11:37:33 -08:00
settings_config.test.cjs settings: Add channel notifications customization in Personal settings. 2025-06-09 13:50:55 -07:00
settings_data.test.cjs stream_settings: Add new topics_policy setting. 2025-06-17 17:05:58 -07:00
settings_emoji.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
settings_muted_users.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
settings_org.test.cjs dropdown-list-widget: Allow customization for "Disable" option. 2025-06-10 11:51:58 -07:00
settings_profile_fields.test.cjs settings_profile_fields test: Add mocking helper. 2025-01-07 09:32:52 -08:00
settings_realm_domains.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
settings_user_topics.test.cjs settings_user_topics test: Use explicit override for sorting. 2025-01-07 09:32:52 -08:00
spoilers.test.cjs tests: Remove unusual ‘this’ usage. 2025-02-26 16:20:47 -08:00
starred_messages.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
stream_create_subscribers_data.test.cjs stream: Allow non-admins to create channel without subscribing to it. 2025-01-29 12:36:10 -08:00
stream_data.test.cjs stream_setting: Add setting for who can move messages out of channel. 2025-06-24 16:52:53 -07:00
stream_edit.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
stream_events.test.cjs stream_settings: Add new topics_policy setting. 2025-06-17 17:05:58 -07:00
stream_list_sort.test.cjs stream_list_sort: Fix user setting for demote inactive stream ignored. 2025-03-25 09:47:06 -07:00
stream_list.test.cjs hash_util: Set channel URL based on user setting. 2025-05-09 15:13:56 -07:00
stream_pill.test.cjs stream_pill: Fetch all subscribers before getting user ids for a stream. 2025-06-23 17:04:47 -07:00
stream_search.test.cjs left_sidebar: Refactor display left sidebar for stream list filter. 2025-02-05 13:23:15 -08:00
stream_settings_ui.test.cjs hash_util: Set channel URL based on user setting. 2025-05-09 15:13:56 -07:00
stream_topic_history.test.cjs stream_topic_history_util: Add retry mechanism to get_server_history. 2025-06-26 10:11:05 -07:00
submessage.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
support.test.cjs support: Avoid $(callback) to reduce zjquery complexity. 2025-05-09 09:04:39 -07:00
templates.test.cjs compose: Use an icon for the mac command hotkey hint. 2025-01-06 11:29:38 -08:00
time_zone_util.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
timerender.test.cjs banners: Redesign organization profile incomplete navbar banner. 2025-01-30 10:17:39 -08:00
topic_generator.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
topic_link_util.test.cjs topic_link_util: Add support for empty topics in the frontend. 2025-06-18 13:03:56 -07:00
topic_list_data.test.cjs topic_list: Generalize use of TopicListWidget. 2025-04-10 11:52:03 -07:00
topic_list.test.cjs topic_list: Fix "show all topics" flashing. 2025-06-26 10:11:05 -07:00
transmit.test.cjs server_events: Extract interface for compose, transmit to new module. 2025-05-12 11:07:12 -07:00
typeahead_helper.test.cjs typeahead_helper: Clean un unnecessary rewires in test. 2025-05-20 17:03:00 -07:00
typeahead.test.cjs emoji: Remap ':smile' emoji and update the settings UI. 2025-04-07 17:34:52 -07:00
typing_data.test.cjs message_edit: Show typing indicator for message editing. 2025-02-12 15:08:56 -08:00
typing_events.test.cjs tests: Add library function to create message lists. 2025-06-19 10:50:21 -07:00
typing_status.test.cjs settings: Add a new topics_policy realm setting. 2025-06-17 17:05:58 -07:00
ui_util.test.cjs notifications: Render emoji in desktop notifications. 2025-02-23 10:57:09 -08:00
unread.test.cjs codespell: Fix typos caught by codespell. 2025-02-18 22:04:43 -08:00
upload.test.cjs upload: Fix uploading the same file twice in the same session. 2025-05-28 09:23:51 -07:00
user_events.test.cjs people: Optimize is_person_active. 2025-06-06 10:53:03 -07:00
user_group_pill.test.cjs people: Optimize is_person_active. 2025-06-06 10:53:03 -07:00
user_groups.test.cjs settings: Disable checkbox in permissions panel. 2025-04-04 11:06:05 -07:00
user_pill.test.cjs user_pill: Use user_id to get user info instead of email. 2025-06-18 11:27:59 -07:00
user_search.test.cjs tests: Add library function to create message lists. 2025-06-19 10:50:21 -07:00
user_status.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
user_topics_ui.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
user_topics.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
util.test.cjs util: Fix spelling mistake. 2025-05-09 15:13:56 -07:00
vdom.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
watchdog.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
widgetize.test.cjs blueslip: Require record for more_info. 2025-01-02 17:30:40 -08:00
zblueslip.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
zjquery.test.cjs tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00