-
Notifications
You must be signed in to change notification settings - Fork 0
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
DOP-5133: Dark mode bug on Atlas Admin API docs #70
Conversation
@seungpark @mmeigs , I've made updates so it also fixes the bugs from DOP-5140. Please let me know if you have any questions! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comment below but changes LGTM 🙏
src/common-elements/linkify.tsx
Outdated
const lightModeSVG = | ||
'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMCIgeT0iMCIgd2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MTIgNTEyIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBmaWxsPSIjMDEwMTAxIiBkPSJNNDU5LjcgMjMzLjRsLTkwLjUgOTAuNWMtNTAgNTAtMTMxIDUwLTE4MSAwIC03LjktNy44LTE0LTE2LjctMTkuNC0yNS44bDQyLjEtNDIuMWMyLTIgNC41LTMuMiA2LjgtNC41IDIuOSA5LjkgOCAxOS4zIDE1LjggMjcuMiAyNSAyNSA2NS42IDI0LjkgOTAuNSAwbDkwLjUtOTAuNWMyNS0yNSAyNS02NS42IDAtOTAuNSAtMjQuOS0yNS02NS41LTI1LTkwLjUgMGwtMzIuMiAzMi4yYy0yNi4xLTEwLjItNTQuMi0xMi45LTgxLjYtOC45bDY4LjYtNjguNmM1MC01MCAxMzEtNTAgMTgxIDBDNTA5LjYgMTAyLjMgNTA5LjYgMTgzLjQgNDU5LjcgMjMzLjR6TTIyMC4zIDM4Mi4ybC0zMi4yIDMyLjJjLTI1IDI0LjktNjUuNiAyNC45LTkwLjUgMCAtMjUtMjUtMjUtNjUuNiAwLTkwLjVsOTAuNS05MC41YzI1LTI1IDY1LjUtMjUgOTAuNSAwIDcuOCA3LjggMTIuOSAxNy4yIDE1LjggMjcuMSAyLjQtMS40IDQuOC0yLjUgNi44LTQuNWw0Mi4xLTQyYy01LjQtOS4yLTExLjYtMTgtMTkuNC0yNS44IC01MC01MC0xMzEtNTAtMTgxIDBsLTkwLjUgOTAuNWMtNTAgNTAtNTAgMTMxIDAgMTgxIDUwIDUwIDEzMSA1MCAxODEgMGw2OC42LTY4LjZDMjc0LjYgMzk1LjEgMjQ2LjQgMzkyLjMgMjIwLjMgMzgyLjJ6Ii8+PC9zdmc+Cg=='; | ||
const decodedSVG = Buffer.from(lightModeSVG, 'base64').toString('utf-8'); | ||
const modifiedSVG = decodedSVG.replace('fill="#010101"', 'fill="#ffffff"'); | ||
const darkModeSVG = Buffer.from(modifiedSVG, 'utf-8').toString('base64'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think I'd prefer for us to just use the hardcoded base64 strings as constants rather than creating them each time. Not really blocking, just wondering why you decided on this rather than two strings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chose this since I needed to convert it to utf-8
to convert the color but give me one sec and I can try to just get the two strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mmeigs , i updaed to base64!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just spun it up. Looks good!
Stories/Links:
DOP-5133
Current behavior
current link

Staged Behavior
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.Note
And for this ticket, add
#tag/Data-Federation/operation/createOneFederatedDatabaseInOneProject
to the end of the path to see the section with the table where the bug wasUpdates
made changes so this ticket also acounts for DOP-5140 , so to look for the update table add the following tag to the html path
#tag/Database-Users/operation/createDatabaseUser