Skip to content
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

Merged
merged 5 commits into from
Oct 22, 2020

Conversation

rayangler
Copy link
Collaborator

[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, using

.. mongo-web-shell::
   :version: 4.2

instead of the .. raw:: directive. Additionally, instances of .. only:: website were changed to .. cond:: html for the staging link page.

Copy link
Member

@sophstad sophstad left a 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. 🚀

}) => {
return (
<iframe
className="mws-root"
Copy link
Member

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!

sandbox="allow-scripts allow-same-origin"
width="100%"
height="320"
src={version ? SOURCE_URL + `?version=${version}` : SOURCE_URL}
Copy link
Member

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:

Suggested change
src={version ? SOURCE_URL + `?version=${version}` : SOURCE_URL}
src={version ? `${SOURCE_URL}?version=${version}` : SOURCE_URL}

width="100%"
height="320"
src={version ? SOURCE_URL + `?version=${version}` : SOURCE_URL}
></iframe>
Copy link
Member

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:

Suggested change
></iframe>
/>

@rayangler
Copy link
Collaborator Author

Bonus: Page that was having issues building renders now
[Server Staging Link: /reference/operator/aggregation/dateFromString]

Copy link
Member

@sophstad sophstad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@rayangler rayangler merged commit 3378796 into mongodb:master Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants