Skip to content

PROD-3245 README & Version 1 -> PROD-3115_uni-nav #428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src-ts/config/environments/environment.default.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ export const EnvironmentConfigDefault: EnvironmentConfigModel = {
WP_CONTENT: `${COMMUNITY_WEBSITE}/wp-content`,
},
UNIVERSAL_NAV: {
URL: 'https://uni-nav.topcoder-dev.com/tc-universal-nav.js',
URL: 'https://uni-nav.topcoder-dev.com/tc-universal-nav-1.js',
},
}
2 changes: 1 addition & 1 deletion src-ts/config/environments/environment.prod.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ export const EnvironmentConfigProd: EnvironmentConfigModel = {
WP_CONTENT: `${COMMUNITY_WEBSITE}/wp-content`,
},
UNIVERSAL_NAV: {
URL: 'https://uni-nav.topcoder.com/tc-universal-nav.js',
URL: 'https://uni-nav.topcoder.com/tc-universal-nav-1.js',
},
}
28 changes: 28 additions & 0 deletions src-ts/header/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Topcoder Universal Navigation

The Platform UI project uses the Topcoder Universal navigation ([README](https://github.com/topcoder-platform/universal-navigation)).

## Uni-nav Versions

The Uni-nav is a hosted JS library. There are currently dev and prod versions of the library located at:

https://uni-nav.topcoder.com/tc-universal-nav-1.js

https://uni-nav.topcoder-dev.com/tc-universal-nav-1.js

The URL is set at build time with the [Global Config](../lib/global-config.model.ts) `UNIVERSAL_NAV.URL` property.

>See the [Local Environment Setup](../../README.md#local-environment-setup) section of the main README for instructions on how to set your environment configuration.

>See the [Uni-Nav Version README](https://github.com/topcoder-platform/universal-navigation#versioning) for more information about versioning.

## Uni-nav Initialization

The Header uses the `tcUniNav` method to initialize the nav with:

- active tool name
- active tool root route
- current user, if logged in
- action handler callbacks (e.g. navigation, log in, sign up)

Because the Platform UI hosts multiple tools, each time the user navigates to a new tool, the Header updates the uni-nav w/the active tool info.