zulip/frontend_tests/node_tests
Sahil Batra b84885184e settings: Use user-level email_address_visibility setting in UI.
This commit basically updates the frontend code to directly use
delivery_email field instead of functions like show_email or
email_for_user_settings at places where we want to show email.
We can do this change since we recently updated the server code
to always pass "delivery_email" code in the user objects with its
value being null if the real email is not accessible.

Showing email or "hidden" or nothing at various places in UI like
in users list, subscriber list, user profile popover and modal is
same as before.

Major points -

- Removed show_email and email_for_user_settings functions since we
directly use delivery_email field now as explained above.

- While sorting by emails in the users list, users with real emails
hidden are always shown in last when sorting alphabetically and at
the top when sorting reverse alphabetically. Also, those users with
real emails hidden, are sorted by name among themselves. As we did
before, we do not allow sorting by email when all emails are hidden.

- There is no change in typeahead behavior at this point. We either
hide the email completely or show the real or fake email based on
user level setting.

- Added code to handle delivery_email events and appropriately add/remove
delivery_email field from person objects.
2023-02-10 17:35:50 -08:00
..
lib users: Always pass "delivery_email" field in user objects. 2023-02-10 17:35:49 -08:00
templates tooltips: Fix hotkey-hint CSS class reuse. 2023-02-08 13:13:35 -08:00
activity.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
alert_words_ui.js settings: Improve success feedback for deleting alert words 2022-11-22 16:23:56 -08:00
alert_words.js alert_words: Fix alert words with HTML special characters. 2022-03-04 12:26:49 -08:00
billing_helpers.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
billing.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
blueslip_stacktrace.js dependencies: Upgrade JavaScript dependencies. 2021-05-10 18:07:13 -07:00
bot_data.js confirm_deactivate_user: Provide additional information about user. 2022-07-26 17:03:02 -07:00
browser_history.js docs: Consistently hyphenate “web-public”. 2022-01-28 17:45:45 -08:00
buddy_data.js people: Use names in PM urls instead of emails. 2022-10-25 10:42:00 -07:00
buddy_list.js js: Prefix jQuery object variable names with $. 2022-03-16 12:52:07 -07:00
channel.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
color_data.js node_tests: Remove low-hanging uses of __Rewire__. 2022-07-13 16:27:30 -07:00
colorspace.js colorspace: Remove unused methods. 2021-05-21 16:53:30 -07:00
common.js tooltips: Add support for modifier key conversion for mac-syle keyboards. 2023-02-06 18:41:31 -08:00
components.js Rename "operators" to "filters" in "Search operators" reference. 2022-12-09 13:52:13 -08:00
compose_actions.js node-tests: Remove unnecessary mock in compose_actions node test. 2023-02-10 10:39:22 -08:00
compose_closed_ui.js message_lists: Remove cases for table_name being undefined. 2022-08-18 12:30:30 -07:00
compose_fade.js node_tests: Enforce 100% coverage for test files. 2022-04-10 19:31:56 -04:00
compose_pm_pill.js node_tests: Remove low-hanging uses of __Rewire__. 2022-07-13 16:27:30 -07:00
compose_state.js compose_state: Break out stream_name() into separate getter and setter. 2022-12-15 17:25:36 -08:00
compose_ui.js compose: Always preserve cursor position post replacement in a textarea. 2022-12-14 12:40:51 -08:00
compose_validate.js compose: Show resolve topic banner only once per narrow. 2023-02-07 15:53:25 -08:00
compose_video.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
compose.js compose: Show resolve topic banner only once per narrow. 2023-02-07 15:53:25 -08:00
composebox_typeahead.js settings: Use user-level email_address_visibility setting in UI. 2023-02-10 17:35:50 -08:00
copy_and_paste.js docs: Update global links to new contributing guide URL. 2022-08-25 11:25:02 -07:00
deprecated_feature_notice.js deprecated_feature_notice: Migrate modal to dialog_widget. 2021-10-29 16:09:39 -07:00
dispatch_subs.js left-sidebar: Make Subscribe to more streams more informative. 2022-08-15 12:32:43 -07:00
dispatch.js message_edit: Add code to live-update inline-topic edit icon. 2023-02-08 12:46:05 -08:00
drafts.js compose_state: Break out stream_name() into separate getter and setter. 2022-12-15 17:25:36 -08:00
dropdown_list_widget.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
echo.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
emoji_picker.js emoji: Remove variation selector when generating emoji. 2022-12-06 12:33:59 -08:00
emoji.js emojis: Un-share the emoji.js module. 2022-04-04 13:28:49 -07:00
event_status.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
example1.js custom_check: Avoid use of assert to avoid confusion with assert.equal. 2021-06-10 09:15:57 -07:00
example2.js narrow: Fix messages being cached without flags set. 2022-03-24 08:10:14 -07:00
example3.js node_tests: Replace set_global with mock_esm in example4.js. 2021-07-22 09:47:47 -04:00
example4.js settings_users: Show all bots in organization settings. 2023-01-31 15:16:48 -08:00
example5.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
example6.js node_tests: Enforce 100% coverage for test files. 2022-04-10 19:31:56 -04:00
example7.js recent_topics: Add mention indicator in row for unread topics. 2022-10-19 16:26:42 -07:00
example8.js node_tests: Remove low-hanging uses of __Rewire__. 2022-07-13 16:27:30 -07:00
fenced_code.js node tests: Move test to fenced_code.js. 2021-03-12 11:18:44 -05:00
fetch_status.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
filter.js filter: Show pm_with title with near narrow links. 2022-10-28 17:41:47 -07:00
fold_dict.js node_tests: Fix incorrect usage of assert.throws. 2021-08-10 13:18:53 -07:00
gear_menu.js gear menu: Add organization info. 2022-10-13 23:45:25 -07:00
hash_util.js people: Use names in PM urls instead of emails. 2022-10-25 10:42:00 -07:00
hashchange.js floating_recipient_bar: Replace with sticky header. 2023-02-07 16:25:39 -08:00
hotkey.js actions_popover: Use tippyjs instead of bootstrap to display popover. 2022-12-06 09:58:40 -08:00
i18n.js left_side_userlist: Remove feature from frontend. 2022-11-14 12:23:55 -08:00
input_pill.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
internal_url.js hash_util: Rename _uri functions to _url. 2022-03-01 18:14:31 -08:00
keydown_util.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
lazy_set.js custom_check: Avoid use of assert to avoid confusion with assert.equal. 2021-06-10 09:15:57 -07:00
lightbox.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
linkifiers.js markdown: Nest get_linkifiers_regexes(). 2022-04-05 12:42:15 +00:00
list_cursor.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
list_widget.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
markdown_parse.js markdown: Calculate linkifier precedence in topics. 2022-12-13 15:16:20 -08:00
markdown.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
message_edit.js message_edit: Use move_messages_between_streams_limit_seconds in webapp. 2023-02-08 12:46:05 -08:00
message_events.js message_lists: Add a function to return rendered message_lists. 2022-08-18 12:30:30 -07:00
message_fetch.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
message_flags.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
message_list_data.js user_topics: Rename muted_topics.js to user_topics.js. 2022-08-16 14:39:24 -07:00
message_list_view.js message_list_view: Remove dead next_is_same_sender code. 2023-01-14 14:49:28 -08:00
message_list.js message_lists: Remove cases for table_name being undefined. 2022-08-18 12:30:30 -07:00
message_store.js recent: Sort PM recipients by their last sent message id. 2022-11-29 11:29:12 -08:00
muted_users.js muted_users: Pop muted_users from page_params. 2022-12-30 11:21:23 -08:00
narrow_activate.js compose banner: Consolidate two functions that clear success banners. 2023-02-04 18:53:35 -08:00
narrow_local.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
narrow_state.js node_tests: Minor cleanup for "subject" references. 2022-10-04 11:59:22 -07:00
narrow_unread.js user_topics: Rename muted_topics.js to user_topics.js. 2022-08-16 14:39:24 -07:00
narrow.js compose_state: Break out stream_name() into separate getter and setter. 2022-12-15 17:25:36 -08:00
navbar_alerts.js node_tests: Enforce 100% coverage for test files. 2022-04-10 19:31:56 -04:00
notifications.js user_topics: Rename muted_topics.js to user_topics.js. 2022-08-16 14:39:24 -07:00
password.js node_tests: Enforce 100% coverage for test files. 2022-04-10 19:31:56 -04:00
peer_data.js stream_data: Rename is_subscribed to is_subscribed_by_name. 2021-11-22 15:44:30 -08:00
people_errors.js node_tests: Remove low-hanging uses of __Rewire__. 2022-07-13 16:27:30 -07:00
people.js settings: Use user-level email_address_visibility setting in UI. 2023-02-10 17:35:50 -08:00
pill_typeahead.js input_pill: Remove random IDs. 2022-07-11 11:44:47 -07:00
pm_conversations.js user_topics: Rename set_muted_topics to set_user_topics. 2022-08-29 17:24:08 -07:00
pm_list_data.js pm-list-data: Remove unused is_all_privates function. 2023-02-10 10:38:55 -08:00
pm_list.js pm_section: Create collapsible private messages section. 2022-10-26 13:47:08 -07:00
poll_widget.js js: Prefix jQuery object variable names with $. 2022-03-16 12:52:07 -07:00
popovers.js settings: Use user-level email_address_visibility setting in UI. 2023-02-10 17:35:50 -08:00
presence.js node_tests: Remove low-hanging uses of __Rewire__. 2022-07-13 16:27:30 -07:00
reactions.js reactions: Implement display_emoji_reaction_users setting. 2022-10-27 12:41:51 -07:00
recent_senders.js recent: Sort PM recipients by their last sent message id. 2022-11-29 11:29:12 -08:00
recent_topics.js narrow: Update narrow title for undefined filter views. 2022-12-15 13:05:22 -08:00
reload_state.js node tests: Use {override} in run_test. 2021-06-16 12:55:53 -04:00
reload.js reload: Preserve unused reload tokens for a week. 2022-09-23 10:59:59 -07:00
rendered_markdown.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
resolved_topic.js resolved_topic: Implement resolve, unresolve, and display. 2022-03-07 21:35:00 -08:00
rtl.js js: Prefix jQuery object variable names with $. 2022-03-16 12:52:07 -07:00
schema.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
scroll_util.js js: Prefix jQuery object variable names with $. 2022-03-16 12:52:07 -07:00
search_future.js gear_menu: Delete unused Bootstrap tabs code. 2022-11-22 13:55:21 -08:00
search_now.js gear_menu: Delete unused Bootstrap tabs code. 2022-11-22 13:55:21 -08:00
search_pill.js refactor: Change description to description_html in search suggestions. 2022-08-16 13:56:33 -07:00
search_suggestion_future.js settings: Use user-level email_address_visibility setting in UI. 2023-02-10 17:35:50 -08:00
search_suggestion_now.js settings: Use user-level email_address_visibility setting in UI. 2023-02-10 17:35:50 -08:00
server_events.js node_tests: Enforce 100% coverage for test files. 2022-04-10 19:31:56 -04:00
settings_bots.js settings_bots: Move "Add a new bot" tab inside a modal. 2022-09-23 12:06:51 -07:00
settings_config.js settings_config: Pass settings object as parameter to all_notifications. 2021-09-16 15:46:41 -07:00
settings_data.js settings: Use user-level email_address_visibility setting in UI. 2023-02-10 17:35:50 -08:00
settings_emoji.js custom_emoji: Convert inline form to modal. 2023-02-02 10:59:57 -08:00
settings_muted_topics.js user_topics: Rename muted_topics.js to user_topics.js. 2022-08-16 14:39:24 -07:00
settings_muted_users.js node_tests: Remove low-hanging uses of __Rewire__. 2022-07-13 16:27:30 -07:00
settings_org.js settings: Add move_messages_between_streams_limit_seconds element in UI. 2023-02-08 12:46:05 -08:00
settings_profile_fields.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
settings_realm_domains.js realm_domains_modal: Migrate modal to dialog_widget. 2022-07-07 14:56:45 -07:00
settings_user_groups_legacy.js settings: Use user-level email_address_visibility setting in UI. 2023-02-10 17:35:50 -08:00
spoilers.js js: Prefix jQuery object variable names with $. 2022-03-16 12:52:07 -07:00
starred_messages.js node_tests: Remove low-hanging uses of __Rewire__. 2022-07-13 16:27:30 -07:00
stream_create_subscribers_data.js node_tests: Remove low-hanging uses of __Rewire__. 2022-07-13 16:27:30 -07:00
stream_data.js stream_settings: Add live update code for can-remove-subscribers-group. 2023-02-05 14:46:36 -08:00
stream_edit.js stream settings: Allow modifying of email address. 2022-11-04 14:22:27 -07:00
stream_events.js stream_settings: Add live update code for can-remove-subscribers-group. 2023-02-05 14:46:36 -08:00
stream_list.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
stream_pill.js node tests: Directly test simple stream_pill helpers. 2022-02-22 16:29:36 -08:00
stream_search.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
stream_settings_ui.js stream_settings: Use can_remove_subscribers_group setting in webapp. 2023-02-05 14:46:36 -08:00
stream_sort.js stream_list: Sort muted to end of sections and add labels. 2022-08-06 21:59:23 -07:00
stream_topic_history.js recent_topics: Add mention indicator in row for unread topics. 2022-10-19 16:26:42 -07:00
submessage.js node tests: Use {override} in run_test. 2021-06-16 12:55:53 -04:00
support.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
templates.js tooltips: Fix hotkey-hint CSS class reuse. 2023-02-08 13:13:35 -08:00
timerender.js install-node: Upgrade Node.js to 18.14.0; manage Yarn with Corepack. 2023-02-09 15:50:47 -08:00
top_left_corner.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
topic_generator.js unread: Rename function name for clarity. 2022-10-24 10:23:20 -07:00
topic_list_data.js recent_topics: Add mention indicator in row for unread topics. 2022-10-19 16:26:42 -07:00
transmit.js node_tests: Remove low-hanging uses of __Rewire__. 2022-07-13 16:27:30 -07:00
typeahead_helper.js settings: Use user-level email_address_visibility setting in UI. 2023-02-10 17:35:50 -08:00
typeahead.js typeahead: Remove is_unicode_emoji. 2023-02-09 16:51:40 -08:00
typing_data.js js: Split out muted_users module from muting. 2021-06-30 16:32:55 -07:00
typing_events.js node_tests: Remove low-hanging uses of __Rewire__. 2022-07-13 16:27:30 -07:00
typing_status.js node_tests: Remove low-hanging uses of __Rewire__. 2022-07-13 16:27:30 -07:00
unread.js unread: Pop unread_msgs from page_params for initialization. 2022-10-27 13:03:54 -07:00
upgrade.js node_tests: Enforce 100% coverage for test files. 2022-04-10 19:31:56 -04:00
upload.js upload: Rename upload.js get_item keys to reflect upload banner. 2023-02-04 19:50:52 -08:00
user_events.js settings: Use user-level email_address_visibility setting in UI. 2023-02-10 17:35:50 -08:00
user_group_pill.js node tests: Directly test user_group_pill helpers. 2022-02-22 16:29:36 -08:00
user_groups.js user_groups: Add helper functions to get options for group-based setting. 2023-02-05 14:46:36 -08:00
user_pill.js status_emoji: Show status emoji in compose_pm pills. 2022-02-11 13:30:08 -08:00
user_search.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
user_status.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
user_topics.js user_topics: Rename muting.js to user_topics.js. 2022-09-22 08:40:28 -07:00
util.js util: Add function get_string_diff. 2023-01-06 16:53:57 -08:00
vdom.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
watchdog.js zjsunit: Defer run_test execution to the end of the test module. 2022-08-18 08:55:31 -07:00
widgetize.js eslint: Enable object-shorthand avoidExplicitReturnArrows option. 2022-11-17 16:48:44 -08:00
zblueslip.js docs: Fix many spelling mistakes. 2022-02-07 18:51:06 -08:00
zjquery.js js: Fix no-jquery/no-parse-html-literal. 2022-03-17 13:16:34 -07:00