-
Notifications
You must be signed in to change notification settings - Fork 36
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-1334: Implement MongoWebShell component #305
Conversation
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.
Really nice job with this! I just left notes with some improvements/style notes. 🚀
src/components/MongoWebShell.js
Outdated
}) => { | ||
return ( | ||
<iframe | ||
className="mws-root" |
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.
Here's a nice opportunity to reduce our dependency on legacy CSS: instead of including the class that applies this rule, we can use Emotion's CSS Prop to apply the border
styling. There are lots of examples of it in use in our codebase, or feel free to reach out for clarification!
src/components/MongoWebShell.js
Outdated
sandbox="allow-scripts allow-same-origin" | ||
width="100%" | ||
height="320" | ||
src={version ? SOURCE_URL + `?version=${version}` : SOURCE_URL} |
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] No need to mix string concatenation with a template literal:
src={version ? SOURCE_URL + `?version=${version}` : SOURCE_URL} | |
src={version ? `${SOURCE_URL}?version=${version}` : SOURCE_URL} |
src/components/MongoWebShell.js
Outdated
width="100%" | ||
height="320" | ||
src={version ? SOURCE_URL + `?version=${version}` : SOURCE_URL} | ||
></iframe> |
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] We can probably make this iframe self closing:
></iframe> | |
/> |
Bonus: Page that was having issues building renders now |
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.
💯
[JIRA Ticket]
[Server Staging Link: /tutorial/update-documents-with-aggregation-pipeline]
[Server Staging Link: /tutorial/getting-started]
This PR allows the MongoDB Web Shell to be rendered on server docs.
Staging link was built with a locally changed version of
docs
, usinginstead of the
.. raw::
directive. Additionally, instances of.. only:: website
were changed to.. cond:: html
for the staging link page.