Skip to content

Commit a132831

Browse files
authored
Revert "Upgrade Homepage (#412)"
This reverts commit 62090d3.
1 parent e9425c8 commit a132831

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+320
-1044
lines changed

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,5 @@ yarn-error.log*
3535
/.idea/*
3636
!/.idea/documentation.iml
3737
!/.idea/prettier.xml
38-
39-
# Reintroducing to add TailwindCSS @include rule
40-
# .vscode
38+
.vscode
4139

.vscode/extensions.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

.vscode/tailwind.json

Lines changed: 0 additions & 55 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ When fixing a bug it is fine to submit a pull request right away.
1818

1919
You need the following tools to be installed.
2020

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

2424
> **Tip:** _Use [nvm](https://github.com/nvm-sh/nvm) or [n](https://github.com/tj/n) or

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,21 @@ You may also view the markdown files directly at the following links:
2525
- [Getting Started with GameCI](docs/02-getting-started)
2626
- [Github Actions](docs/03-github)
2727
- [Gitlab Pipelines](docs/05-gitlab)
28-
- [CircleCi](docs/11-circleci)
28+
- [CircleCi<](docs/11-circleci)
2929
- [Docker](docs/08-docker)
3030
- [Github Cloud Runner](docs/03-github-cloud-runner)
3131
- [Troubleshooting](docs/09-troubleshooting)
3232
- [FAQ](docs/10-faq)
3333

3434
## Building the Docs Site
3535

36-
Built with [Docusaurus 2](https://docusaurus.io/).
36+
Built with [Docusaurus 2.](https://docusaurus.io/)
3737

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

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

4444
This project relies on yarn for package management. You will need to install yarn in order to build
4545
and test the documentation site.

src/components/auth/safe-auth-check.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@ export function SafeClaimsCheck({ user, fallback, children, requiredClaims }: Cl
2323
}
2424

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

3329
if (user) {

src/components/docs/versions/builds/builds.module.scss renamed to src/components/docs/versions/builds.module.scss

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,4 @@
1212
}
1313

1414
.expandedContentRow {
15-
height: 0;
16-
overflow: hidden;
17-
}
18-
19-
20-
.tableRow {
21-
width: 100%;
2215
}
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
import { ColumnsType } from 'antd/es/table';
2+
import React from 'react';
3+
import { useFirestore, useFirestoreCollectionData } from 'reactfire';
4+
import { Table, Tooltip } from 'antd';
5+
import Spinner from '@site/src/components/molecules/spinner';
6+
import DockerImageLinkOrRetryButton from '@site/src/components/docs/versions/docker-image-link-or-retry-button';
7+
import BuildFailureDetails from '@site/src/components/docs/versions/build-failure-details';
8+
// import styles from './builds.module.scss';
9+
10+
interface RepoVersionInfo {
11+
version: string;
12+
major: number;
13+
minor: number;
14+
patch: number;
15+
}
16+
17+
interface Props {
18+
ciJobId: string;
19+
repoVersionInfo: RepoVersionInfo;
20+
editorVersionInfo;
21+
}
22+
23+
const mapBuildStatusToIcon = {
24+
started: <Spinner type="slow" />,
25+
failed: '⚠',
26+
published: '✅',
27+
};
28+
29+
const Builds = ({ ciJobId, repoVersionInfo, editorVersionInfo, ...props }: Props) => {
30+
const loading = <p>Fetching builds...</p>;
31+
32+
const ciBuilds = useFirestore().collection('ciBuilds').where('relatedJobId', '==', ciJobId);
33+
34+
const { status, data } = useFirestoreCollectionData<{ [key: string]: any }>(ciBuilds);
35+
const isLoading = status === 'loading';
36+
37+
if (isLoading) {
38+
return loading;
39+
}
40+
41+
const columns = [
42+
{
43+
width: 45,
44+
dataIndex: 'status',
45+
key: 'status',
46+
render: (value, record) => {
47+
const icon = mapBuildStatusToIcon[value];
48+
switch (value) {
49+
case 'published':
50+
return icon;
51+
case 'failed':
52+
return <Tooltip title={record.failure?.reason}>{icon}</Tooltip>;
53+
case 'started':
54+
return <Tooltip title="Build has started">{icon}</Tooltip>;
55+
default:
56+
return value;
57+
}
58+
},
59+
},
60+
{
61+
width: 45,
62+
render: (value, record) => <DockerImageLinkOrRetryButton record={record} />,
63+
key: 'docker-image-link-or-retry-button',
64+
},
65+
{
66+
title: 'Build identifier',
67+
dataIndex: 'buildId',
68+
key: 'buildId',
69+
onFilter: (value, record) => record.buildId.includes(value),
70+
defaultSortOrder: 'ascend',
71+
sorter: (a, b) => a.buildId.localeCompare(b.buildId, 'en-GB'),
72+
ellipsis: true,
73+
},
74+
{
75+
title: 'Image type',
76+
dataIndex: 'imageType',
77+
key: 'imageType',
78+
onFilter: (value, record) => record.imageType.includes(value),
79+
sorter: (a, b) => a.imageType.localeCompare(b.imageType, 'en-GB'),
80+
ellipsis: true,
81+
},
82+
{
83+
title: 'OS',
84+
dataIndex: ['buildInfo', 'baseOs'],
85+
key: 'buildInfo.baseOs',
86+
onFilter: (value, record) => record.buildInfo.baseOs.includes(value),
87+
sorter: (a, b) => a.buildInfo.baseOs.localeCompare(b.buildInfo.baseOs, 'en-GB'),
88+
ellipsis: true,
89+
},
90+
{
91+
title: 'Target platform',
92+
dataIndex: ['buildInfo', 'targetPlatform'],
93+
key: 'buildInfo.targetPlatform',
94+
onFilter: (value, record) => record.buildInfo.targetPlatform.includes(value),
95+
sorter: (a, b) =>
96+
a.buildInfo.targetPlatform.localeCompare(b.buildInfo.targetPlatform, 'en-GB'),
97+
ellipsis: true,
98+
},
99+
{
100+
title: 'Editor version',
101+
dataIndex: ['buildInfo', 'editorVersion'],
102+
key: 'buildInfo.editorVersion',
103+
onFilter: (value, record) => record.buildInfo.editorVersion.includes(value),
104+
sorter: (a, b) => a.buildInfo.editorVersion.localeCompare(b.buildInfo.editorVersion, 'en-GB'),
105+
ellipsis: true,
106+
},
107+
{
108+
title: 'Repo version',
109+
dataIndex: ['buildInfo', 'repoVersion'],
110+
key: 'buildInfo.repoVersion',
111+
onFilter: (value, record) => record.buildInfo.repoVersion.includes(value),
112+
sorter: (a, b) => a.buildInfo.repoVersion.localeCompare(b.buildInfo.repoVersion, 'en-GB'),
113+
ellipsis: true,
114+
},
115+
] as ColumnsType<any>;
116+
117+
const expandable = {
118+
rowExpandable: () => true,
119+
// expandedRowClassName: () => styles.expandedContentRow,
120+
expandedRowRender: (record) => (
121+
<BuildFailureDetails
122+
style={{ margin: 0 }}
123+
ciJob={ciJobId}
124+
editorVersionInfo={editorVersionInfo}
125+
repoVersionInfo={repoVersionInfo}
126+
ciBuild={record}
127+
/>
128+
),
129+
};
130+
131+
return (
132+
<Table
133+
{...props}
134+
key={ciJobId}
135+
dataSource={data}
136+
columns={columns}
137+
// sticky
138+
rowKey={(row) => row.NO_ID_FIELD}
139+
// rowClassName={() => styles.stickyRow}
140+
expandable={expandable}
141+
pagination={false}
142+
/>
143+
);
144+
};
145+
146+
export default Builds;

0 commit comments

Comments
 (0)