Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stories/Links:
DOP-5134
Notes:
Adds Language selector to UnifiedNav in redoc OpenAPI pages.
Sadly the consistent-nav does not export their types therefore we have a couple instances of git-ignore 😞
I tried to create mirrored types, but also oddly consistent-nav right now does not include ja-jp as a valid language. 😱
Most of this code is copied/slightly altered from Snooty's locale.js file.
Preprd example of it working!!
To build
To build locally and review, here are helpful steps:
Ensure Artifactory credentials are set up and set to
NPM_BASE_64_AUTH
andNPM_EMAIL
env variables. This should be similar to the setup on Snooty. Below are the instructions to work with Redoc locally with custom MongoDB components, such as the Consistent Nav:redoc
/root folder of this fork, runnpm install
.redoc/cli
folder, runnpm install
.redoc/cli
folder, run:npm link ../ ../node_modules/react/ ../node_modules/styled-components/
. This will link certain CLI dependencies to be compatible with the local instance and fork of Redoc.redoc
/root folder, run:npm run bundle
. This will create bundled files needed by the CLI / needed to run the CLI.redoc-static.html
in your root directory.