Skip to content

Commit db85c17

Browse files
authored
Merge pull request #375 from topcoder-platform/userflow-removal
Remove userflow
2 parents a8ae99e + 2e97bc8 commit db85c17

File tree

15 files changed

+5
-207
lines changed

15 files changed

+5
-207
lines changed

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,6 @@ Information regarding the changes will be disseminated to the owners of all prop
296296
| config.user | 'auto' | no | Instruct the uni-nav to auto-fetch user profile info based on the `tcjwt` cookie value | {} |
297297
| config.user | {photoURL, userId, initials, handle} | no | The logged in user | {} |
298298
| config.supportMeta | {challengeId, isSelfService} | no | Additional meta data to be sent along with any support ticket created by the user | |
299-
| config.integrations | {userflow?: 'disable'} | no | Disable userflow integration | |
300299

301300
### User Model
302301
You can either pass user's details as described by the `AuthUser` interface, or pass a value of `auto` and uni-nav will automatically fetch user's details from the api based on the tcjwt auth cookie.
@@ -326,13 +325,6 @@ After `init` is called, you should call only `update` for further updates.
326325

327326
>**NOTE** Both methods accept the same config object as mentioned in the previous section [API for tcUniNav](#api-for-tcuninav).
328327
329-
### Custom Integrations
330-
331-
#### Userflow
332-
Userflow is used to display surveys and tips for the user.
333-
You can manually trigger a predefined userflow content item by calling the method `triggerFlow` via uninav. Eg. `tcUniNav('triggerFlow', 'userflow-content-id', ...userflowArgs)`.
334-
335-
336328
### Typescript Support
337329

338330
Typescript type declarations (i.e. `*.d.ts`) can be sourced from the Github repo in the devDependencies of your package.json:

src/lib/components/LinksMenu.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { classnames } from "lib/utils/classnames";
55
import { getPublicPath } from 'lib/utils/paths';
66
import SubMenu from "./SubMenu.svelte";
7-
import { NavigationHandler } from "../app-context/navigation-handler.model";
7+
import type { NavigationHandler } from "../app-context/navigation-handler.model";
88
const chevronDownIconUrl = getPublicPath(`/assets/ic-chevron-down.svg`);
99
1010
export let ref: Element | undefined = undefined;

src/lib/components/SubMenu.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import type { NavMenuItem } from 'lib/functions/nav-menu-item.model';
3-
import { NavigationHandler } from "../app-context/navigation-handler.model";
3+
import type { NavigationHandler } from "../app-context/navigation-handler.model";
44
import { onMount } from 'svelte';
55
import styles from './SubMenu.module.scss';
66

src/lib/config/index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,4 @@ export const AUTH0_AUTHENTICATOR_URL: string = getEnvValue(
2424
"https://accounts-auth0.topcoder.com"
2525
);
2626

27-
export const DISABLE_USERFLOW: string = getEnvValue('VITE_DISABLE_USERFLOW', '')
28-
export const USERFLOW_ENVIRONMENT_TOKEN: string = getEnvValue('VITE_USERFLOW_ENVIRONMENT_TOKEN')
29-
export const USERFLOW_TC_SIGNATURE: string = getEnvValue('VITE_USERFLOW_TC_SIGNATURE')
30-
export const USERFLOW_DEFAULT_SURVEY_DELAY: string = getEnvValue('VITE_USERFLOW_DEFAULT_SURVEY_DELAY', '3000')
31-
3227
export * from './hosts'

src/lib/functions/integrations/userflow-loader.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/lib/functions/integrations/userflow.ts

Lines changed: 0 additions & 137 deletions
This file was deleted.

src/lib/marketing-navigation/components/NavigationBar.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
import LinksMenu from '../../components/LinksMenu.svelte';
44
import TopNavbar from 'lib/components/TopNavbar.svelte';
55
import MobileNavigation from 'lib/mobile-navigation/MobileNavigation.svelte';
6-
import { marketingRightItems } from 'lib/functions/marketing-navigation.provider'
7-
import { NavigationHandler } from "../../app-context/navigation-handler.model";
6+
import type { NavigationHandler } from "../../app-context/navigation-handler.model";
87
98
export let style: 'primary'|'secondary'|'tertiary';
109
export let menuItems: NavMenuItem[] = [];

src/main.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { writable } from 'svelte/store'
22
import type { Writable } from 'svelte/store'
33

44
import { buildContext, type AuthUser, type NavigationHandler, type SupportMeta } from './lib/app-context'
5-
import { initUserflow, triggerFlow } from 'lib/functions/integrations/userflow';
65
import { loadNudgeApp } from './lib/functions/load-nudge-app'
76
import { PubSub } from './lib/utils/pubsub';
87

@@ -38,7 +37,7 @@ export type NavigationAppProps = {
3837
integrations?: {[key: string]: 'disable'}
3938
}
4039

41-
export type TcUniNavMethods = 'init' | 'update' | 'destroy' | 'triggerFlow'
40+
export type TcUniNavMethods = 'init' | 'update' | 'destroy'
4241

4342
export type TcUniNavFn = (
4443
method: TcUniNavMethods,
@@ -138,7 +137,6 @@ async function init(
138137
}
139138

140139
if (navType === 'tool' || navType === 'marketing') {
141-
initUserflow(ctx.get('appContext'));
142140
loadNudgeApp(ctx, targetEl.querySelector('.tc-universal-nav-wrap'));
143141
}
144142
}
@@ -177,10 +175,6 @@ function execQueueCall(method: TcUniNavMethods, ...args: any[]) {
177175
update.call(null, ...args)
178176
}
179177

180-
else if (method === 'triggerFlow') {
181-
triggerFlow.call(null, ...args)
182-
}
183-
184178
else if (method === 'destroy') {
185179
destroy.call(null, ...args);
186180
}

types/src/lib/config/index.d.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,4 @@ export declare const PLATFORM_APP_HOST: string;
22
export declare const CUSTOMER_LOGIN: string;
33
export declare const CUSTOMER_SIGNUP: string;
44
export declare const AUTH0_AUTHENTICATOR_URL: string;
5-
export declare const DISABLE_USERFLOW: string;
6-
export declare const USERFLOW_ENVIRONMENT_TOKEN: string;
7-
export declare const USERFLOW_TC_SIGNATURE: string;
8-
export declare const USERFLOW_DEFAULT_SURVEY_DELAY: string;
95
export * from './hosts';

types/src/lib/functions/integrations/userflow-loader.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)