Unverified Commit 32647464 authored by Gung Wah's avatar Gung Wah Committed by GitHub
Browse files

[FIX] Breadcrumbs exceeding characters limit (#2862)



* [FIX] breadcrumbs exceeding

* fix.breadcrumbs-exceeding-change-events
Co-authored-by: default avatarDiego Mello <diegolmello@gmail.com>
parent 491bc70c
......@@ -42,7 +42,7 @@ const handleRequest = function* handleRequest({ data }) {
broadcast,
encrypted
} = data;
logEvent(events.CREATE_CHANNEL_CREATE, {
logEvent(events.CR_CREATE, {
type: type ? 'private' : 'public',
readOnly,
broadcast,
......@@ -66,7 +66,7 @@ const handleRequest = function* handleRequest({ data }) {
yield put(createChannelSuccess(sub));
} catch (err) {
logEvent(events[data.group ? 'SELECTED_USERS_CREATE_GROUP_F' : 'CREATE_CHANNEL_CREATE_F']);
logEvent(events[data.group ? 'SELECTED_USERS_CREATE_GROUP_F' : 'CR_CREATE_F']);
yield put(createChannelFailure(err));
}
};
......
......@@ -14,7 +14,7 @@ const create = function* create(data) {
};
const handleRequest = function* handleRequest({ data }) {
logEvent(events.CREATE_DISCUSSION_CREATE);
logEvent(events.CD_CREATE);
try {
const auth = yield select(state => state.login.isAuthenticated);
if (!auth) {
......@@ -39,11 +39,11 @@ const handleRequest = function* handleRequest({ data }) {
}
yield put(createDiscussionSuccess(sub));
} else {
logEvent(events.CREATE_DISCUSSION_CREATE_F);
logEvent(events.CD_CREATE_F);
yield put(createDiscussionFailure(result));
}
} catch (err) {
logEvent(events.CREATE_DISCUSSION_CREATE_F);
logEvent(events.CD_CREATE_F);
yield put(createDiscussionFailure(err));
}
};
......
......@@ -5,9 +5,8 @@ export default {
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',
NS_CONNECT_TO_WORKSPACE: 'ns_connect_to_workspace',
NS_JOIN_OPEN_WORKSPACE: 'ns_join_open_workspace',
// LOGIN VIEW
LOGIN_DEFAULT_LOGIN: 'login_default_login',
......@@ -99,20 +98,20 @@ export default {
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_TOGGLE_ENCRYPTED: 'create_channel_toggle_encrypted',
CREATE_CHANNEL_REMOVE_USER: 'create_channel_remove_user',
CR_CREATE: 'cr_create',
CR_CREATE_F: 'cr_create_f',
CR_TOGGLE_TYPE: 'cr_toggle_type',
CR_TOGGLE_READ_ONLY: 'cr_toggle_read_only',
CR_TOGGLE_BROADCAST: 'cr_toggle_broadcast',
CR_TOGGLE_ENCRYPTED: 'cr_toggle_encrypted',
CR_REMOVE_USER: 'cr_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',
CREATE_DISCUSSION_TOGGLE_ENCRY: 'create_discussion_toggle_encry',
CD_CREATE: 'cd_create',
CD_CREATE_F: 'cd_create_f',
CD_SELECT_CHANNEL: 'cd_select_channel',
CD_SELECT_USERS: 'cd_select_users',
CD_TOGGLE_ENCRY: 'cd_toggle_encry',
// PROFILE VIEW
PROFILE_PICK_AVATAR: 'profile_pick_avatar',
......@@ -122,8 +121,9 @@ export default {
PROFILE_SAVE_AVATAR_F: 'profile_save_avatar_f',
PROFILE_SAVE_CHANGES: 'profile_save_changes',
PROFILE_SAVE_CHANGES_F: 'profile_save_changes_f',
PROFILE_LOGOUT_OTHER_LOCATIONS: 'profile_logout_other_locations',
PROFILE_LOGOUT_OTHER_LOCATIONS_F: 'profile_logout_other_locations_f',
// PROFILE LOGOUT
PL_OTHER_LOCATIONS: 'pl_other_locations',
PL_OTHER_LOCATIONS_F: 'pl_other_locations_f',
// SETTINGS VIEW
SE_CONTACT_US: 'se_contact_us',
......@@ -297,8 +297,6 @@ export default {
NP_AUDIONOTIFICATIONS_F: 'np_audio_notifications_f',
NP_AUDIONOTIFICATIONVALUE: 'np_audio_notification_value',
NP_AUDIONOTIFICATIONVALUE_F: 'np_audio_notification_value_f',
NP_DESKTOPNOTIFICATIONDURATION: 'np_desktopnotificationduration',
NP_DESKTOPNOTIFICATIONDURATION_F: 'np_desktopnotificationduration_f',
NP_EMAILNOTIFICATIONS: 'np_email_notifications',
NP_EMAILNOTIFICATIONS_F: 'np_email_notifications_f',
......
......@@ -177,7 +177,7 @@ class CreateChannelView extends React.Component {
}
removeUser = (user) => {
logEvent(events.CREATE_CHANNEL_REMOVE_USER);
logEvent(events.CR_REMOVE_USER);
const { removeUser } = this.props;
removeUser(user);
}
......@@ -207,7 +207,7 @@ class CreateChannelView extends React.Component {
value: type,
label: 'Private_Channel',
onValueChange: (value) => {
logEvent(events.CREATE_CHANNEL_TOGGLE_TYPE);
logEvent(events.CR_TOGGLE_TYPE);
// If we set the channel as public, encrypted status should be false
this.setState(({ encrypted }) => ({ type: value, encrypted: value && encrypted }));
}
......@@ -221,7 +221,7 @@ class CreateChannelView extends React.Component {
value: readOnly,
label: 'Read_Only_Channel',
onValueChange: (value) => {
logEvent(events.CREATE_CHANNEL_TOGGLE_READ_ONLY);
logEvent(events.CR_TOGGLE_READ_ONLY);
this.setState({ readOnly: value });
},
disabled: broadcast
......@@ -241,7 +241,7 @@ class CreateChannelView extends React.Component {
value: encrypted,
label: 'Encrypted',
onValueChange: (value) => {
logEvent(events.CREATE_CHANNEL_TOGGLE_ENCRYPTED);
logEvent(events.CR_TOGGLE_ENCRYPTED);
this.setState({ encrypted: value });
},
disabled: !type
......@@ -255,7 +255,7 @@ class CreateChannelView extends React.Component {
value: broadcast,
label: 'Broadcast_Channel',
onValueChange: (value) => {
logEvent(events.CREATE_CHANNEL_TOGGLE_BROADCAST);
logEvent(events.CR_TOGGLE_BROADCAST);
this.setState({
broadcast: value,
readOnly: value ? true : readOnly
......
......@@ -136,17 +136,17 @@ class CreateChannelView extends React.Component {
};
selectChannel = ({ value }) => {
logEvent(events.CREATE_DISCUSSION_SELECT_CHANNEL);
logEvent(events.CD_SELECT_CHANNEL);
this.setState({ channel: value, encrypted: value?.encrypted });
}
selectUsers = ({ value }) => {
logEvent(events.CREATE_DISCUSSION_SELECT_USERS);
logEvent(events.CD_SELECT_USERS);
this.setState({ users: value });
}
onEncryptedChange = (value) => {
logEvent(events.CREATE_DISCUSSION_TOGGLE_ENCRY);
logEvent(events.CD_TOGGLE_ENCRY);
this.setState({ encrypted: value });
}
......
......@@ -174,7 +174,7 @@ class NewServerView extends React.Component {
}
submit = async({ fromServerHistory = false, username }) => {
logEvent(events.NEWSERVER_CONNECT_TO_WORKSPACE);
logEvent(events.NS_CONNECT_TO_WORKSPACE);
const { text, certificate } = this.state;
const { connectServer } = this.props;
......@@ -199,7 +199,7 @@ class NewServerView extends React.Component {
}
connectOpen = () => {
logEvent(events.NEWSERVER_JOIN_OPEN_WORKSPACE);
logEvent(events.NS_JOIN_OPEN_WORKSPACE);
this.setState({ connectingOpen: true });
const { connectServer } = this.props;
connectServer('https://open.rocket.chat');
......
......@@ -434,7 +434,7 @@ class ProfileView extends React.Component {
}
logoutOtherLocations = () => {
logEvent(events.PROFILE_LOGOUT_OTHER_LOCATIONS);
logEvent(events.PL_OTHER_LOCATIONS);
showConfirmationAlert({
message: I18n.t('You_will_be_logged_out_from_other_locations'),
confirmationText: I18n.t('Logout'),
......@@ -443,7 +443,7 @@ class ProfileView extends React.Component {
await RocketChat.logoutOtherLocations();
EventEmitter.emit(LISTENER, { message: I18n.t('Logged_out_of_other_clients_successfully') });
} catch {
logEvent(events.PROFILE_LOGOUT_OTHER_LOCATIONS_F);
logEvent(events.PL_OTHER_LOCATIONS_F);
EventEmitter.emit(LISTENER, { message: I18n.t('Logout_failed') });
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment