Skip to content

Commit

Permalink
Upgrade Homepage (#412)
Browse files Browse the repository at this point in the history
* chore: upgrade docusaurus / fix deprecations

* chore: upgrade docusaurus / fix deprecations

* feat: introduce v3

* chore: upgrade node in ci

* Reconcile v2 and v3 docs with latest unity builder changes. Remove parameters not available in v2 from v2 docs.

* Remove parameters and outputs from v2.2.0-pre

* Update version tags to align with new version

* chore: upgrade docusaurus tsconfig

* chore: import/order

* fix: unresolved import

* chore: versions as client-side block

* fix: firebase resolution

* Re-enable sections, Prettier readme, use LF line endings

* Upgraded getting-started.tsx
- Upgraded getting-started.tsx to use company SVGs instead of text
- Moved getting-started.tsx section up
- Updated node16 references to node18 in .md files

* Revamped versions page

* INCOMPLETE: Changed out Ant's table

* Starting Section Rework
- Reworked Starting/Opening Section
- Began Working on pricing calculator
- Changed JSX.Element (dep.) -> React.JSX.Element

* Created tooltip component
- Created tooltip.tsx
- Centered VSC buttons in Getting Started

* Devs that chose us section
- Moved GH, GL, CCI SVGs to /static/assets/images/icons
- 'Finished' Devs that chose us section (more logos needed)
- Reintroduced '.vscode' directory from .gitignore to support @apply rule

* Docker versions progress
- Finished expandable menu
- Only left to implement a Tooltip and DockerImageLinkOrRetryButton (will leave this one to webber)

* Tooltip & Docker Table finished

* pricing section

* disabled unused sections

* resolved requests

---------

Co-authored-by: Webber <webber@takken.io>
Co-authored-by: Andrew Kahr <22359829+AndrewKahr@users.noreply.github.com>
Co-authored-by: Gabriel Le Breton <lebreton.gabriel@gmail.com>
  • Loading branch information
4 people authored Sep 7, 2023
1 parent cca8a92 commit 62090d3
Show file tree
Hide file tree
Showing 46 changed files with 1,044 additions and 320 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ yarn-error.log*
/.idea/*
!/.idea/documentation.iml
!/.idea/prettier.xml
.vscode

# Reintroducing to add TailwindCSS @include rule
# .vscode

13 changes: 13 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"recommendations": [
"aaron-bond.better-comments",
"dbaeumer.vscode-eslint",
"dsznajder.es7-react-js-snippets",
"zignd.html-css-class-completion",
"ms-vscode.vscode-typescript-next",
"csstools.postcss",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss",
"wix.vscode-import-cost"
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"css.customData": [".vscode/tailwind.json"]
}
55 changes: 55 additions & 0 deletions .vscode/tailwind.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"version": 1.1,
"atDirectives": [
{
"name": "@tailwind",
"description": "Use the `@tailwind` directive to insert Tailwind's `base`, `components`, `utilities` and `screens` styles into your CSS.",
"references": [
{
"name": "Tailwind Documentation",
"url": "https://tailwindcss.com/docs/functions-and-directives#tailwind"
}
]
},
{
"name": "@apply",
"description": "Use the `@apply` directive to inline any existing utility classes into your own custom CSS. This is useful when you find a common utility pattern in your HTML that you’d like to extract to a new component.",
"references": [
{
"name": "Tailwind Documentation",
"url": "https://tailwindcss.com/docs/functions-and-directives#apply"
}
]
},
{
"name": "@responsive",
"description": "You can generate responsive variants of your own classes by wrapping their definitions in the `@responsive` directive:\n```css\n@responsive {\n .alert {\n background-color: #E53E3E;\n }\n}\n```\n",
"references": [
{
"name": "Tailwind Documentation",
"url": "https://tailwindcss.com/docs/functions-and-directives#responsive"
}
]
},
{
"name": "@screen",
"description": "The `@screen` directive allows you to create media queries that reference your breakpoints by **name** instead of duplicating their values in your own CSS:\n```css\n@screen sm {\n /* ... */\n}\n```\n…gets transformed into this:\n```css\n@media (min-width: 640px) {\n /* ... */\n}\n```\n",
"references": [
{
"name": "Tailwind Documentation",
"url": "https://tailwindcss.com/docs/functions-and-directives#screen"
}
]
},
{
"name": "@variants",
"description": "Generate `hover`, `focus`, `active` and other **variants** of your own utilities by wrapping their definitions in the `@variants` directive:\n```css\n@variants hover, focus {\n .btn-brand {\n background-color: #3182CE;\n }\n}\n```\n",
"references": [
{
"name": "Tailwind Documentation",
"url": "https://tailwindcss.com/docs/functions-and-directives#variants"
}
]
}
]
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ When fixing a bug it is fine to submit a pull request right away.

You need the following tools to be installed.

