diff --git a/.circleci/config.yml b/.circleci/config.yml index da5ad240..6cd09e84 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -220,6 +220,7 @@ workflows: only: - dev - TOP-2044_show-signin-modal + - maintenance - deployProd: context: org-global diff --git a/.github/workflows/code_reviewer.yml b/.github/workflows/code_reviewer.yml new file mode 100644 index 00000000..82c78626 --- /dev/null +++ b/.github/workflows/code_reviewer.yml @@ -0,0 +1,22 @@ +name: AI PR Reviewer + +on: + pull_request: + types: + - opened + - synchronize +permissions: + pull-requests: write +jobs: + tc-ai-pr-review: + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - name: TC AI PR Reviewer + uses: topcoder-platform/tc-ai-pr-reviewer@master + with: + 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) + LAB45_API_KEY: ${{ secrets.LAB45_API_KEY }} + exclude: '**/*.json, **/*.md, **/*.jpg, **/*.png, **/*.jpeg, **/*.bmp, **/*.webp' # Optional: exclude patterns separated by commas \ No newline at end of file diff --git a/README.md b/README.md index 12e3dc05..b73242e0 100644 --- a/README.md +++ b/README.md @@ -281,7 +281,7 @@ Information regarding the changes will be disseminated to the owners of all prop | Parameter | Type | Required | Description | Default value | |-------------------------|----------------------------------------------|-------------------------|------------------------------------------------------------------------------------------|---------------| -| method | Enum: 'init' \| 'update' \| 'triggerFlow' | yes | The method to be called | | +| method | Enum: 'init' \| 'update' | yes | The method to be called | | | targetId | string(html element id) | yes | target element for the navigation to be rendered on | none | | config | object | no | The config object for the specific navigation type | {} | | 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 | config.user | 'auto' | no | Instruct the uni-nav to auto-fetch user profile info based on the `tcjwt` cookie value | {} | | config.user | {photoURL, userId, initials, handle} | no | The logged in user | {} | | config.supportMeta | {challengeId, isSelfService} | no | Additional meta data to be sent along with any support ticket created by the user | | -| config.integrations | {userflow?: 'disable'} | no | Disable userflow integration | | ### User Model 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. >**NOTE** Both methods accept the same config object as mentioned in the previous section [API for tcUniNav](#api-for-tcuninav). -### Custom Integrations - -#### Userflow -Userflow is used to display surveys and tips for the user. -You can manually trigger a predefined userflow content item by calling the method `triggerFlow` via uninav. Eg. `tcUniNav('triggerFlow', 'userflow-content-id', ...userflowArgs)`. - - ### Typescript Support Typescript type declarations (i.e. `*.d.ts`) can be sourced from the Github repo in the devDependencies of your package.json: diff --git a/src/lib/components/LinksMenu.svelte b/src/lib/components/LinksMenu.svelte index 280b34bb..ee13040f 100644 --- a/src/lib/components/LinksMenu.svelte +++ b/src/lib/components/LinksMenu.svelte @@ -4,7 +4,7 @@ import { classnames } from "lib/utils/classnames"; import { getPublicPath } from 'lib/utils/paths'; import SubMenu from "./SubMenu.svelte"; - import { NavigationHandler } from "../app-context/navigation-handler.model"; + import type { NavigationHandler } from "../app-context/navigation-handler.model"; const chevronDownIconUrl = getPublicPath(`/assets/ic-chevron-down.svg`); export let ref: Element | undefined = undefined; diff --git a/src/lib/components/Maintenance.module.scss b/src/lib/components/Maintenance.module.scss new file mode 100644 index 00000000..18cdfc90 --- /dev/null +++ b/src/lib/components/Maintenance.module.scss @@ -0,0 +1,43 @@ +@import 'lib/styles/fonts.scss'; + +.bannerWrap { + position: relative; + height: 48px; + width: 100%; +} + +.banner { + background: rgb(157, 27, 27); + color: #fff; + padding: 0.5rem; + display: flex; + justify-content: space-between; + + &:before { + content: ""; + display: block; + } +} + +.bannerContent { + flex: 1 1 0; + display: flex; + justify-content: center; + align-items: center; + column-gap: 1rem; + row-gap: 0.5rem; + margin: 0 0.5rem; + min-width: 0; + flex-wrap: wrap; +} + +.bannerText { + white-space: pre-wrap; + overflow-wrap: break-word; + font-family: $roboto; + font-size: 16px; + color: #fff; + line-height: 24px; + font-weight: bold; +} + diff --git a/src/lib/components/Maintenance.svelte b/src/lib/components/Maintenance.svelte new file mode 100644 index 00000000..e5179a93 --- /dev/null +++ b/src/lib/components/Maintenance.svelte @@ -0,0 +1,12 @@ + + +
diff --git a/src/lib/components/SubMenu.svelte b/src/lib/components/SubMenu.svelte index ee896811..61b3b8fd 100644 --- a/src/lib/components/SubMenu.svelte +++ b/src/lib/components/SubMenu.svelte @@ -1,6 +1,6 @@ +