Skip to content

Commit

Permalink
Merge branch 'master' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
nsrCodes committed May 21, 2024
2 parents 85161fa + 8be50b1 commit 6ba3116
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/src/components/misc/PersonaSurvey/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const OldSurveyPageMap = {
2: SurveyPage.RECOMMENDATIONS,
};

// duplicate of the function in app/src/features/onboarding/utils.ts
export const shouldShowOnboarding = async (appMode: string) => {
if (
window.location.href.includes(PATHS.AUTH.DEKSTOP_SIGN_IN.RELATIVE) ||
Expand Down
2 changes: 2 additions & 0 deletions app/src/features/onboarding/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import PATHS from "config/constants/sub/paths";
import { isAutomationEnabled } from "utils/EnvUtils";

export const shouldShowOnboarding = () => {
if (
isAutomationEnabled() ||
window.location.href.includes(PATHS.AUTH.SIGN_IN.RELATIVE) ||
window.location.href.includes(PATHS.AUTH.SIGN_UP.RELATIVE) ||
window.location.href.includes(PATHS.AUTH.DEKSTOP_SIGN_IN.RELATIVE) ||
Expand Down
3 changes: 2 additions & 1 deletion app/src/modules/analytics/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { SYNCING } from "./events/features/constants";
import Logger from "lib/logger";
import posthogIntegration from "./integrations/posthog";
import localIntegration from "./integrations/local";
import { isAutomationEnabled } from "utils/EnvUtils";

// These are mostly not user-triggered
const BLACKLISTED_EVENTS = [
Expand All @@ -23,7 +24,7 @@ export const trackEvent = (name, params, config) => {
const newParams = { ...params };
newParams.rq_app_mode = app_mode;
newParams.rq_app_version = app_version;
newParams.automation_enabled = window.navigator.webdriver === true;
newParams.automation_enabled = isAutomationEnabled();
newParams.workspace = window.currentlyActiveWorkspaceTeamId ? "team" : "personal";
newParams.workspaceId = window.currentlyActiveWorkspaceTeamId ? window.currentlyActiveWorkspaceTeamId : null;
newParams.workspaceMembersCount = window.workspaceMembersCount ?? null;
Expand Down
4 changes: 4 additions & 0 deletions app/src/utils/EnvUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ export const isEnvBeta = () => {
export const isEnvDevWithBeta = () => {
return process.env.NODE_ENV === "development" && !isEnvEmulator();
};

export const isAutomationEnabled = () => {
return window.navigator.webdriver === true;
};

0 comments on commit 6ba3116

Please sign in to comment.