Skip to content

Commit 4b503f6

Browse files
Merge pull request #428 from topcoder-platform/PROD-3257_readme
PROD-3245 README & Version 1 -> PROD-3115_uni-nav
2 parents b158852 + 2dae369 commit 4b503f6

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

src-ts/config/environments/environment.default.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ export const EnvironmentConfigDefault: EnvironmentConfigModel = {
4242
WP_CONTENT: `${COMMUNITY_WEBSITE}/wp-content`,
4343
},
4444
UNIVERSAL_NAV: {
45-
URL: 'https://uni-nav.topcoder-dev.com/tc-universal-nav.js',
45+
URL: 'https://uni-nav.topcoder-dev.com/v1/tc-universal-nav.js',
4646
},
4747
}

src-ts/config/environments/environment.prod.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ export const EnvironmentConfigProd: EnvironmentConfigModel = {
4040
WP_CONTENT: `${COMMUNITY_WEBSITE}/wp-content`,
4141
},
4242
UNIVERSAL_NAV: {
43-
URL: 'https://uni-nav.topcoder.com/tc-universal-nav.js',
43+
URL: 'https://uni-nav.topcoder.com/v1/tc-universal-nav.js',
4444
},
4545
}

src-ts/header/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Topcoder Universal Navigation
2+
3+
The Platform UI project uses the Topcoder Universal navigation ([README](https://github.com/topcoder-platform/universal-navigation)).
4+
5+
## Uni-nav Versions
6+
7+
The Uni-nav is a hosted JS library. There are currently dev and prod versions of the library located at:
8+
9+
https://uni-nav.topcoder.com/v1/tc-universal-nav.js
10+
11+
https://uni-nav.topcoder-dev.com/v1/tc-universal-nav.js
12+
13+
The URL is set at build time with the [Global Config](../lib/global-config.model.ts) `UNIVERSAL_NAV.URL` property.
14+
15+
>See the [Local Environment Setup](../../README.md#local-environment-setup) section of the main README for instructions on how to set your environment configuration.
16+
17+
>See the [Uni-Nav Version README](https://github.com/topcoder-platform/universal-navigation#versioning) for more information about versioning.
18+
19+
## Uni-nav Initialization
20+
21+
The Header uses the `tcUniNav` method to initialize the nav with:
22+
23+
- active tool name
24+
- active tool root route
25+
- current user, if logged in
26+
- action handler callbacks (e.g. navigation, log in, log out, sign up)
27+
28+
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.

0 commit comments

Comments
 (0)