Skip to content

Commit

Permalink
Revert "Upgrade Homepage (#412)" (#424)
Browse files Browse the repository at this point in the history
This reverts commit 62090d3.
  • Loading branch information
webbertakken authored Sep 26, 2023
1 parent e9425c8 commit f717e6d
Show file tree
Hide file tree
Showing 46 changed files with 320 additions and 1,044 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,5 @@ yarn-error.log*
/.idea/*
!/.idea/documentation.iml
!/.idea/prettier.xml

# Reintroducing to add TailwindCSS @include rule
# .vscode
.vscode

13 changes: 0 additions & 13 deletions .vscode/extensions.json

This file was deleted.

3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

55 changes: 0 additions & 55 deletions .vscode/tailwind.json

This file was deleted.

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.

- [NodeJS](https://nodejs.org/) installed at v18.X.
- [Node](https://nodejs.org/) installed at v16.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 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)
- [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)

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: 1 addition & 5 deletions src/components/auth/safe-auth-check.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ 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): React.JSX.Element {
export function SafeAuthCheck({ fallback, children, requiredClaims }: AuthCheckProps): JSX.Element {
const { data: user } = useUser<firebase.User>();

if (user) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,4 @@
}

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


.tableRow {
width: 100%;
}
146 changes: 146 additions & 0 deletions src/components/docs/versions/builds.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
import { ColumnsType } from 'antd/es/table';
import React from 'react';
import { useFirestore, useFirestoreCollectionData } from 'reactfire';
import { Table, Tooltip } from 'antd';
import Spinner from '@site/src/components/molecules/spinner';
import DockerImageLinkOrRetryButton from '@site/src/components/docs/versions/docker-image-link-or-retry-button';
import BuildFailureDetails from '@site/src/components/docs/versions/build-failure-details';
// import styles from './builds.module.scss';

interface RepoVersionInfo {
version: string;
major: number;
minor: number;
patch: number;
}

interface Props {
ciJobId: string;
repoVersionInfo: RepoVersionInfo;
editorVersionInfo;
}

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

const Builds = ({ ciJobId, repoVersionInfo, editorVersionInfo, ...props }: Props) => {
const loading = <p>Fetching builds...</p>;

const ciBuilds = useFirestore().collection('ciBuilds').where('relatedJobId', '==', ciJobId);

const { status, data } = useFirestoreCollectionData<{ [key: string]: any }>(ciBuilds);
const isLoading = status === 'loading';

if (isLoading) {
return loading;
}

const columns = [
{
width: 45,
dataIndex: 'status',
key: 'status',
render: (value, record) => {
const icon = mapBuildStatusToIcon[value];
switch (value) {
case 'published':
return icon;
case 'failed':
return <Tooltip title={record.failure?.reason}>{icon}</Tooltip>;
case 'started':
return <Tooltip title="Build has started">{icon}</Tooltip>;
default:
return value;
}
},
},
{
width: 45,
render: (value, record) => <DockerImageLinkOrRetryButton record={record} />,
key: 'docker-image-link-or-retry-button',
},
{
title: 'Build identifier',
dataIndex: 'buildId',
key: 'buildId',
onFilter: (value, record) => record.buildId.includes(value),
defaultSortOrder: 'ascend',
sorter: (a, b) => a.buildId.localeCompare(b.buildId, 'en-GB'),
ellipsis: true,
},
{
title: 'Image type',
dataIndex: 'imageType',
key: 'imageType',
onFilter: (value, record) => record.imageType.includes(value),
sorter: (a, b) => a.imageType.localeCompare(b.imageType, 'en-GB'),
ellipsis: true,
},
{
title: 'OS',
dataIndex: ['buildInfo', 'baseOs'],
key: 'buildInfo.baseOs',
onFilter: (value, record) => record.buildInfo.baseOs.includes(value),
sorter: (a, b) => a.buildInfo.baseOs.localeCompare(b.buildInfo.baseOs, 'en-GB'),
ellipsis: true,
},
{
title: 'Target platform',
dataIndex: ['buildInfo', 'targetPlatform'],
key: 'buildInfo.targetPlatform',
onFilter: (value, record) => record.buildInfo.targetPlatform.includes(value),
sorter: (a, b) =>
a.buildInfo.targetPlatform.localeCompare(b.buildInfo.targetPlatform, 'en-GB'),
ellipsis: true,
},
{
title: 'Editor version',
dataIndex: ['buildInfo', 'editorVersion'],
key: 'buildInfo.editorVersion',
onFilter: (value, record) => record.buildInfo.editorVersion.includes(value),
sorter: (a, b) => a.buildInfo.editorVersion.localeCompare(b.buildInfo.editorVersion, 'en-GB'),
ellipsis: true,
},
{
title: 'Repo version',
dataIndex: ['buildInfo', 'repoVersion'],
key: 'buildInfo.repoVersion',
onFilter: (value, record) => record.buildInfo.repoVersion.includes(value),
sorter: (a, b) => a.buildInfo.repoVersion.localeCompare(b.buildInfo.repoVersion, 'en-GB'),
ellipsis: true,
},
] as ColumnsType<any>;

const expandable = {
rowExpandable: () => true,
// expandedRowClassName: () => styles.expandedContentRow,
expandedRowRender: (record) => (
<BuildFailureDetails
style={{ margin: 0 }}
ciJob={ciJobId}
editorVersionInfo={editorVersionInfo}
repoVersionInfo={repoVersionInfo}
ciBuild={record}
/>
),
};

return (
<Table
{...props}
key={ciJobId}
dataSource={data}
columns={columns}
// sticky
rowKey={(row) => row.NO_ID_FIELD}
// rowClassName={() => styles.stickyRow}
expandable={expandable}
pagination={false}
/>
);
};

export default Builds;
88 changes: 0 additions & 88 deletions src/components/docs/versions/builds/build-row.tsx

This file was deleted.

Loading

0 comments on commit f717e6d

Please sign in to comment.