verdnatura-chat/app/utils/log/events.js

109 lines
4.3 KiB
JavaScript
Raw Normal View History

export default {
[NEW] Log events from RoomsList, SideDrawer and Profile (#2190) * Create method to track user event to isolate the logic to improve future refactoring * Track Onboarding view * Track NewServer view * Refactor track method due to firebase already send the current screen * Track default login and all the oAuth options * Track default sign up in RegisterView * Change trackUserEvent signature and update all the files * Track the remaining login services * track add server, change server and search * Track SidebarView and refactor to use react-navigation * Track profile events and handle exceptions * Track create channel flux * Track send message to user via NewMessageView * Track create direct message flux * Handle failure of create channel and group in the saga * Track create discussion flux * Track navigate to directory and its actions * Track read, favorite and hide a channel, handling its errors * Track all channels sorting and grouping * Resolve requests to improve the importing logs and events * Remove unused events file * Leave a bugsnag breadcrumb when logging an event * Move all logEvent to the top of code block and log remaining fail events * Move all the non-logic-dependent logEvent to the top of code block * Improve the logging of sidebar events * Improve events from onboarding and newserver * Improve events from login and register view, and log enter with apple * Improve NewMessageView events * Improve CreateChannel events * Improve CreateDiscussion and SelectedUsers create group events * Improve RoomsList events and log trivial events * Improve ProfileView events * Remove single line function body for the sidebarNavigate * Navigate to Status and AdminPanel View using the defined sidebarNavigate method Co-authored-by: Diego Mello <diegolmello@gmail.com>
2020-07-30 13:26:17 +00:00
// ONBOARDING VIEW
ONBOARD_JOIN_A_WORKSPACE: 'onboard_join_a_workspace',
ONBOARD_CREATE_NEW_WORKSPACE: 'onboard_create_new_workspace',
ONBOARD_CREATE_NEW_WORKSPACE_F: 'onboard_create_new_workspace_f',
// NEW SERVER VIEW
NEWSERVER_CONNECT_TO_WORKSPACE: 'newserver_connect_to_workspace',
NEWSERVER_CONNECT_TO_WORKSPACE_F: 'newserver_connect_to_workspace_f',
NEWSERVER_JOIN_OPEN_WORKSPACE: 'newserver_join_open_workspace',
// LOGIN VIEW
LOGIN_DEFAULT_LOGIN: 'login_default_login',
LOGIN_DEFAULT_LOGIN_F: 'login_default_login_f',
// FORGOT PASSWORD VIEW
FP_FORGOT_PASSWORD: 'fp_forgot_password',
FP_FORGOT_PASSWORD_F: 'fp_forgot_password_f',
// REGISTER VIEW
REGISTER_DEFAULT_SIGN_UP: 'register_default_sign_up',
REGISTER_DEFAULT_SIGN_UP_F: 'register_default_sign_up_f',
// LOGIN AND REGISTER VIEW
ENTER_WITH_FACEBOOK: 'enter_with_facebook',
ENTER_WITH_GITHUB: 'enter_with_github',
ENTER_WITH_GITLAB: 'enter_with_gitlab',
ENTER_WITH_LINKEDIN: 'enter_with_linkedin',
ENTER_WITH_GOOGLE: 'enter_with_google',
ENTER_WITH_METEOR: 'enter_with_meteor',
ENTER_WITH_TWITTER: 'enter_with_twitter',
ENTER_WITH_WORDPRESS: 'enter_with_wordpress',
ENTER_WITH_CUSTOM_OAUTH: 'enter_with_custom_oauth',
ENTER_WITH_SAML: 'enter_with_saml',
ENTER_WITH_CAS: 'enter_with_cas',
ENTER_WITH_APPLE: 'enter_with_apple',
ENTER_WITH_APPLE_F: 'enter_with_apple_f',
// SIDEBAR VIEW
SIDEBAR_NAVIGATE_TO_STATUS: 'sidebar_navigate_to_status',
SIDEBAR_NAVIGATE_TO_CHATS: 'sidebar_navigate_to_chats',
SIDEBAR_NAVIGATE_TO_PROFILE: 'sidebar_navigate_to_profile',
SIDEBAR_NAVIGATE_TO_SETTINGS: 'sidebar_navigate_to_settings',
SIDEBAR_NAVIGATE_TO_ADMINPANEL: 'sidebar_navigate_to_admin_panel',
// ROOMS LIST VIEW
RL_TOGGLE_SERVER_DROPDOWN: 'rl_toggle_server_dropdown',
RL_ADD_SERVER: 'rl_add_server',
RL_CHANGE_SERVER: 'rl_change_server',
RL_NAVIGATE_TO_NEW_MSG: 'rl_navigate_to_new_msg',
RL_SEARCH: 'rl_search',
RL_NAVIGATE_TO_DIRECTORY: 'rl_navigate_to_directory',
RL_GO_TO_ROOM: 'rl_go_to_room',
RL_FAVORITE_CHANNEL: 'rl_favorite_channel',
RL_UNFAVORITE_CHANNEL: 'rl_unfavorite_channel',
RL_TOGGLE_FAVORITE_F: 'rl_toggle_favorite_f',
RL_READ_CHANNEL: 'rl_read_channel',
RL_UNREAD_CHANNEL: 'rl_unread_channel',
RL_TOGGLE_READ_F: 'rl_toggle_read_f',
RL_HIDE_CHANNEL: 'rl_hide_channel',
RL_HIDE_CHANNEL_F: 'rl_hide_channel_f',
RL_TOGGLE_SORT_DROPDOWN: 'rl_toggle_sort_dropdown',
RL_SORT_CHANNELS_BY_NAME: 'rl_sort_channels_by_name',
RL_SORT_CHANNELS_BY_ACTIVITY: 'rl_sort_channels_by_activity',
RL_SORT_CHANNELS_FAIL: 'rl_sort_channels_fail',
RL_GROUP_CHANNELS_BY_TYPE: 'rl_group_channels_by_type',
RL_GROUP_CHANNELS_BY_FAVORITE: 'rl_group_channels_by_favorite',
RL_GROUP_CHANNELS_BY_UNREAD: 'rl_group_channels_by_unread',
// DIRECTORY VIEW
DIRECTORY_SEARCH_USERS: 'directory_search_users',
DIRECTORY_SEARCH_CHANNELS: 'directory_search_channels',
// NEW MESSAGE VIEW
NEW_MSG_CREATE_CHANNEL: 'new_msg_create_channel',
NEW_MSG_CREATE_GROUP_CHAT: 'new_msg_create_group_chat',
NEW_MSG_CREATE_DISCUSSION: 'new_msg_create_discussion',
NEW_MSG_CHAT_WITH_USER: 'new_msg_chat_with_user',
// SELECTED USERS VIEW
SELECTED_USERS_ADD_USER: 'selected_users_add_user',
SELECTED_USERS_REMOVE_USER: 'selected_users_remove_user',
SELECTED_USERS_CREATE_GROUP: 'selected_users_create_group',
SELECTED_USERS_CREATE_GROUP_F: 'selected_users_create_group_f',
// CREATE CHANNEL VIEW
CREATE_CHANNEL_CREATE: 'create_channel_create',
CREATE_CHANNEL_CREATE_F: 'create_channel_create_f',
CREATE_CHANNEL_TOGGLE_TYPE: 'create_channel_toggle_type',
CREATE_CHANNEL_TOGGLE_READ_ONLY: 'create_channel_toggle_read_only',
CREATE_CHANNEL_TOGGLE_BROADCAST: 'create_channel_toggle_broadcast',
CREATE_CHANNEL_REMOVE_USER: 'create_channel_remove_user',
// CREATE DISCUSSION VIEW
CREATE_DISCUSSION_CREATE: 'create_discussion_create',
CREATE_DISCUSSION_CREATE_F: 'create_discussion_create_f',
CREATE_DISCUSSION_SELECT_CHANNEL: 'create_discussion_select_channel',
CREATE_DISCUSSION_SELECT_USERS: 'create_discussion_select_users',
// PROFILE VIEW
PROFILE_PICK_AVATAR: 'profile_pick_avatar',
PROFILE_PICK_AVATAR_F: 'profile_pick_avatar_f',
PROFILE_PICK_AVATAR_WITH_URL: 'profile_pick_avatar_with_url',
PROFILE_SAVE_AVATAR: 'profile_save_avatar',
PROFILE_SAVE_AVATAR_F: 'profile_save_avatar_f',
PROFILE_SAVE_CHANGES: 'profile_save_changes',
PROFILE_SAVE_CHANGES_F: 'profile_save_changes_f'
};