Skip to content

Commit e2cd0c8

Browse files
authored
Merge pull request #379 from topcoder-platform/dev
[PROD] - Platform Banner for Trolley
2 parents 9102dff + 67a0e90 commit e2cd0c8

File tree

21 files changed

+88
-208
lines changed

21 files changed

+88
-208
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ workflows:
220220
only:
221221
- dev
222222
- TOP-2044_show-signin-modal
223+
- maintenance
223224

224225
- deployProd:
225226
context: org-global
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: AI PR Reviewer
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
permissions:
9+
pull-requests: write
10+
jobs:
11+
tc-ai-pr-review:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Repo
15+
uses: actions/checkout@v3
16+
17+
- name: TC AI PR Reviewer
18+
uses: topcoder-platform/tc-ai-pr-reviewer@master
19+
with:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # The GITHUB_TOKEN is there by default so you just need to keep it like it is and not necessarily need to add it as secret as it will throw an error. [More Details](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret)
21+
LAB45_API_KEY: ${{ secrets.LAB45_API_KEY }}
22+
exclude: '**/*.json, **/*.md, **/*.jpg, **/*.png, **/*.jpeg, **/*.bmp, **/*.webp' # Optional: exclude patterns separated by commas

README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ Information regarding the changes will be disseminated to the owners of all prop
281281

282282
| Parameter | Type | Required | Description | Default value |
283283
|-------------------------|----------------------------------------------|-------------------------|------------------------------------------------------------------------------------------|---------------|
284-
| method | Enum: 'init' \| 'update' \| 'triggerFlow' | yes | The method to be called | |
284+
| method | Enum: 'init' \| 'update' | yes | The method to be called | |
285285
| targetId | string(html element id) | yes | target element for the navigation to be rendered on | none |
286286
| config | object | no | The config object for the specific navigation type | {} |
287287
| config.handleNavigation | (route: {path, label}) => void | no | Allow for external handling of route navigation (eg. via react-router-dom) | none |
@@ -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;
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
@import 'lib/styles/fonts.scss';
2+
3+
.bannerWrap {
4+
position: relative;
5+
height: 48px;
6+
width: 100%;
7+
}
8+
9+
.banner {
10+
background: rgb(157, 27, 27);
11+
color: #fff;
12+
padding: 0.5rem;
13+
display: flex;
14+
justify-content: space-between;
15+
16+
&:before {
17+
content: "";
18+
display: block;
19+
}
20+
}
21+
22+
.bannerContent {
23+
flex: 1 1 0;
24+
display: flex;
25+
justify-content: center;
26+
align-items: center;
27+
column-gap: 1rem;
28+
row-gap: 0.5rem;
29+
margin: 0 0.5rem;
30+
min-width: 0;
31+
flex-wrap: wrap;
32+
}
33+
34+
.bannerText {
35+
white-space: pre-wrap;
36+
overflow-wrap: break-word;
37+
font-family: $roboto;
38+
font-size: 16px;
39+
color: #fff;
40+
line-height: 24px;
41+
font-weight: bold;
42+
}
43+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<script lang="ts">
2+
import styles from './Maintenance.module.scss';
3+
const bannerName = 'maintenance';
4+
</script>
5+
6+
<div class={styles.banner}>
7+
<div class={styles.bannerContent}>
8+
<div class={styles.bannerText}>
9+
Topcoder will be undergoing maintenance on Tuesday, October 21, 2025 from 1 AM to 6 AM EST
10+
</div>
11+
</div>
12+
</div>

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.

0 commit comments

Comments
 (0)