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

Added new installation guide #59

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Added new installation guide #59

wants to merge 4 commits into from

Conversation

MartinaeyNL
Copy link
Contributor

@MartinaeyNL MartinaeyNL commented Mar 2, 2025

Description

I've added more documentation on the installation for OpenRemote using Docker.
My motivation was the amount of people asking for help on setting up custom OpenRemote installations.
The goal is to simplify the setup process for configurations other than the demo setup.

I'll add some screenshots later.

Changelog;

  • Added new 'How to Install' folder/category, with an extensive 'Install using Docker' page.
    It contains guides for setting up the demo, deploying an production instance, or how to deploy a custom project.
    I utilized the Docusaurus tab component to make this possible
  • Added custom React component for a clickable card element.
  • Added a lot of SVG icons used in the 'How to install' documentation. They originate from materialdesignicons.
  • Improved the code block theme for both dark- and light mode.

@wborn wborn mentioned this pull request Mar 6, 2025
@wborn wborn requested a review from Copilot March 31, 2025 15:32
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the OpenRemote documentation by adding a new installation guide, improving the code block theme, and introducing a reusable card component for documentation purposes.

  • Added a new 'How to install' category to the docs sidebar.
  • Updated the Docusaurus config with custom prism themes for better code syntax highlighting.
  • Introduced a CardElement React component for clickable documentation cards.

Reviewed Changes

Copilot reviewed 14 out of 21 changed files in this pull request and generated 1 comment.

File Description
sidebars.ts Added a new documentation category for installation guidance.
docusaurus.config.ts Updated prism themes for code blocks in both dark and light modes.
docs/util/card-element.jsx Added a CardElement component for clickable card elements.
Files not reviewed (7)
  • docs/how-to-install/styles.module.css: Language not supported
  • docs/how-to-install/using-aws-marketplace.mdx: Language not supported
  • docs/how-to-install/using-docker.mdx: Language not supported
  • docs/how-to-install/using-kubernetes.mdx: Language not supported
  • docs/how-to-install/using-openremote-cli.mdx: Language not supported
  • docs/util/util.module.css: Language not supported
  • src/css/styles.css: Language not supported

Comment on lines +8 to +10
{children?.length ? children[0] : children}
</div>
{children?.length &&
Copy link
Preview

Copilot AI Mar 31, 2025

Choose a reason for hiding this comment

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

The conditional check 'children?.length' returns true for string values, causing children[0] to extract only the first character instead of the entire string. Consider using Array.isArray(children) to differentiate between an array of elements and a single string.

Suggested change
{children?.length ? children[0] : children}
</div>
{children?.length &&
{Array.isArray(children) ? children[0] : children}
</div>
{Array.isArray(children) &&

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was using children?.length intentionally here.
This condition statement covers both undefined objects and an empty array.
However, I'm not sure whether this is the best solution.
Is this code OK for you?

@wborn wborn requested a review from Copilot March 31, 2025 15:39
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the OpenRemote documentation by adding a new installation guide using Docker, a custom clickable card React component, and improvements to the code block theme.

  • Added a new sidebar category for installation guides.
  • Updated Docusaurus configuration to use new Prism themes.
  • Introduced a new CardElement React component for clickable card elements.

Reviewed Changes

Copilot reviewed 14 out of 21 changed files in this pull request and generated 1 comment.

File Description
sidebars.ts Added a new category for "How to install" documentation.
docusaurus.config.ts Integrated custom Prism themes for code block styling.
docs/util/card-element.jsx Created a new React component for clickable card elements.
Files not reviewed (7)
  • docs/how-to-install/styles.module.css: Language not supported
  • docs/how-to-install/using-aws-marketplace.mdx: Language not supported
  • docs/how-to-install/using-docker.mdx: Language not supported
  • docs/how-to-install/using-kubernetes.mdx: Language not supported
  • docs/how-to-install/using-openremote-cli.mdx: Language not supported
  • docs/util/util.module.css: Language not supported
  • src/css/styles.css: Language not supported

Comment on lines +8 to +10
{children?.length ? children[0] : children}
</div>
{children?.length &&
Copy link
Preview

Copilot AI Mar 31, 2025

Choose a reason for hiding this comment

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

Using children?.length to decide whether to index into children may lead to unintended behavior if children is a string (since strings have a length property). Consider using Array.isArray(children) to ensure children is an array before accessing its elements.

Suggested change
{children?.length ? children[0] : children}
</div>
{children?.length &&
{Array.isArray(children) && children.length > 0 ? children[0] : children}
</div>
{Array.isArray(children) && children.length > 1 &&

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant