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

Upgrade Homepage #412

Merged
merged 27 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e28fe87
chore: upgrade docusaurus / fix deprecations
webbertakken Aug 16, 2023
bf117b5
chore: upgrade docusaurus / fix deprecations
webbertakken Aug 16, 2023
8e7759d
feat: introduce v3
webbertakken Aug 16, 2023
559876e
chore: upgrade node in ci
webbertakken Aug 16, 2023
0a577d0
Reconcile v2 and v3 docs with latest unity builder changes. Remove pa…
AndrewKahr Aug 17, 2023
42d92bb
Remove parameters and outputs from v2.2.0-pre
AndrewKahr Aug 18, 2023
ec071aa
Update version tags to align with new version
AndrewKahr Aug 18, 2023
9b50b9e
chore: upgrade docusaurus tsconfig
webbertakken Aug 19, 2023
90040fc
chore: import/order
webbertakken Aug 19, 2023
f16ca3e
fix: unresolved import
webbertakken Aug 19, 2023
816f0c2
chore: versions as client-side block
webbertakken Aug 19, 2023
6d80602
fix: firebase resolution
webbertakken Aug 20, 2023
feb0b65
Merge branch 'main' into docs-v3
GabLeRoux Aug 21, 2023
e6d9165
Re-enable sections, Prettier readme, use LF line endings
EliasVal Aug 21, 2023
a6a6f09
Upgraded getting-started.tsx
EliasVal Aug 21, 2023
d6bdf16
Revamped versions page
EliasVal Aug 22, 2023
db70e9b
Merge branch 'main' into upgrade_homepage
EliasVal Aug 22, 2023
1012ba3
INCOMPLETE: Changed out Ant's table
EliasVal Aug 22, 2023
cffc100
Starting Section Rework
EliasVal Aug 22, 2023
fdf11f3
Created tooltip component
EliasVal Aug 22, 2023
ef29646
Devs that chose us section
EliasVal Aug 25, 2023
61f612f
Docker versions progress
EliasVal Aug 25, 2023
92596cf
Tooltip & Docker Table finished
EliasVal Aug 26, 2023
a64dd3c
pricing section
EliasVal Aug 29, 2023
9c13a8b
disabled unused sections
EliasVal Sep 2, 2023
73365ae
resolved requests
EliasVal Sep 2, 2023
ff7be21
Merge branch 'main' into upgrade_homepage
webbertakken Sep 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

3 changes: 2 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100,
"proseWrap": "always"
"proseWrap": "always",
"endOfLine": "lf"
EliasVal marked this conversation as resolved.
Show resolved Hide resolved
}
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,14 @@
}

.expandedContentRow {
* {
white-space: pre-wrap;
}
EliasVal marked this conversation as resolved.
Show resolved Hide resolved
height: 0;
overflow: hidden;
}


.tableRow {
width: 100%;
}
Loading
Loading