From 6e49effb7fd8c122183d17881b66ea69044a51aa Mon Sep 17 00:00:00 2001 From: Team 1280 Programming Laptop <59985235+Team1280Programming@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:38:48 -0800 Subject: [PATCH 01/50] `npm run format` --- package-lock.json | 183 +++++++++++++++++++++++++- src/app/about/page.tsx | 5 +- src/app/components/News.tsx | 13 +- src/app/help/accessibility/page.tsx | 4 +- src/app/legal/copyright/page.tsx | 4 +- src/app/legal/privacy/page.tsx | 4 +- src/app/page.tsx | 4 +- src/app/status/notifications/page.tsx | 11 +- src/app/status/page.tsx | 4 +- src/app/subscribe/page.tsx | 4 +- 10 files changed, 215 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2948213..290fbb7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -521,6 +521,32 @@ "node": ">=6.9.0" } }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -971,6 +997,38 @@ "react": "^18.0.0" } }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -1001,13 +1059,13 @@ "version": "15.7.11", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz", "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==", - "dev": true + "devOptional": true }, "node_modules/@types/react": { "version": "18.2.55", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.55.tgz", "integrity": "sha512-Y2Tz5P4yz23brwm2d7jNon39qoAtMMmalOQv6+fEFt1mT+FcM3D841wDpoUvFXhaYenuROCy3FZYqdTjM7qVyA==", - "dev": true, + "devOptional": true, "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -1027,7 +1085,7 @@ "version": "0.16.8", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==", - "dev": true + "devOptional": true }, "node_modules/@typescript-eslint/parser": { "version": "6.21.0", @@ -1182,6 +1240,17 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/acorn-walk": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", + "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -1729,6 +1798,14 @@ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -1759,7 +1836,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "dev": true + "devOptional": true }, "node_modules/damerau-levenshtein": { "version": "1.0.8", @@ -3568,6 +3645,14 @@ "node": "14 || >=16.14" } }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -4344,6 +4429,13 @@ "node": ">=8.10.0" } }, + "node_modules/redux": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", + "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", + "dev": true, + "peer": true + }, "node_modules/reflect.getprototypeof": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.5.tgz", @@ -5022,6 +5114,70 @@ "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", "dev": true }, + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node/node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -5236,6 +5392,14 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/webpack-sources": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", @@ -5455,6 +5619,17 @@ "node": ">= 14" } }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/src/app/about/page.tsx b/src/app/about/page.tsx index 3c498c0..671491a 100644 --- a/src/app/about/page.tsx +++ b/src/app/about/page.tsx @@ -28,10 +28,7 @@ export default function Page() {
  • You can contribute to our website development or add your documents and user account to eeXiv on our{' '} - + GitHub repository . diff --git a/src/app/components/News.tsx b/src/app/components/News.tsx index 1902c2d..710a794 100644 --- a/src/app/components/News.tsx +++ b/src/app/components/News.tsx @@ -31,14 +31,21 @@ export default function News() { eeXiv is currently under active development! There may be major updates, breaking changes, or weird bugs. Report bugs, suggest new features, or give us feedback at{' '} - + our issue tracker.
  • Want to upload your documents or just make yourself a profile on - eeXiv? Check our about page for more - information! + eeXiv? Check our{' '} + + about page + {' '} + for more information!
  • diff --git a/src/app/help/accessibility/page.tsx b/src/app/help/accessibility/page.tsx index ab26783..83be830 100644 --- a/src/app/help/accessibility/page.tsx +++ b/src/app/help/accessibility/page.tsx @@ -1,7 +1,9 @@ export default function Page() { return (
    -

    Accessibility

    +

    + Accessibility +

    If you encounter any accessibility-related issues related to your use of our site, it is likely because of our jank code architecture. diff --git a/src/app/legal/copyright/page.tsx b/src/app/legal/copyright/page.tsx index 8c75ebd..88a94ca 100644 --- a/src/app/legal/copyright/page.tsx +++ b/src/app/legal/copyright/page.tsx @@ -2,7 +2,9 @@ import Link from 'next/link' export default function Page() { return (

    -

    Copyright

    +

    + Copyright +

    All content on this site is licensed under the{' '} diff --git a/src/app/legal/privacy/page.tsx b/src/app/legal/privacy/page.tsx index 2aa189f..4449421 100644 --- a/src/app/legal/privacy/page.tsx +++ b/src/app/legal/privacy/page.tsx @@ -1,7 +1,9 @@ export default function Page() { return (

    -

    Privacy Policy

    +

    + Privacy Policy +

    {`User privacy is important to us. Just kidding. We don't collect any personal information. We only use it to help us improve eeXiv. Your diff --git a/src/app/page.tsx b/src/app/page.tsx index 1132f39..7e41dbd 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -45,7 +45,9 @@ export default function Home() {


    -
    Recently released documents
    +
    + Recently released documents +


    diff --git a/src/app/status/notifications/page.tsx b/src/app/status/notifications/page.tsx index 537d862..4e5d04d 100644 --- a/src/app/status/notifications/page.tsx +++ b/src/app/status/notifications/page.tsx @@ -3,12 +3,15 @@ import Link from 'next/link' export default function Page() { return (
    -

    Get status notifications

    +

    + Get status notifications +

    We currently do not have the technical support to implement mailing - lists in eeXiv. Check status frequently for updates. - The best way to stay connected with the status of the eeXiv project is - to watch it on GitHub. + lists in eeXiv. Check status frequently for + updates. The best way to stay connected with the status of the eeXiv + project is to watch it on{' '} + GitHub.

    ) diff --git a/src/app/status/page.tsx b/src/app/status/page.tsx index b0b96df..4ff8f8a 100644 --- a/src/app/status/page.tsx +++ b/src/app/status/page.tsx @@ -6,7 +6,9 @@ export default function Page() { return (

    Status

    -

    +

    eeXiv is online. All systems{' '} operational.

    diff --git a/src/app/subscribe/page.tsx b/src/app/subscribe/page.tsx index c8d62d1..14c036c 100644 --- a/src/app/subscribe/page.tsx +++ b/src/app/subscribe/page.tsx @@ -1,7 +1,9 @@ export default function Page() { return (
    -

    Subscribe

    +

    + Subscribe +

    We currently do not have the technical support to implement mailing lists in eeXiv. Check back later for updates. The best way to stay From 9445a624ad7811f1969c7433e2d7eb636a6f00d6 Mon Sep 17 00:00:00 2001 From: Team 1280 Programming Laptop <59985235+Team1280Programming@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:38:54 -0800 Subject: [PATCH 02/50] Add document version chooser --- .../document/view/[slug]/DocumentViewer.tsx | 33 +++------- .../document/view/[slug]/VersionChooser.tsx | 62 +++++++++++++++++++ src/app/globals.css | 5 ++ 3 files changed, 77 insertions(+), 23 deletions(-) create mode 100644 src/app/document/view/[slug]/VersionChooser.tsx diff --git a/src/app/document/view/[slug]/DocumentViewer.tsx b/src/app/document/view/[slug]/DocumentViewer.tsx index 4ecb327..e79fea9 100644 --- a/src/app/document/view/[slug]/DocumentViewer.tsx +++ b/src/app/document/view/[slug]/DocumentViewer.tsx @@ -1,4 +1,4 @@ -import { DocumentType, documents } from '@/app/db/data' +import { documents } from '@/app/db/data' import { Zilla_Slab } from 'next/font/google' import { epoch2datestring } from '@/app/utils/epoch2datestring' import { @@ -11,11 +11,14 @@ import { import { ItemBadge, Status } from '@/app/components/Badges' import Link from 'next/link' import { notFound } from 'next/navigation' +import VersionChooser from './VersionChooser' const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] }) -export default function DocumentViewer({ slug }: Readonly<{ slug: string }>) { - const { manifest, abstract, file, citation } = documents[slug] +const DocumentViewer = ({ slug }: Readonly<{ slug: string }>) => { + const doc = documents[slug] + const { manifest, abstract, file, citation } = doc + if (!manifest) return notFound() const { title, @@ -51,7 +54,7 @@ export default function DocumentViewer({ slug }: Readonly<{ slug: string }>) {

    - + Revision {latest} @@ -78,25 +81,9 @@ export default function DocumentViewer({ slug }: Readonly<{ slug: string }>) { Cite as: {citation ? <>{citation} : <>eeXiv:{slug}}

    - - - +
    ) } + +export default DocumentViewer diff --git a/src/app/document/view/[slug]/VersionChooser.tsx b/src/app/document/view/[slug]/VersionChooser.tsx new file mode 100644 index 0000000..918e1ee --- /dev/null +++ b/src/app/document/view/[slug]/VersionChooser.tsx @@ -0,0 +1,62 @@ +'use client' +import { useState } from 'react' +import { Document } from '@/app/db/data' +import Link from 'next/link' + +const VersionChooser = ({ + doc, + slug, +}: Readonly<{ doc: Document; slug: string }>) => { + const { file } = doc + const { + title, + authors, + topics, + dates, + references, + code, + type, + latest, + reviewers, + status, + } = doc.manifest + + const fileEnding = file === 'other' ? '' : `.${file}` + const [selectedRevision, setSelectedRevision] = useState(latest) // Initialize the selected revision with the latest revision + + return ( +
    + + + + +
    + ) +} + +export default VersionChooser diff --git a/src/app/globals.css b/src/app/globals.css index 678f2a8..3e7e485 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -20,6 +20,11 @@ a:hover { text-decoration: underline; } +option { + @apply font-sans; + @apply p-4; +} + .button-default { @apply bg-blue-600 text-slate-100 hover:bg-blue-400 font-semibold rounded py-2 px-4 my-2 shadow-sm shadow-slate-400; } From 5a34452f790af2d03c5041172288d5d008736943 Mon Sep 17 00:00:00 2001 From: Team 1280 Programming Laptop <59985235+Team1280Programming@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:41:04 -0800 Subject: [PATCH 03/50] Create style.yml --- .github/workflows/style.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/style.yml diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml new file mode 100644 index 0000000..99a11c7 --- /dev/null +++ b/.github/workflows/style.yml @@ -0,0 +1,23 @@ +name: npm run format + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the + # added or changed files to the repository. + contents: write + + steps: + - uses: actions/checkout@v4 + - uses: stefanzweifel/git-auto-commit-action@v5 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: '20.x' + - run: npm install + - run: npm run format From fa09181e94e3a96c8972500ce7c2a2a58fbd0539 Mon Sep 17 00:00:00 2001 From: Team 1280 Programming Laptop <59985235+Team1280Programming@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:41:59 -0800 Subject: [PATCH 04/50] Update style.yml --- .github/workflows/style.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 99a11c7..7aa6930 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -3,7 +3,7 @@ name: npm run format on: [push] jobs: - build: + style: runs-on: ubuntu-latest From 9fe487eb3c7d2d263417bb5452de1bdd6ed785ec Mon Sep 17 00:00:00 2001 From: Team 1280 Programming Laptop <59985235+Team1280Programming@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:42:28 -0800 Subject: [PATCH 05/50] Add style commit message --- .github/workflows/style.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 7aa6930..f055c56 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -15,6 +15,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "style: format" - name: Use Node.js uses: actions/setup-node@v3 with: From 4bbd31bcd316f050e00e711736e60f79f7d2dc89 Mon Sep 17 00:00:00 2001 From: Team 1280 Programming Laptop <59985235+Team1280Programming@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:43:47 -0800 Subject: [PATCH 06/50] Clean up document page additions --- src/app/document/page.tsx | 8 -------- src/app/document/view/[slug]/DocumentViewer.tsx | 3 +-- src/app/document/view/[slug]/VersionChooser.tsx | 9 --------- 3 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 src/app/document/page.tsx diff --git a/src/app/document/page.tsx b/src/app/document/page.tsx deleted file mode 100644 index 0b7b6ad..0000000 --- a/src/app/document/page.tsx +++ /dev/null @@ -1,8 +0,0 @@ -export default function Page() { - return ( -

    - This is a placeholder for a document browser that will be implemented in - the future. In the meantime, you can view specific documents by searching. -

    - ) -} diff --git a/src/app/document/view/[slug]/DocumentViewer.tsx b/src/app/document/view/[slug]/DocumentViewer.tsx index e79fea9..0532e37 100644 --- a/src/app/document/view/[slug]/DocumentViewer.tsx +++ b/src/app/document/view/[slug]/DocumentViewer.tsx @@ -9,7 +9,6 @@ import { Reviewers, } from '@/app/components/DataDisplay' import { ItemBadge, Status } from '@/app/components/Badges' -import Link from 'next/link' import { notFound } from 'next/navigation' import VersionChooser from './VersionChooser' @@ -17,7 +16,7 @@ const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] }) const DocumentViewer = ({ slug }: Readonly<{ slug: string }>) => { const doc = documents[slug] - const { manifest, abstract, file, citation } = doc + const { manifest, abstract, citation } = doc if (!manifest) return notFound() const { diff --git a/src/app/document/view/[slug]/VersionChooser.tsx b/src/app/document/view/[slug]/VersionChooser.tsx index 918e1ee..55f3027 100644 --- a/src/app/document/view/[slug]/VersionChooser.tsx +++ b/src/app/document/view/[slug]/VersionChooser.tsx @@ -9,16 +9,7 @@ const VersionChooser = ({ }: Readonly<{ doc: Document; slug: string }>) => { const { file } = doc const { - title, - authors, - topics, - dates, - references, - code, - type, latest, - reviewers, - status, } = doc.manifest const fileEnding = file === 'other' ? '' : `.${file}` From 81b3e029264816260da9e126f03fefdb0b0cfeb8 Mon Sep 17 00:00:00 2001 From: Team 1280 Programming Laptop <59985235+Team1280Programming@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:45:38 -0800 Subject: [PATCH 07/50] Fix autocommit in style workflow --- .github/workflows/style.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index f055c56..934596c 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -1,6 +1,6 @@ name: npm run format -on: [push] +on: [push, manual_dispatch] jobs: style: @@ -14,12 +14,14 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: "style: format" + - name: Use Node.js uses: actions/setup-node@v3 with: node-version: '20.x' - run: npm install - run: npm run format + + - uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "style: format" From 6039e8fbdc3cd119dbbdddad2d8dbde13bfe3e4e Mon Sep 17 00:00:00 2001 From: Team 1280 Programming Laptop <59985235+Team1280Programming@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:46:28 -0800 Subject: [PATCH 08/50] Fix manual dispatch name in workflow --- .github/workflows/style.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 934596c..777a915 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -1,6 +1,6 @@ name: npm run format -on: [push, manual_dispatch] +on: [push, workflow_dispatch] jobs: style: From 4a5649a83297aa5e2ff58fda9169339b74c921e0 Mon Sep 17 00:00:00 2001 From: Team 1280 Programming Laptop <59985235+Team1280Programming@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:48:05 -0800 Subject: [PATCH 09/50] Give style workflow permission to update workflows --- .github/workflows/style.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 777a915..475b4b1 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -11,6 +11,7 @@ jobs: # Give the default GITHUB_TOKEN write permission to commit and push the # added or changed files to the repository. contents: write + workflows: write steps: - uses: actions/checkout@v4 From 63d34e475a273489369a1f67132ade495fa9c5db Mon Sep 17 00:00:00 2001 From: Team 1280 Programming Laptop <59985235+Team1280Programming@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:48:50 -0800 Subject: [PATCH 10/50] YAML issue? --- .github/workflows/style.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 475b4b1..7c19a86 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -10,8 +10,8 @@ jobs: permissions: # Give the default GITHUB_TOKEN write permission to commit and push the # added or changed files to the repository. - contents: write - workflows: write + - contents: write + - workflows: write steps: - uses: actions/checkout@v4 From 929908d6e32de7e6593ea92108512e8ff4578c51 Mon Sep 17 00:00:00 2001 From: Team 1280 Programming Laptop <59985235+Team1280Programming@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:49:59 -0800 Subject: [PATCH 11/50] I give up --- .github/workflows/style.yml | 3 +-- .prettierrc | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 7c19a86..777a915 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -10,8 +10,7 @@ jobs: permissions: # Give the default GITHUB_TOKEN write permission to commit and push the # added or changed files to the repository. - - contents: write - - workflows: write + contents: write steps: - uses: actions/checkout@v4 diff --git a/.prettierrc b/.prettierrc index c5b38cc..6dae609 100644 --- a/.prettierrc +++ b/.prettierrc @@ -8,5 +8,6 @@ "jsxSingleQuote": true, "bracketSpacing": true, "jsxBracketSameLine": false, - "arrowParens": "always" + "arrowParens": "always", + "disableLanguages": ["yaml"] } From a388035ce7fc0b8fb518557dfdc87d1d6e510295 Mon Sep 17 00:00:00 2001 From: Team 1280 Programming Laptop <59985235+Team1280Programming@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:52:16 -0800 Subject: [PATCH 12/50] Don't trust Codeium But I trusted Codeium again --- .prettierignore | 1 + .prettierrc | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..1cda54b --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +*.yml diff --git a/.prettierrc b/.prettierrc index 6dae609..c5b38cc 100644 --- a/.prettierrc +++ b/.prettierrc @@ -8,6 +8,5 @@ "jsxSingleQuote": true, "bracketSpacing": true, "jsxBracketSameLine": false, - "arrowParens": "always", - "disableLanguages": ["yaml"] + "arrowParens": "always" } From aef3211beebd2b58f100641aab64a92b380a986a Mon Sep 17 00:00:00 2001 From: Team1280Programming Date: Thu, 15 Feb 2024 00:52:47 +0000 Subject: [PATCH 13/50] style: format --- src/app/document/view/[slug]/VersionChooser.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/document/view/[slug]/VersionChooser.tsx b/src/app/document/view/[slug]/VersionChooser.tsx index 55f3027..ef2b62e 100644 --- a/src/app/document/view/[slug]/VersionChooser.tsx +++ b/src/app/document/view/[slug]/VersionChooser.tsx @@ -8,9 +8,7 @@ const VersionChooser = ({ slug, }: Readonly<{ doc: Document; slug: string }>) => { const { file } = doc - const { - latest, - } = doc.manifest + const { latest } = doc.manifest const fileEnding = file === 'other' ? '' : `.${file}` const [selectedRevision, setSelectedRevision] = useState(latest) // Initialize the selected revision with the latest revision @@ -36,7 +34,9 @@ const VersionChooser = ({ { setSelectedRevision(parseInt(e.target.value.replace(/\D/g, ''), 10)) diff --git a/src/app/utils/epoch2datestring.ts b/src/app/utils/epoch2datestring.ts index f595cff..e93b144 100644 --- a/src/app/utils/epoch2datestring.ts +++ b/src/app/utils/epoch2datestring.ts @@ -11,3 +11,7 @@ export function epoch2datestring(epoch: number): string { return formattedDate } + +export function epoch2date(epoch: number): Date { + return new Date(epoch * 1000) +} From c3473f135aec6d39a5aee50842ac99daa63f449f Mon Sep 17 00:00:00 2001 From: Team1280Programming Date: Thu, 15 Feb 2024 02:11:36 +0000 Subject: [PATCH 17/50] style: format --- src/app/db/data.ts | 2 +- src/app/document/view/[slug]/VersionChooser.tsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/db/data.ts b/src/app/db/data.ts index 6e4d5db..a7270dd 100644 --- a/src/app/db/data.ts +++ b/src/app/db/data.ts @@ -20,7 +20,7 @@ export type DocumentStatus = | 'under review' | 'reviewed' | 'published no review' - + export interface Document { manifest: DocumentManifest abstract: string diff --git a/src/app/document/view/[slug]/VersionChooser.tsx b/src/app/document/view/[slug]/VersionChooser.tsx index 9172621..e9c7757 100644 --- a/src/app/document/view/[slug]/VersionChooser.tsx +++ b/src/app/document/view/[slug]/VersionChooser.tsx @@ -50,14 +50,14 @@ const VersionChooser = ({ className='ml-2 h-10 px-2.5 bg-slate-300 rounded-md' onClick={() => { const bibtex = `@article{ - author={${ - authors.map((a: string, i) => { + author={${authors + .map((a: string, i) => { const author = authorList[a].name.first + ' ' + authorList[a].name.last if (i === 0) return author else if (i === authors.length - 1) return ` and ${author}` else return `, ${author}` - }).join('') - }}, + }) + .join('')}}, title={${doc.manifest.title}}, journal={eeXiv journal}, year={${date.getFullYear()}}, From 7e5649c648a74cb5472d514112b28dbf1224d3f3 Mon Sep 17 00:00:00 2001 From: Team 1280 Programming Laptop <59985235+Team1280Programming@users.noreply.github.com> Date: Wed, 14 Feb 2024 18:42:48 -0800 Subject: [PATCH 18/50] in the middle of fixing --- src/app/db/loaders.ts | 2 +- src/app/db/workers/authorLoader.worker.ts | 19 +++++++++++++++---- .../document/view/[slug]/VersionChooser.tsx | 10 ++++++---- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/app/db/loaders.ts b/src/app/db/loaders.ts index 7f5ecea..563e4ea 100644 --- a/src/app/db/loaders.ts +++ b/src/app/db/loaders.ts @@ -88,7 +88,7 @@ export const loadAllAuthors = (): Promise<{ [key: string]: Author }> => { }) } -export const loadAuthor = (id: string): Promise => { +export const loadAuthors = (authorIds: string[]): Promise => { return new Promise((resolve, reject) => { if (typeof Worker !== 'undefined') { const worker = new Worker( diff --git a/src/app/db/workers/authorLoader.worker.ts b/src/app/db/workers/authorLoader.worker.ts index 4ec63fe..99fd243 100644 --- a/src/app/db/workers/authorLoader.worker.ts +++ b/src/app/db/workers/authorLoader.worker.ts @@ -1,7 +1,18 @@ -import { authors } from '../data' +import { authors, Author } from '../data' + +const checkIsStringArray = (data: unknown): data is string[] => { + if (Array.isArray(data)) { + return data.every((d) => typeof d === 'string') + } + return false +} onmessage = (e) => { - if (e.data === 'LOAD') { - self.postMessage(authors) - } + let authorIds: string[] = [] + let authors = [] + checkIsStringArray(e.data) && (authorIds = e.data as string[]) + + authorIds.forEach(id => { + + }) } diff --git a/src/app/document/view/[slug]/VersionChooser.tsx b/src/app/document/view/[slug]/VersionChooser.tsx index e9c7757..70f532e 100644 --- a/src/app/document/view/[slug]/VersionChooser.tsx +++ b/src/app/document/view/[slug]/VersionChooser.tsx @@ -1,5 +1,5 @@ 'use client' -import { useState } from 'react' +import { useState, useEffect } from 'react' import { Document } from '@/app/db/data' import Link from 'next/link' import { loadAllAuthors } from '@/app/db/loaders' @@ -18,8 +18,10 @@ const VersionChooser = ({ }, }) if (error) throw error - - let authorList = data + + useEffect(() => { + console.log(data) + }, [data]) const { file } = doc const { authors, latest } = doc.manifest @@ -52,7 +54,7 @@ const VersionChooser = ({ const bibtex = `@article{ author={${authors .map((a: string, i) => { - const author = authorList[a].name.first + ' ' + authorList[a].name.last + const author = data[a].name.first + ' ' + data[a].name.last if (i === 0) return author else if (i === authors.length - 1) return ` and ${author}` else return `, ${author}` From 3be854f5216602f973880a055d28284e3530fa77 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Wed, 14 Feb 2024 18:43:17 -0800 Subject: [PATCH 19/50] temp --- src/app/topic/[slug]/page.tsx | 6 +++++- src/app/utils/string2hex.ts | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 src/app/utils/string2hex.ts diff --git a/src/app/topic/[slug]/page.tsx b/src/app/topic/[slug]/page.tsx index 5cf7449..60567c6 100644 --- a/src/app/topic/[slug]/page.tsx +++ b/src/app/topic/[slug]/page.tsx @@ -1,6 +1,7 @@ import { Zilla_Slab } from 'next/font/google' import { topics } from '@/app/db/data' import { notFound } from 'next/navigation' +import string2hex from '@/app/utils/string2hex' const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] }) @@ -17,7 +18,10 @@ export default function Page({ const { name, description, wiki } = topic return ( -
    +

    {name}

    {description}

    diff --git a/src/app/utils/string2hex.ts b/src/app/utils/string2hex.ts new file mode 100644 index 0000000..f722262 --- /dev/null +++ b/src/app/utils/string2hex.ts @@ -0,0 +1,22 @@ +export default function string2hex(str: string): string { + // Hash function to convert string to a number + let hash = 0 + for (let i = 0; i < str.length; i++) { + const char = str.charCodeAt(i) + hash = (hash << 5) - hash + char + hash = hash & hash // Convert to 32bit integer + } + + // Convert the hash to a hex color code + let color = '#' + for (let i = 0; i < 3; i++) { + // Ensuring minimum brightness for each component to make text stand out + // Adjust the minimum brightness as needed (e.g., 0x80 for brighter colors) + const minBrightness = 0x80 + const value = + (((hash >> (i * 8)) & 0xff) % (0xff - minBrightness)) + minBrightness + color += ('00' + value.toString(16)).substr(-2) + } + + return color +} From 7375ab3d0aa1ab2e99c9a5507de2bef9a4e6e14c Mon Sep 17 00:00:00 2001 From: Team1280Programming Date: Thu, 15 Feb 2024 02:43:29 +0000 Subject: [PATCH 20/50] style: format --- src/app/db/workers/authorLoader.worker.ts | 4 +--- src/app/document/view/[slug]/VersionChooser.tsx | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/db/workers/authorLoader.worker.ts b/src/app/db/workers/authorLoader.worker.ts index 99fd243..7753a68 100644 --- a/src/app/db/workers/authorLoader.worker.ts +++ b/src/app/db/workers/authorLoader.worker.ts @@ -12,7 +12,5 @@ onmessage = (e) => { let authors = [] checkIsStringArray(e.data) && (authorIds = e.data as string[]) - authorIds.forEach(id => { - - }) + authorIds.forEach((id) => {}) } diff --git a/src/app/document/view/[slug]/VersionChooser.tsx b/src/app/document/view/[slug]/VersionChooser.tsx index 70f532e..f2d92fe 100644 --- a/src/app/document/view/[slug]/VersionChooser.tsx +++ b/src/app/document/view/[slug]/VersionChooser.tsx @@ -18,7 +18,7 @@ const VersionChooser = ({ }, }) if (error) throw error - + useEffect(() => { console.log(data) }, [data]) From d894dfb2e0242a3f3c0c7a2c384197c937e0064c Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Wed, 14 Feb 2024 19:22:48 -0800 Subject: [PATCH 21/50] fix EVERYTHING --- src/app/db/loaders.ts | 14 ++++----- src/app/db/workers/authorLoader.worker.ts | 20 +++++++++--- .../document/view/[slug]/DocumentViewer.tsx | 14 ++++++++- .../document/view/[slug]/VersionChooser.tsx | 6 ++-- .../document/view/[slug]/loading.module.css | 31 +++++++++++++++++++ 5 files changed, 70 insertions(+), 15 deletions(-) create mode 100644 src/app/document/view/[slug]/loading.module.css diff --git a/src/app/db/loaders.ts b/src/app/db/loaders.ts index 563e4ea..759c783 100644 --- a/src/app/db/loaders.ts +++ b/src/app/db/loaders.ts @@ -88,7 +88,9 @@ export const loadAllAuthors = (): Promise<{ [key: string]: Author }> => { }) } -export const loadAuthors = (authorIds: string[]): Promise => { +export const loadAuthors = ( + authorIds: string[] +): Promise<{ [key: string]: Author }> => { return new Promise((resolve, reject) => { if (typeof Worker !== 'undefined') { const worker = new Worker( @@ -97,12 +99,10 @@ export const loadAuthors = (authorIds: string[]): Promise => { ) worker.onmessage = (e: MessageEvent<{ [key: string]: Author }>) => { - const data = e.data - const author: Author | undefined = data[id] - if (!author) { - return reject(new Error('404')) + if (typeof e.data === 'object' && Object.keys(e.data).length > 0) { + resolve(e.data) } else { - resolve(author) + reject(new Error('404')) } worker.terminate() } @@ -112,7 +112,7 @@ export const loadAuthors = (authorIds: string[]): Promise => { worker.terminate() } - worker.postMessage('LOAD') + worker.postMessage(authorIds) } else { reject( new Error( diff --git a/src/app/db/workers/authorLoader.worker.ts b/src/app/db/workers/authorLoader.worker.ts index 99fd243..0509ee4 100644 --- a/src/app/db/workers/authorLoader.worker.ts +++ b/src/app/db/workers/authorLoader.worker.ts @@ -1,5 +1,19 @@ import { authors, Author } from '../data' +export function getAuthorsById(authorIds: string[]): { [key: string]: Author } { + const result: { [key: string]: Author } = {} + + // Iterate through the array of author IDs + for (const id of authorIds) { + const author = authors[id] // Retrieve the author entry by ID + if (author) { + result[id] = author // If the author exists, add it to the result object + } + } + + return result +} + const checkIsStringArray = (data: unknown): data is string[] => { if (Array.isArray(data)) { return data.every((d) => typeof d === 'string') @@ -9,10 +23,8 @@ const checkIsStringArray = (data: unknown): data is string[] => { onmessage = (e) => { let authorIds: string[] = [] - let authors = [] checkIsStringArray(e.data) && (authorIds = e.data as string[]) + let results = getAuthorsById(authorIds) - authorIds.forEach(id => { - - }) + postMessage(results) } diff --git a/src/app/document/view/[slug]/DocumentViewer.tsx b/src/app/document/view/[slug]/DocumentViewer.tsx index 6066257..e2a1eae 100644 --- a/src/app/document/view/[slug]/DocumentViewer.tsx +++ b/src/app/document/view/[slug]/DocumentViewer.tsx @@ -12,6 +12,8 @@ import { ItemBadge, Status } from '@/app/components/Badges' import { notFound } from 'next/navigation' import VersionChooser from './VersionChooser' import crypto from 'crypto' +import loadingStyles from './loading.module.css' +import { Suspense } from 'react' const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] }) @@ -88,7 +90,17 @@ const DocumentViewer = ({ slug }: Readonly<{ slug: string }>) => { Cite as: {citation ? <>{citation} : <>eeXiv:{hash}}

    - + +
    +
    +
    +
    + } + > + +
    ) } diff --git a/src/app/document/view/[slug]/VersionChooser.tsx b/src/app/document/view/[slug]/VersionChooser.tsx index 70f532e..e40e7cc 100644 --- a/src/app/document/view/[slug]/VersionChooser.tsx +++ b/src/app/document/view/[slug]/VersionChooser.tsx @@ -2,7 +2,7 @@ import { useState, useEffect } from 'react' import { Document } from '@/app/db/data' import Link from 'next/link' -import { loadAllAuthors } from '@/app/db/loaders' +import { loadAuthors } from '@/app/db/loaders' import { useSuspenseQuery } from '@tanstack/react-query' import { epoch2date } from '@/app/utils/epoch2datestring' @@ -13,12 +13,12 @@ const VersionChooser = ({ const { data, error } = useSuspenseQuery({ queryKey: ['authors_all'], queryFn: () => { - const data = loadAllAuthors() + const data = loadAuthors(doc.manifest.authors) return data }, }) if (error) throw error - + useEffect(() => { console.log(data) }, [data]) diff --git a/src/app/document/view/[slug]/loading.module.css b/src/app/document/view/[slug]/loading.module.css new file mode 100644 index 0000000..34cf148 --- /dev/null +++ b/src/app/document/view/[slug]/loading.module.css @@ -0,0 +1,31 @@ +.skeleton-box { + display: inline-block; + height: 1em; + position: relative; + overflow: hidden; + background-color: #dddbdd; + + &::after { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + transform: translateX(-100%); + background-image: linear-gradient( + 90deg, + rgba(#fff, 0) 0, + rgba(#fff, 0.2) 20%, + rgba(#fff, 0.5) 60%, + rgba(#fff, 0) + ); + animation: shimmer 5s infinite; + content: ''; + } + + @keyframes shimmer { + 100% { + transform: translateX(100%); + } + } +} From 1dbc8de1077353e6a5a80762d935322cc88d6e27 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Wed, 14 Feb 2024 19:59:43 -0800 Subject: [PATCH 22/50] fix EVERYTHING for REAL --- src/app/db/loaders.ts | 1 + .../document/view/[slug]/DocumentViewer.tsx | 18 ++++++++++++++---- .../document/view/[slug]/VersionChooser.tsx | 6 +----- src/app/document/view/[slug]/page.tsx | 17 +++++++++++------ 4 files changed, 27 insertions(+), 15 deletions(-) diff --git a/src/app/db/loaders.ts b/src/app/db/loaders.ts index 759c783..4e40eec 100644 --- a/src/app/db/loaders.ts +++ b/src/app/db/loaders.ts @@ -91,6 +91,7 @@ export const loadAllAuthors = (): Promise<{ [key: string]: Author }> => { export const loadAuthors = ( authorIds: string[] ): Promise<{ [key: string]: Author }> => { + 'use client' return new Promise((resolve, reject) => { if (typeof Worker !== 'undefined') { const worker = new Worker( diff --git a/src/app/document/view/[slug]/DocumentViewer.tsx b/src/app/document/view/[slug]/DocumentViewer.tsx index e2a1eae..6cc1e09 100644 --- a/src/app/document/view/[slug]/DocumentViewer.tsx +++ b/src/app/document/view/[slug]/DocumentViewer.tsx @@ -1,4 +1,4 @@ -import { documents } from '@/app/db/data' +'use client' import { Zilla_Slab } from 'next/font/google' import { epoch2datestring } from '@/app/utils/epoch2datestring' import { @@ -12,16 +12,26 @@ import { ItemBadge, Status } from '@/app/components/Badges' import { notFound } from 'next/navigation' import VersionChooser from './VersionChooser' import crypto from 'crypto' -import loadingStyles from './loading.module.css' import { Suspense } from 'react' +import { loadDocument } from '@/app/db/loaders' +import { useSuspenseQuery } from '@tanstack/react-query' const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] }) const DocumentViewer = ({ slug }: Readonly<{ slug: string }>) => { - const doc = documents[slug] + const { data, error } = useSuspenseQuery({ + queryKey: [slug], + queryFn: () => { + const data = loadDocument(slug) + return data + }, + }) + if (error) throw error + let doc = data + // const doc = documents[slug] const { manifest, abstract, citation } = doc - if (!manifest) return notFound() + // if (!manifest) return notFound() const { title, authors, diff --git a/src/app/document/view/[slug]/VersionChooser.tsx b/src/app/document/view/[slug]/VersionChooser.tsx index e40e7cc..95d23be 100644 --- a/src/app/document/view/[slug]/VersionChooser.tsx +++ b/src/app/document/view/[slug]/VersionChooser.tsx @@ -1,5 +1,5 @@ 'use client' -import { useState, useEffect } from 'react' +import { useState } from 'react' import { Document } from '@/app/db/data' import Link from 'next/link' import { loadAuthors } from '@/app/db/loaders' @@ -19,10 +19,6 @@ const VersionChooser = ({ }) if (error) throw error - useEffect(() => { - console.log(data) - }, [data]) - const { file } = doc const { authors, latest } = doc.manifest const date = epoch2date(doc.manifest.dates[doc.manifest.dates.length - 1]) diff --git a/src/app/document/view/[slug]/page.tsx b/src/app/document/view/[slug]/page.tsx index 6905223..2307200 100644 --- a/src/app/document/view/[slug]/page.tsx +++ b/src/app/document/view/[slug]/page.tsx @@ -1,13 +1,18 @@ +'use client' import DocumentViewer from './DocumentViewer' -import { documents } from '@/app/db/data' +import ErrorBoundary from '@/app/utils/ErrorBoundary' -export function generateStaticParams() { - const docsList = Object.keys(documents) - return docsList.map((doc) => ({ doc })) -} +// export function generateStaticParams() { +// const docsList = Object.keys(documents) +// return docsList.map((doc) => ({ doc })) +// } export default function Page({ params, }: Readonly<{ params: { slug: string } }>) { - return + return ( + + + + ) } From 9568b4b3f9d009649619db371dbade1b73d494c8 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Thu, 15 Feb 2024 02:43:10 -0800 Subject: [PATCH 23/50] update web worker so its actually efficient --- src/app/db/loaders.ts | 12 +++++++----- src/app/db/workers/documentLoader.worker.ts | 4 +--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/db/loaders.ts b/src/app/db/loaders.ts index 4e40eec..85c5d2c 100644 --- a/src/app/db/loaders.ts +++ b/src/app/db/loaders.ts @@ -8,13 +8,12 @@ export const loadDocument = (id: string): Promise => { { type: 'module' } ) - worker.onmessage = (e: MessageEvent<{ [key: string]: Document }>) => { + worker.onmessage = (e: MessageEvent) => { const data = e.data - const doc: Document | undefined = data[id] - if (!doc) { + if (!data) { return reject(new Error('404')) } else { - resolve(doc) + resolve(data) } worker.terminate() } @@ -24,7 +23,7 @@ export const loadDocument = (id: string): Promise => { worker.terminate() } - worker.postMessage('LOAD') + worker.postMessage(id) } else { reject( new Error( @@ -34,6 +33,9 @@ export const loadDocument = (id: string): Promise => { } }) } +/** + * @deprecated This function doesn't improve efficiency and shouldn't be used + */ export const loadAllDocuments = (): Promise<{ [key: string]: Document }> => { return new Promise((resolve, reject) => { if (typeof Worker !== 'undefined') { diff --git a/src/app/db/workers/documentLoader.worker.ts b/src/app/db/workers/documentLoader.worker.ts index b263e79..1ea6e60 100644 --- a/src/app/db/workers/documentLoader.worker.ts +++ b/src/app/db/workers/documentLoader.worker.ts @@ -1,7 +1,5 @@ import { documents } from '../data' onmessage = (e) => { - if (e.data === 'LOAD') { - self.postMessage(documents) - } + typeof e.data === 'string' && postMessage(documents[e.data]) } From 5c3ca12554a696c87b91725b56c979d2f8a7b84e Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Thu, 15 Feb 2024 03:14:44 -0800 Subject: [PATCH 24/50] wrap hyperlink in topic page --- src/app/topic/[slug]/page.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/topic/[slug]/page.tsx b/src/app/topic/[slug]/page.tsx index 60567c6..48a6b93 100644 --- a/src/app/topic/[slug]/page.tsx +++ b/src/app/topic/[slug]/page.tsx @@ -26,7 +26,9 @@ export default function Page({

    {description}

    Read more at:{' '} - {wiki} + + {wiki} +

    ) From 0b7fcbd4e24a9649db37c7c94b5833d469cef16e Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Thu, 15 Feb 2024 03:37:04 -0800 Subject: [PATCH 25/50] add mirrors --- src/app/components/News.tsx | 1 + src/app/page.tsx | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/components/News.tsx b/src/app/components/News.tsx index 135fa76..2aff834 100644 --- a/src/app/components/News.tsx +++ b/src/app/components/News.tsx @@ -31,6 +31,7 @@ export default function News() { ISO 26324 DOI registry! diff --git a/src/app/page.tsx b/src/app/page.tsx index 480b3ad..5fe0774 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -77,7 +77,10 @@ export default function Home() { FIRST Robotics Competition (FRC) . Materials on this site may be published independently through other - channels. Read more about us here. + channels. Read more about us here. eeXiv can + be accessed at its primary domain at{' '} + eexiv.org or at our mirror at{' '} + eexiv.vercel.app

    From 19b4da3d42282153b59c1de7c7cbefece0afc7ef Mon Sep 17 00:00:00 2001 From: Youwen Wu <38934577+couscousdude@users.noreply.github.com> Date: Thu, 15 Feb 2024 03:52:34 -0800 Subject: [PATCH 26/50] Update VersionChooser.tsx --- src/app/document/view/[slug]/VersionChooser.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/document/view/[slug]/VersionChooser.tsx b/src/app/document/view/[slug]/VersionChooser.tsx index 95d23be..63018c1 100644 --- a/src/app/document/view/[slug]/VersionChooser.tsx +++ b/src/app/document/view/[slug]/VersionChooser.tsx @@ -11,7 +11,7 @@ const VersionChooser = ({ slug, }: Readonly<{ doc: Document; slug: string }>) => { const { data, error } = useSuspenseQuery({ - queryKey: ['authors_all'], + queryKey: [doc.manifest.authors.join(' ')], queryFn: () => { const data = loadAuthors(doc.manifest.authors) return data From b531ec40dcce435c4e7245b797823cdae1faa30e Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Thu, 15 Feb 2024 10:32:55 -0800 Subject: [PATCH 27/50] add toast and bgraham --- src/app/db/data.ts | 9 ++++ .../document/view/[slug]/VersionChooser.tsx | 42 +++++++++++-------- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/src/app/db/data.ts b/src/app/db/data.ts index 73848b6..66834f1 100644 --- a/src/app/db/data.ts +++ b/src/app/db/data.ts @@ -508,6 +508,15 @@ export const authors: Readonly<{ [key: string]: Author }> = { image: '/img/profiles/cbordalo.jpg', nationality: ['phl', 'usa'], }, + bgraham: { + name: { + first: 'Benjamin', + last: 'Graham', + }, + affiliation: ['Student@srvhs'], + image: '/img/profiles/bgraham.jpg', + nationality: ['usa'], + }, } export interface Affiliation { diff --git a/src/app/document/view/[slug]/VersionChooser.tsx b/src/app/document/view/[slug]/VersionChooser.tsx index 63018c1..26d4334 100644 --- a/src/app/document/view/[slug]/VersionChooser.tsx +++ b/src/app/document/view/[slug]/VersionChooser.tsx @@ -5,6 +5,7 @@ import Link from 'next/link' import { loadAuthors } from '@/app/db/loaders' import { useSuspenseQuery } from '@tanstack/react-query' import { epoch2date } from '@/app/utils/epoch2datestring' +import { toast } from 'react-toastify' const VersionChooser = ({ doc, @@ -25,6 +26,28 @@ const VersionChooser = ({ const fileEnding = file === 'other' ? '' : `.${file}` const [selectedRevision, setSelectedRevision] = useState(latest) // Initialize the selected revision with the latest revision + const notifyCopied = () => + toast('BibTeX copied to clipboard!', { type: 'success' }) + + const handleClick = () => { + const bibtex = `@article{ + author={${authors + .map((a: string, i) => { + const author = data[a].name.first + ' ' + data[a].name.last + if (i === 0) return author + else if (i === authors.length - 1) return ` and ${author}` + else return `, ${author}` + }) + .join('')}}, + title={${doc.manifest.title}}, + journal={eeXiv journal}, + year={${date.getFullYear()}}, + month={${date.toLocaleString('default', { month: 'short' })}}, + url={${window.location.href}} +}` + navigator.clipboard.writeText(bibtex) + notifyCopied() + } return (
    @@ -46,24 +69,7 @@ const VersionChooser = ({ From 403457e4e84b942748d1d2ee8e348001fa4e6d7b Mon Sep 17 00:00:00 2001 From: Ananth Venkatesh <46249765+quantum9Innovation@users.noreply.github.com> Date: Thu, 15 Feb 2024 18:42:13 +0000 Subject: [PATCH 28/50] Quality of life improvements --- src/app/document/view/[slug]/VersionChooser.tsx | 6 +++--- src/app/globals.css | 8 ++++++++ src/app/page.tsx | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/app/document/view/[slug]/VersionChooser.tsx b/src/app/document/view/[slug]/VersionChooser.tsx index 26d4334..c065f63 100644 --- a/src/app/document/view/[slug]/VersionChooser.tsx +++ b/src/app/document/view/[slug]/VersionChooser.tsx @@ -50,7 +50,7 @@ const VersionChooser = ({ } return ( -
    +
    Date: Thu, 15 Feb 2024 19:45:46 +0000 Subject: [PATCH 30/50] Revamp author page --- package-lock.json | 36 +++++++++++++++-- package.json | 2 + src/app/author/[author]/AuthorDisplay.tsx | 48 +++++++++++++++++++---- 3 files changed, 74 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 290fbb7..2fa252a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,8 @@ "react": "^18", "react-dom": "^18", "react-icons": "^5.0.1", + "react-konami-code": "^2.3.0", + "react-snowfall": "^2.1.0", "react-toastify": "^10.0.4", "zustand": "^4.5.0" }, @@ -3866,7 +3868,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -4324,7 +4325,6 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -4383,6 +4383,11 @@ "react": "^18.2.0" } }, + "node_modules/react-fast-compare": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz", + "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==" + }, "node_modules/react-icons": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.0.1.tgz", @@ -4394,8 +4399,31 @@ "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "node_modules/react-konami-code": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/react-konami-code/-/react-konami-code-2.3.0.tgz", + "integrity": "sha512-9x90HnzstiMXs2kFS9cYsb5a+ojKEB/iC24uzNKCoE9znorLJwUcy98tjsiW2i5AHB05GuqIMTzV5RaDpVSThw==", + "dependencies": { + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "react": ">= 16.8.0", + "react-dom": ">= 16.8.0" + } + }, + "node_modules/react-snowfall": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/react-snowfall/-/react-snowfall-2.1.0.tgz", + "integrity": "sha512-5nYWmBTJi/rrRRTmE62QLhxSp3sfX9niPP1Ysrd4dkVZLr0fxHTkcqCLQx7BAkclCEq5MWZ7kgIHrqk5Ugq1PA==", + "dependencies": { + "react-fast-compare": "^3.2.2" + }, + "peerDependencies": { + "react": "^16.8 || 17.x || 18.x", + "react-dom": "^16.8 || 17.x || 18.x" + } }, "node_modules/react-toastify": { "version": "10.0.4", diff --git a/package.json b/package.json index 9e210a6..e7ddcd5 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,8 @@ "react": "^18", "react-dom": "^18", "react-icons": "^5.0.1", + "react-konami-code": "^2.3.0", + "react-snowfall": "^2.1.0", "react-toastify": "^10.0.4", "zustand": "^4.5.0" }, diff --git a/src/app/author/[author]/AuthorDisplay.tsx b/src/app/author/[author]/AuthorDisplay.tsx index d1206cf..1492bf0 100644 --- a/src/app/author/[author]/AuthorDisplay.tsx +++ b/src/app/author/[author]/AuthorDisplay.tsx @@ -1,11 +1,14 @@ +'use client' import Link from 'next/link' -import { Fragment } from 'react' +import { Fragment, useState } from 'react' import { affiliations, nationalities, authors } from '../../db/data' import { Zilla_Slab } from 'next/font/google' import { notFound } from 'next/navigation' import DocumentCard from '@/app/components/DocumentCard' import findDocumentsByAuthor from './findDocumentsByAuthor' import cardEffects from '@/app/styles/cardEffects.module.css' +import Konami from 'react-konami-code' +import Snowfall from 'react-snowfall' const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] }) @@ -17,17 +20,47 @@ export default function AuthorDisplay({ notFound() } + const [snowfallActivated, setSnowfallActivated] = useState(false) const { name, affiliation, image, nationality, formerAffiliations } = data const authorsDocuments = findDocumentsByAuthor(author) + const handleKonami = () => { + setSnowfallActivated(!snowfallActivated) + } const MainPosition = () => { const mainAffiliationShort = affiliation[0].split('@')[1] const mainPosition = affiliation[0].split('@')[0] const mainAffiliation = affiliations[mainAffiliationShort] const { website } = data + + const images: HTMLImageElement[] = [] + nationality.forEach(n => { + const { flag } = nationalities[n] + const image = new Image() + image.src = flag + images.push(image) + }) + return ( <> + + {snowfallActivated && + + } {mainPosition} at {mainAffiliation.name} @@ -40,17 +73,17 @@ export default function AuthorDisplay({
    ) : null} -
    +
    {affiliation.map((a: string) => ( {affiliations[a.split('@')[1]].name} ))} @@ -133,8 +166,8 @@ export default function AuthorDisplay({ return ( <> -

    Bio:

    -

    {bio}

    +

    Bio

    +

    {bio}

    ) } @@ -181,9 +214,8 @@ export default function AuthorDisplay({ {authorsDocuments.length > 0 && ( <>
    -

    - Published documents + Published documents {`(${authorsDocuments.length})`}

    {authorsDocuments.map((d) => ( From cb14236f98874c6aefe33fa233dc0da8b67971be Mon Sep 17 00:00:00 2001 From: quantum9Innovation Date: Thu, 15 Feb 2024 19:46:20 +0000 Subject: [PATCH 31/50] style: format --- src/app/author/[author]/AuthorDisplay.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/author/[author]/AuthorDisplay.tsx b/src/app/author/[author]/AuthorDisplay.tsx index 1492bf0..b891b49 100644 --- a/src/app/author/[author]/AuthorDisplay.tsx +++ b/src/app/author/[author]/AuthorDisplay.tsx @@ -35,7 +35,7 @@ export default function AuthorDisplay({ const { website } = data const images: HTMLImageElement[] = [] - nationality.forEach(n => { + nationality.forEach((n) => { const { flag } = nationalities[n] const image = new Image() image.src = flag @@ -45,10 +45,10 @@ export default function AuthorDisplay({ return ( <> - {snowfallActivated && + {snowfallActivated && ( - } + )} {mainPosition} at {mainAffiliation.name} From 935b3b3787fda0c6f18a69ca5c33aa75c707f830 Mon Sep 17 00:00:00 2001 From: Ananth Venkatesh <46249765+quantum9Innovation@users.noreply.github.com> Date: Thu, 15 Feb 2024 19:52:13 +0000 Subject: [PATCH 32/50] Better org pages --- src/app/affiliation/[shortName]/page.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/app/affiliation/[shortName]/page.tsx b/src/app/affiliation/[shortName]/page.tsx index cdf2f84..606328b 100644 --- a/src/app/affiliation/[shortName]/page.tsx +++ b/src/app/affiliation/[shortName]/page.tsx @@ -36,20 +36,22 @@ export default function Page({ return (
    -
    +
    profile picture
    - +
    + {name} -
    {short}
    +
    {short}

    +
    From 6fc7c3d8b73aea2c72b18a2121f6c760dbdafbbb Mon Sep 17 00:00:00 2001 From: quantum9Innovation Date: Thu, 15 Feb 2024 19:52:42 +0000 Subject: [PATCH 33/50] style: format --- src/app/affiliation/[shortName]/page.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/affiliation/[shortName]/page.tsx b/src/app/affiliation/[shortName]/page.tsx index 606328b..5c2cb16 100644 --- a/src/app/affiliation/[shortName]/page.tsx +++ b/src/app/affiliation/[shortName]/page.tsx @@ -44,7 +44,9 @@ export default function Page({ />

    - + {name}
    {short}
    From 453fe177b9412bf8c964697be6f4ec699e9b2790 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Thu, 15 Feb 2024 12:04:32 -0800 Subject: [PATCH 34/50] fix styling --- src/app/author/[author]/AuthorDisplay.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/author/[author]/AuthorDisplay.tsx b/src/app/author/[author]/AuthorDisplay.tsx index b891b49..e11ecb2 100644 --- a/src/app/author/[author]/AuthorDisplay.tsx +++ b/src/app/author/[author]/AuthorDisplay.tsx @@ -213,7 +213,7 @@ export default function AuthorDisplay({ {authorsDocuments.length > 0 && ( <> -
    +

    Published documents {`(${authorsDocuments.length})`}

    From 3523e1152b03e031a78256f5a11157587ed4a6ba Mon Sep 17 00:00:00 2001 From: Ananth Venkatesh <46249765+quantum9Innovation@users.noreply.github.com> Date: Thu, 15 Feb 2024 12:06:06 -0800 Subject: [PATCH 35/50] Add files via upload --- 1707930763972.jpeg | Bin 0 -> 19651 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 1707930763972.jpeg diff --git a/1707930763972.jpeg b/1707930763972.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0b085b64a5c5b5c1e4d738d19b7c35337f348996 GIT binary patch literal 19651 zcmb6AV{|56)V2#>v2EM7la6hhSIkbwwr$%sI<{@2lMXw!cJAkWzP;bS->e$-XN{_{ zY8vkd{M;ORbrrA;ILm(dnnh6S+o+qcdF^5r)Fyvo4N7}S6C)3 zYtVYF63g_U1XcZJzybErkIlJCA4^OU!u$_SMCZ&B3qe16N0p5}Ydzb_KO0^DtIlch zQ1X5))}ti+U#B9;yhDT$Vmf2_mnjXzknpyNZAK+0*|aSXgeVpyoRtex(nQFNR|ZS) zr}X%_fwA4cDS7g%QR%c0g|qRdI8EvQ;#9Om2YVDa;(w}(l48l>7cT2BmuP^kQ*-46 z#(1VJMz)&_@SVaI;$ljxw`Q_e=$>MCQYJ`irmSwP#-+v~iEUdmQiR-rjI0gc&F6KD zDMy+9Q1oEXvQ%{h^Qmac9fwk@%mOpMV0}%2R7l3lM#Ah!VNV+jx9tB#>&g_Eht=xt zsw?lgj|6^z;6*;S5%en?3tO2v?$-}xYu(DsKM3CAQ|#C&O8Tlf51!rrp~M(k2?KV9 z{!k9Von$GZS(Y_ZxWo7>?1(CuRvSohhv-Q(uJ%5*#b^ox%-iNp)q@zmmMwcmWVmxt z>SbX|9EOBM+O}$5fge7L+apxw@u90qo9))HKk92GlOA97RSp;Hlr5)wF8$6#LkyS?Wvg zyL=u^5Qg2$Vukk9vUCKdsfHCDI`-#vMxSR-B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z6H&zm=kq0Ce-qRF`^vTB2Ca|IG?fl6Fy)uCc^uj& zWqyPZC_g)Mi;i(XE2DO7K5)Q-6>jV}ec>Y;8oVGubn%)6lA638Aj^Ru?P;yzZDH;n zesN>L@@vF*@qnZeZLc-=v+pCQfI0_r(SWw&u91pLAi>bh*ETT3Pc7fCsJ;pIy| z8*rMUk3M?A4vtTKla-tf>VZS zdc*58imw5oX%9H8*9VnP<^zb3@ITi#7;5$L{LMlY_t~cefGHfa7^%095{wu--~Rv( zFv2i>ar$umsfWeR4P{Swp5$pVvW26=wNp@W7QgF_0W5in{{Vn}X3zuKi67m@Mc8rhk$|!Qp9+64 zpD1c4j7%HiQ;YuqxYAA)Zgl?uFr8~p2>$@b3&mB4p{=q10Nyeh7XuRnMQdw<9Rl?Q z-}fUXqij4=H6_eZ51t&*mpIgVpNwXx6uxm9G;$^a$t2+iIras-;23j%%s*Y3MYZ6X zGQ4HiH%n_393Ur8b8O@q)V+y^rk8k8!DI4?mnBU5Xr20LxM? z20{>g_xr)I=NcEV;()3E-kLGlC{f_!Il%1!p1$x%?xz>i_5R_HQ$A*Hw4K~Q!i?7N z*7LCV%WEKSyf=d#h(9=&&=%Bm^}&x$hg$?A4CXvm^H}2AWMR?3 z@s8o5PdHaKC&@qVGTjbAbPd4TI8ANco+aStyayb+b{FhZ@Zd-=ebUG5!S}tKoiD#x zX4R^7d}kCeGj<4EhJ)Pj9v_2~0L#HE#d=3KkI_!LoBAhR* z6X$EZr-Tn6srg*GPnF{q$flQEV(5*7kI4it1DrRoihPG8DFWZl00H Date: Thu, 15 Feb 2024 21:13:32 +0000 Subject: [PATCH 36/50] Improve database entries --- .../img/profiles/bgraham.jpg | Bin src/app/db/data.ts | 25 +++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-) rename 1707930763972.jpeg => public/img/profiles/bgraham.jpg (100%) diff --git a/1707930763972.jpeg b/public/img/profiles/bgraham.jpg similarity index 100% rename from 1707930763972.jpeg rename to public/img/profiles/bgraham.jpg diff --git a/src/app/db/data.ts b/src/app/db/data.ts index 66834f1..1f7f0e7 100644 --- a/src/app/db/data.ts +++ b/src/app/db/data.ts @@ -389,7 +389,7 @@ export const authors: Readonly<{ [key: string]: Author }> = { formerAffiliations: ['Programming Lead@1280-programming'], image: '/img/profiles/avenkatesh.png', nationality: ['ind', 'eth', 'usa'], - bio: 'The king of jank.', + bio: 'King of jank. Hacker in JS, TS, R, and Python. Capitalist innovator. EECS creator. eeXiv co-founder.', website: 'https://github.com/quantum9Innovation', }, ywu: { @@ -415,7 +415,7 @@ export const authors: Readonly<{ [key: string]: Author }> = { 'Student@srvhs', ], image: '/img/profiles/wlin.jpg', - nationality: ['twn', 'chn', 'jpn', 'usa'], + nationality: ['twn', 'usa'], formerAffiliations: ['Intern@raid-zero'], bio: 'Hi, I am Kaito or Warren. I am a Self-taught programmer and engineer. I go around doing dumb things such as my projects. I have a dream of building a community. I am currently part of many projects.', website: 'https://kaitotlex.carrd.co/', @@ -515,6 +515,7 @@ export const authors: Readonly<{ [key: string]: Author }> = { }, affiliation: ['Student@srvhs'], image: '/img/profiles/bgraham.jpg', + bio: 'Unrelated to Ben Garrison. Maintains a Signal profile. Most likely to become President of the United States.', nationality: ['usa'], }, } @@ -528,7 +529,7 @@ export interface Affiliation { export const affiliations: Readonly<{ [key: string]: Affiliation }> = { '1280-mech': { - name: "Team 1280, the Ragin' C Biscuits, Mechanical Subteam", + name: "Team 1280, the Ragin' C-Biscuits, Mechanical Subteam", short: '1280 Mech', image: '/img/logos/1280-main.png', description: `The mechanical subteam is the backbone of Team 1280, focusing on the physical design, construction, and mechanical integrity of their robots. This subteam is where concepts and designs become tangible, transforming ideas into the moving parts and structural components that give the robots their form and function. The Mechanical subteam's work encompasses a broad range of activities, from drafting initial sketches and CAD modeling to machining parts and assembling complex mechanical systems. @@ -540,7 +541,7 @@ Collaboration is key within the Mechanical subteam, as its members must coordina The Mechanical subteam fosters a culture of creativity, innovation, and excellence, encouraging its members to push the boundaries of what is possible. Through their participation in the FIRST Robotics Competition, students develop not only technical skills in mechanical design and engineering but also soft skills such as teamwork, problem-solving, and project management. With access to advanced tools and guided by mentors from various engineering fields, the Mechanical subteam of Team 1280 is a place where future mechanical engineers are nurtured, ready to make their mark in the world of robotics and beyond.`, }, '1280-eecs': { - name: "Team 1280, the Ragin' C Biscuits, Electrical Engineering and Computer Science Subteam", + name: "Team 1280, the Ragin' C-Biscuits, Electrical Engineering and Computer Science Subteam", short: '1280 EECS', image: '/img/logos/eecs-wordmark.png', description: `The Team 1280 EECS (Electrical Engineering and Computer Science) subteam is an autonomous organization within Team 1280, specializing in the design, programming, and electrical systems that bring their robots to life. As the nerve center of Team 1280, the EECS subteam combines the disciplines of electrical engineering and computer science to develop sophisticated control systems, autonomous functionalities, and robust electrical infrastructures that enable their robots to perform complex tasks and maneuvers in the competitive arena. @@ -550,10 +551,10 @@ Team 1280 EECS is composed of highly skilled and passionate students who are kee Team 1280 EECS benefits from mentorship by experienced professionals and alumni, access to state-of-the-art tools and technologies, and a culture that encourages creativity, experimentation, and continuous improvement. As a result, the EECS subteam plays a crucial role in driving Team 1280's success in competitions and inspiring the next generation of engineers and computer scientists.`, }, '1280-programming': { - name: "Team 1280, the Ragin' C Biscuits, Programming Subteam (now defunct)", + name: "Team 1280, the Ragin' C-Biscuits, Programming Subteam (now defunct)", short: '1280 Programming', image: '/img/logos/1280-main.png', - description: `The former programming subteam of Team 1280, it combined with the Team 1280 electrical subteam in a historic merger to form Team 1280 EECS.`, + description: `The former programming subteam of Team 1280, which combined with the Team 1280 electrical subteam in a historic merger to form Team 1280 EECS.`, }, 'usc-viterbi': { name: 'University of Southern California, Viterbi School of Engineering', @@ -584,7 +585,7 @@ Team 1280 EECS benefits from mentorship by experienced professionals and alumni, the wider world.`, }, '1280-business': { - name: "Team 1280, the Ragin' C Biscuits, Business Subteam", + name: "Team 1280, the Ragin' C-Biscuits, Business Subteam", short: '1280 Business', image: '/img/logos/1280-main.png', description: `The Business subteam of Team 1280 plays a crucial role in ensuring the team's operational success and sustainability. Unlike the engineering-focused subteams, the Business subteam focuses on the financial, organizational, and community aspects of the team's operations. They are responsible for fundraising, sponsorship outreach, budget management, and public relations, ensuring that the team has the necessary resources and support to thrive in their endeavors. @@ -598,8 +599,8 @@ Through their work, the Business subteam members gain valuable experience in bus By bridging the gap between engineering innovation and business acumen, the Business subteam ensures that Team 1280 is not only competitive in robotics challenges but also sustainable and impactful in its mission to inspire and educate future generations in STEM fields.`, }, 'raid-zero': { - name: 'Team 4253 - Raid Zero', - short: 'Raid 0', + name: 'Team 4253, Raid Zero', + short: 'Raid Zero', image: '/img/logos/raid-zero.png', description: `Team 4253, Raid Zero, hailing from Taipei American School in Taipei, Taipei Special Municipality, Chinese Taipei, has been a formidable presence in the world of robotics since its rookie year in 2012. As a participant in the international FIRST Robotics Competition, Raid Zero exemplifies innovation, teamwork, and the pursuit of excellence in science, technology, engineering, and mathematics (STEM). [linebreak] @@ -623,7 +624,7 @@ Raid Zero's influence extends beyond the technical achievements in robotics comp image: '/img/logos/cal-poly-slo.png', description: `California Polytechnic State University, San Luis Obispo (Cal Poly SLO) is renowned for its learn-by-doing philosophy that stands at the core of its engineering education. Founded in 1901, Cal Poly SLO's College of Engineering is recognized as one of the premier engineering schools in the nation, offering a hands-on approach to education that prepares students for the practical challenges they will face in the workforce. [linebreak] - With a wide array of undergraduate and graduate programs, the College of Engineering at Cal Poly SLO covers disciplines such as aerospace, biomedical, civil and environmental, computer science and software engineering, electrical, industrial and manufacturing, and mechanical engineering among others. This diversity ensures that students can find their niche and develop specialized skills in their chosen field. + With a wide array of undergraduate and graduate programs, the College of Engineering at Cal Poly SLO covers disciplines such as aerospace, biomedical, civil and environmental, computer science and software engineering, electrical, industrial and manufacturing, and mechanical engineering, among others. This diversity ensures that students can find their niche and develop specialized skills in their chosen field. [linebreak] Cal Poly SLO prides itself on its state-of-the-art laboratories and facilities, which allow students to engage directly with the material they are learning. This hands-on experience is supplemented by a curriculum that encourages interdisciplinary collaboration, critical thinking, and problem-solving skills, ensuring that graduates are well-equipped to contribute to their fields effectively. [linebreak] @@ -634,10 +635,10 @@ Raid Zero's influence extends beyond the technical achievements in robotics comp With its blend of rigorous academics, practical experience, and a supportive community, Cal Poly SLO stands out as a leader in engineering education, preparing the next generation of engineers to face global challenges with innovation and expertise.`, }, 'team-1280': { - name: `Team 1280, the Ragin' C Biscuits`, + name: `Team 1280, the Ragin' C-Biscuits`, short: 'Team 1280', image: '/img/logos/1280-main.png', - description: `We are the San Ramon Valley High School Robotics Team (FRC Team 1280) and we have been competing in the FIRST Robotics Challenge for 16 years. With just 6 weeks to design, build, program, and fundraise for a robot, FRC teaches us teamwork, business, engineering, machinery, and computer design. This year’s challenge is “Deep Space” and we are eagerly awaiting the challenge release and season kickoff in January! We are team of 79 students with 1 full time mentor, 2 part time mentors, and 1 staff liason. + description: `We are the San Ramon Valley High School Robotics Team (FRC Team 1280) and we have been competing in the FIRST Robotics Challenge for 16 years. With just 6 weeks to design, build, program, and fundraise for a robot, FRC teaches us teamwork, business, engineering, machinery, and computer design. We are a team of over 50 students with 1 full time mentor, 2 part time mentors, and 1 staff liason. [linebreak] Throughout our FRC career, we have won several regional events and numerous awards including: the Rookie Inspiration Award, both the Radio Shack and Rockwell Automation Innovation in Control Awards, the Imagery Award, the Engineering Excellence Award, and the Creativity Award. While we do focus on the competitive aspect of robotics, we also strive to spread the knowledge of STEM through our outreach programs to those who might not otherwise have access to these opportunities. [linebreak] From d883cf794067c5852750f861948c2be883f38382 Mon Sep 17 00:00:00 2001 From: Ananth Venkatesh <46249765+quantum9Innovation@users.noreply.github.com> Date: Thu, 15 Feb 2024 21:17:36 +0000 Subject: [PATCH 37/50] Fix string to hex conversion --- src/app/utils/string2hex.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/utils/string2hex.ts b/src/app/utils/string2hex.ts index f722262..691c31d 100644 --- a/src/app/utils/string2hex.ts +++ b/src/app/utils/string2hex.ts @@ -12,10 +12,10 @@ export default function string2hex(str: string): string { for (let i = 0; i < 3; i++) { // Ensuring minimum brightness for each component to make text stand out // Adjust the minimum brightness as needed (e.g., 0x80 for brighter colors) - const minBrightness = 0x80 + const minBrightness = 0xa0 // Increased min brightness const value = (((hash >> (i * 8)) & 0xff) % (0xff - minBrightness)) + minBrightness - color += ('00' + value.toString(16)).substr(-2) + color += ('00' + value.toString(16)).slice(-2) } return color From 7d798e9511d5e49837cbc555cd934e1827773aa0 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Thu, 15 Feb 2024 13:17:46 -0800 Subject: [PATCH 38/50] fix string 2 hex to not use deprecated substr --- src/app/utils/string2hex.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/utils/string2hex.ts b/src/app/utils/string2hex.ts index f722262..86e797a 100644 --- a/src/app/utils/string2hex.ts +++ b/src/app/utils/string2hex.ts @@ -15,7 +15,7 @@ export default function string2hex(str: string): string { const minBrightness = 0x80 const value = (((hash >> (i * 8)) & 0xff) % (0xff - minBrightness)) + minBrightness - color += ('00' + value.toString(16)).substr(-2) + color += ('00' + value.toString(16)).slice(-2) } return color From 11150400aba1a8707b3063b4f325cd84c6ff0e4a Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Thu, 15 Feb 2024 13:23:20 -0800 Subject: [PATCH 39/50] fix snowfall --- src/app/author/[author]/AuthorDisplay.tsx | 40 +++-------------- src/app/author/[author]/KonamiSnowfall.tsx | 51 ++++++++++++++++++++++ 2 files changed, 56 insertions(+), 35 deletions(-) create mode 100644 src/app/author/[author]/KonamiSnowfall.tsx diff --git a/src/app/author/[author]/AuthorDisplay.tsx b/src/app/author/[author]/AuthorDisplay.tsx index e11ecb2..b0ce724 100644 --- a/src/app/author/[author]/AuthorDisplay.tsx +++ b/src/app/author/[author]/AuthorDisplay.tsx @@ -1,14 +1,12 @@ -'use client' import Link from 'next/link' -import { Fragment, useState } from 'react' +import { Fragment } from 'react' import { affiliations, nationalities, authors } from '../../db/data' import { Zilla_Slab } from 'next/font/google' import { notFound } from 'next/navigation' import DocumentCard from '@/app/components/DocumentCard' import findDocumentsByAuthor from './findDocumentsByAuthor' import cardEffects from '@/app/styles/cardEffects.module.css' -import Konami from 'react-konami-code' -import Snowfall from 'react-snowfall' +import KonamiSnowfall from './KonamiSnowfall' const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] }) @@ -20,13 +18,9 @@ export default function AuthorDisplay({ notFound() } - const [snowfallActivated, setSnowfallActivated] = useState(false) const { name, affiliation, image, nationality, formerAffiliations } = data const authorsDocuments = findDocumentsByAuthor(author) - const handleKonami = () => { - setSnowfallActivated(!snowfallActivated) - } const MainPosition = () => { const mainAffiliationShort = affiliation[0].split('@')[1] @@ -34,33 +28,8 @@ export default function AuthorDisplay({ const mainAffiliation = affiliations[mainAffiliationShort] const { website } = data - const images: HTMLImageElement[] = [] - nationality.forEach((n) => { - const { flag } = nationalities[n] - const image = new Image() - image.src = flag - images.push(image) - }) - return ( <> - - {snowfallActivated && ( - - )} {mainPosition} at {mainAffiliation.name} @@ -173,7 +142,8 @@ export default function AuthorDisplay({ } return ( -
    + <> +
    )}
    -
    + ) } diff --git a/src/app/author/[author]/KonamiSnowfall.tsx b/src/app/author/[author]/KonamiSnowfall.tsx new file mode 100644 index 0000000..b96dc6b --- /dev/null +++ b/src/app/author/[author]/KonamiSnowfall.tsx @@ -0,0 +1,51 @@ +'use client' +import Konami from 'react-konami-code' +import { Snowfall } from 'react-snowfall' +import { useEffect, useState } from 'react' +import { nationalities } from '@/app/db/data' + +export default function KonamiSnowfall({ + nationalityList, +}: Readonly<{ + nationalityList: string[] +}>) { + const [snowfallActivated, setSnowfallActivated] = useState(false) + const [images, setImages] = useState([]) + + const handleKonami = () => { + setSnowfallActivated(!snowfallActivated) + } + + useEffect(() => { + const imagesTemp: HTMLImageElement[] = [] + nationalityList.forEach((n) => { + const { flag } = nationalities[n] + const image = new Image() + image.src = flag + imagesTemp.push(image) + }) + setImages(imagesTemp) + }, []) + + return ( + <> + + {snowfallActivated && ( + + )} + + ) +} From 56df68b988e6c2514056167914e363177117da75 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Thu, 15 Feb 2024 13:51:12 -0800 Subject: [PATCH 40/50] refactor authordisplay, bibtex export toast --- src/app/author/[author]/AuthorDisplay.tsx | 6 ++++-- src/app/document/view/[slug]/DocumentViewer.tsx | 4 +--- src/app/document/view/[slug]/VersionChooser.tsx | 12 +++++++----- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/app/author/[author]/AuthorDisplay.tsx b/src/app/author/[author]/AuthorDisplay.tsx index b0ce724..7fde590 100644 --- a/src/app/author/[author]/AuthorDisplay.tsx +++ b/src/app/author/[author]/AuthorDisplay.tsx @@ -1,5 +1,5 @@ import Link from 'next/link' -import { Fragment } from 'react' +import { Fragment, Suspense } from 'react' import { affiliations, nationalities, authors } from '../../db/data' import { Zilla_Slab } from 'next/font/google' import { notFound } from 'next/navigation' @@ -143,7 +143,9 @@ export default function AuthorDisplay({ return ( <> - + + +
    ) => { }) if (error) throw error let doc = data - // const doc = documents[slug] + const { manifest, abstract, citation } = doc - // if (!manifest) return notFound() const { title, authors, diff --git a/src/app/document/view/[slug]/VersionChooser.tsx b/src/app/document/view/[slug]/VersionChooser.tsx index e8f0bb6..3d35d6a 100644 --- a/src/app/document/view/[slug]/VersionChooser.tsx +++ b/src/app/document/view/[slug]/VersionChooser.tsx @@ -26,8 +26,7 @@ const VersionChooser = ({ const fileEnding = file === 'other' ? '' : `.${file}` const [selectedRevision, setSelectedRevision] = useState(latest) // Initialize the selected revision with the latest revision - const notifyCopied = () => - toast('BibTeX copied to clipboard!', { type: 'success' }) + const notifyCopied = () => toast('BibTeX copied to clipboard!') const handleClick = () => { const bibtex = `@article{ @@ -50,7 +49,7 @@ const VersionChooser = ({ } return ( -
    +
    -