- [Node](https://nodejs.org/) installed at v16.X.
- [NodeJS](https://nodejs.org/) installed at v18.X.
- [Yarn](https://yarnpkg.com/) at v1.22.4+.

> **Tip:** _Use [nvm](https://github.com/nvm-sh/nvm) or [n](https://github.com/tj/n) or
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ You may also view the markdown files directly at the following links:
- [Getting Started with GameCI](docs/02-getting-started)
- [Github Actions](docs/03-github)
- [Gitlab Pipelines](docs/05-gitlab)
- [CircleCi<](docs/11-circleci)
- [CircleCi](docs/11-circleci)
- [Docker](docs/08-docker)
- [Github Cloud Runner](docs/03-github-cloud-runner)
- [Troubleshooting](docs/09-troubleshooting)
- [FAQ](docs/10-faq)

## Building the Docs Site

Built with [Docusaurus 2.](https://docusaurus.io/)
Built with [Docusaurus 2](https://docusaurus.io/).

This project has a hard dependancy on Node16. You will need to make sure that you have the proper
version of node installed to avoid errors.

- [Install Node16 on Ubuntu](https://joshtronic.com/2021/05/09/how-to-install-nodejs-16-on-ubuntu-2004-lts/)
- [Install Node16 using brew](https://apple.stackexchange.com/a/207883)
- [Install NodeJS v18 on Ubuntu](https://joshtronic.com/2022/04/24/how-to-install-nodejs-18-on-ubuntu-2004-lts/)
- [Install NodeJS v18 using brew](https://apple.stackexchange.com/a/207883)

This project relies on yarn for package management. You will need to install yarn in order to build
and test the documentation site.
Expand Down
6 changes: 5 additions & 1 deletion src/components/auth/safe-auth-check.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ export function SafeClaimsCheck({ user, fallback, children, requiredClaims }: Cl
}

// Apply fix while this is not merged https://github.com/FirebaseExtended/reactfire/pull/336
export function SafeAuthCheck({ fallback, children, requiredClaims }: AuthCheckProps): JSX.Element {
export function SafeAuthCheck({
fallback,
children,
requiredClaims,
}: AuthCheckProps): React.JSX.Element {
const { data: user } = useUser<firebase.User>();

if (user) {
Expand Down
146 changes: 0 additions & 146 deletions src/components/docs/versions/builds.tsx

This file was deleted.

88 changes: 88 additions & 0 deletions src/components/docs/versions/builds/build-row.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import React, { useState } from 'react';
import DockerImageLinkOrRetryButton, {
type Record,
} from '@site/src/components/docs/versions/docker-image-link-or-retry-button';
import Spinner from '@site/src/components/molecules/spinner';
import Tooltip from '@site/src/components/molecules/tooltip/tooltip';
import styles from './builds.module.scss';

const mapBuildStatusToIcon = {
started: <Spinner type="slow" />,
failed: '⚠',
published: '✅',
};

type Props = {
children: React.JSX.Element | React.JSX.Element[];
build: Record;
};

const CopyToClipboard = (copyString: string) => {
navigator.clipboard.writeText(copyString);
};

export default function BuildRow({ children, build }: Props) {
const [expanded, setExpanded] = useState(false);
const [toolbarContent, setToolbarContent] = useState('Click to copy');

const MapBuildStatusToElement = (status: string) => {
const icon = mapBuildStatusToIcon[status];

switch (status) {
case 'started':
return <Spinner type="slow" />;
case 'failed':
return <Tooltip content={build.failure?.reason}>{icon}</Tooltip>;
case 'published':
return icon;
default:
return status;
}
};

return (
<>
<tr className={styles.tableRow}>
<td
onClick={() => setExpanded(!expanded)}
className="text-center select-none cursor-pointer"
>
{expanded ? '➖' : '➕'}
</td>
<td className="text-center">{MapBuildStatusToElement(build.status)}</td>
<td>
<span>
{/* <a
href={`https://hub.docker.com/layers/unityci/editor/${build.buildInfo.baseOs}-${build.buildInfo.editorVersion}-${build.buildInfo.targetPlatform}-${build.buildInfo.repoVersion}/images/${build.dockerInfo.digest}`}
> */}
<Tooltip content={toolbarContent}>
<button
onClick={() => {
CopyToClipboard(build.buildId);
setToolbarContent('Copied to clipboard!');
}}
onMouseLeave={() => {
setToolbarContent('Click to copy');
}}
type="button"
>
{build.buildId}
</button>
</Tooltip>

{/* </a> */}
<DockerImageLinkOrRetryButton record={build} />
</span>
</td>
<td>{build.imageType}</td>
<td>{build.buildInfo.baseOs}</td>
<td>{build.buildInfo.targetPlatform}</td>
</tr>
{expanded && (
<tr className={styles.expandedContentRow}>
<td colSpan={6}>{children}</td>
</tr>
)}
</>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,11 @@
}

.expandedContentRow {
height: 0;
overflow: hidden;
}


.tableRow {
width: 100%;
}
Loading

0 comments on commit 62090d3

Please sign in to comment.