-
-
Notifications
You must be signed in to change notification settings - Fork 6
Integrate J-Space UI into QCX Dashboard #570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,11 @@ | ||
| import { Chat } from '@/components/chat' | ||
| import { nanoid } from '@/lib/utils' | ||
| import { AI } from './actions' | ||
| import { JSpaceUI } from '@/components/j-space-ui' | ||
|
|
||
| export const maxDuration = 60 | ||
|
|
||
| import { MapDataProvider } from '@/components/map/map-data-context' | ||
|
|
||
| export default function Page() { | ||
| const id = nanoid() | ||
| return ( | ||
| <AI initialAIState={{ chatId: id, messages: [] }}> | ||
| <MapDataProvider> | ||
| <Chat id={id} /> | ||
| </MapDataProvider> | ||
| </AI> | ||
| <main> | ||
| <JSpaceUI /> | ||
|
Comment on lines
+7
to
+8
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This replaces the QCX entry point instead of integrating with it.
🤖 Prompt for AI Agents |
||
| </main> | ||
| ) | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| export const content = { | ||
| aboutMe: { | ||
| name: "Jeremy Liu", | ||
| title: "Computer Engineer Undergrad @ UofT", | ||
| bio: "I am dedicated to inspiring people and creating positive spaces around the world.", | ||
| currentActivities: [ | ||
| "Building personal tools & student projects", | ||
| "Expanding my knowledge in object-oriented programming", | ||
| "Learning full-stack web dev", | ||
| "Exploring robotics and AI", | ||
| ], | ||
| }, | ||
| skills: { | ||
| programmingLanguages: "Python, C, JavaScript, TypeScript, MATLAB, SQL", | ||
| webUI: "React, Next.js, HTML, CSS, Bootstrap, Tailwind, Vite", | ||
| roboticsSystems: "ROS2, Linux (Ubuntu), Arduino, OpenCV", | ||
| dataML: "Pytorch, Scikit-learn, Matplotlib, Pandas, NumPy, OpenCV, BeautifulSoup, Selenium", | ||
| developerTools: "Git, Node.js, AWS, PostgreSQL, Postman, VS Code, Claude, Cursor.ai", | ||
| }, | ||
| projects: [ | ||
| { | ||
| title: "Sinatra", | ||
| description: "A DAW that turns your voice into any instrument of your choice.", | ||
| image: "sinatra", | ||
| github: "https://github.com/e-yang6/sinatra", | ||
| website: "https://sinatra-daw.vercel.app/", | ||
| }, | ||
| { | ||
| title: "LockBlock", | ||
| description: "A smart security system using Arduino and computer vision to block deadbolts when unknown faces are detected.", | ||
| image: "lockblock", | ||
| github: "https://github.com/Jeremyliu-621/lockblock", | ||
| }, | ||
| { | ||
| title: "UFC Index website", | ||
| description: "A website that shows scraped stats for UFC Fighters.", | ||
| image: "ufc-search", | ||
| github: "https://github.com/Jeremyliu-621/UFC-Elo-Calculator", | ||
| website: "https://ufc-elo-calculator.vercel.app/", | ||
| }, | ||
| { | ||
| title: "Binder", | ||
| description: "A swipe-based interface for thrifting.", | ||
| image: "binder_action", | ||
| github: "https://github.com/Jeremyliu-621/binder", | ||
| }, | ||
| { | ||
| title: "stop! don't go on.", | ||
| description: "Water Sprayer that stops bad habits.", | ||
| image: "stop_dont_go_on_grey", | ||
| website: "https://stop-dont-go-on.vercel.app/", | ||
| github: "https://github.com/Jeremyliu-621/stop-dont-go-on", | ||
| }, | ||
| { | ||
| title: "j-space", | ||
| description: "A space that focuses on my creativity and ideas.", | ||
| image: "j-gif-space", | ||
| website: "https://j-space.vercel.app/", | ||
| github: "https://github.com/Jeremyliu-621/j-space", | ||
| }, | ||
| ], | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,146 @@ | ||
| 'use client' | ||
|
|
||
| import React, { useEffect, useState } from 'react' | ||
| import '98.css' | ||
| import { content } from './j-space-content' | ||
|
|
||
| export function JSpaceUI() { | ||
| const [isLoaded, setIsLoaded] = useState(false) | ||
|
|
||
| useEffect(() => { | ||
| // Import 98-components only on the client side | ||
| import('98-components').then(() => { | ||
| setIsLoaded(true) | ||
| }) | ||
| }, []) | ||
|
|
||
| if (!isLoaded) return null | ||
|
Comment on lines
+10
to
+17
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't blank the page while the client-only import resolves.
Possible direction- const [isLoaded, setIsLoaded] = useState(false)
-
useEffect(() => {
- // Import 98-components only on the client side
- import('98-components').then(() => {
- setIsLoaded(true)
- })
+ void import('98-components').catch((error) => {
+ console.error('Failed to load 98-components', error)
+ })
}, [])
-
- if (!isLoaded) return null🤖 Prompt for AI Agents |
||
|
|
||
| const getImageUrl = (filename: string) => { | ||
| return `/j-space/assets/${filename}` | ||
| } | ||
|
|
||
| return ( | ||
| <div className="j-space-container" style={{ | ||
| fontFamily: '"Jersey 10", sans-serif', | ||
| backgroundColor: '#c0c0c0', | ||
| width: '100vw', | ||
| height: '100vh', | ||
| overflow: 'hidden', | ||
| position: 'relative' | ||
| }}> | ||
|
Comment on lines
+24
to
+31
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The window layout is not usable on small viewports. All three panes use fixed Also applies to: 36-94 🤖 Prompt for AI Agents |
||
| {/* @ts-ignore */} | ||
| <win98-desktop style={{ height: '100%', width: '100%' }}> | ||
| {/* About Me Window */} | ||
| {/* @ts-ignore */} | ||
| <win98-window title="About_Me.exe" resizable show-minimize class="window-about-me" style={{ | ||
| position: 'absolute', | ||
| top: '10vh', | ||
| left: '10vw', | ||
| width: '22vw', | ||
| height: '55vh', | ||
| zIndex: 10 | ||
| }}> | ||
| <div className="window-body"> | ||
| <div style={{ display: 'flex', justifyContent: 'center', marginBottom: '10px' }}> | ||
| <img src={getImageUrl('Jeremypixel.png')} alt="Jeremy Pixel" style={{ width: '100px', border: '2px solid #808080' }} /> | ||
| </div> | ||
| <h2 style={{ textAlign: 'center', margin: '5px 0' }}>{content.aboutMe.name}</h2> | ||
| <p style={{ textAlign: 'center', fontWeight: 'bold' }}>{content.aboutMe.title}</p> | ||
| <p>{content.aboutMe.bio}</p> | ||
| <hr /> | ||
| <h3>Current Activities:</h3> | ||
| <ul> | ||
| {content.aboutMe.currentActivities.map((activity, i) => ( | ||
| <li key={i}>{activity}</li> | ||
| ))} | ||
| </ul> | ||
| </div> | ||
| {/* @ts-ignore */} | ||
| </win98-window> | ||
|
|
||
| {/* Skills Window */} | ||
| {/* @ts-ignore */} | ||
| <win98-window title="Skills.exe" resizable show-minimize class="window-skills" style={{ | ||
| position: 'absolute', | ||
| top: '13vh', | ||
| right: '6vw', | ||
| width: '18vw', | ||
| height: '35vh', | ||
| zIndex: 10 | ||
| }}> | ||
| <div className="window-body"> | ||
| <h3>Programming Languages</h3> | ||
| <p>{content.skills.programmingLanguages}</p> | ||
| <hr /> | ||
| <h3>Web & UI</h3> | ||
| <p>{content.skills.webUI}</p> | ||
| <hr /> | ||
| <h3>Developer Tools</h3> | ||
| <p>{content.skills.developerTools}</p> | ||
|
Comment on lines
+72
to
+80
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Two
🤖 Prompt for AI Agents |
||
| </div> | ||
| {/* @ts-ignore */} | ||
| </win98-window> | ||
|
|
||
| {/* Projects Window */} | ||
| {/* @ts-ignore */} | ||
| <win98-window title="Projects.exe" resizable show-minimize class="window-projects" style={{ | ||
| position: 'absolute', | ||
| top: '2vh', | ||
| left: '33vw', | ||
| width: '42vw', | ||
| height: '88vh', | ||
| zIndex: 10 | ||
| }}> | ||
| <div className="window-body" style={{ overflowY: 'auto', height: 'calc(100% - 40px)' }}> | ||
| {content.projects.map((project, i) => ( | ||
| <div key={i} style={{ marginBottom: '20px', borderBottom: '1px solid #808080', paddingBottom: '10px' }}> | ||
| <h3>{project.title}</h3> | ||
| <p>{project.description}</p> | ||
| {project.image && ( | ||
| <img src={getImageUrl(`${project.image}.png`)} alt={project.title} style={{ width: '100%', border: '1px solid #808080' }} | ||
| onError={(e) => { (e.target as HTMLImageElement).src = getImageUrl(`${project.image}.gif`) }} /> | ||
| )} | ||
| <div style={{ marginTop: '10px' }}> | ||
| {project.github && <a href={project.github} target="_blank" rel="noreferrer"><button>GitHub</button></a>} | ||
| {project.website && <a href={project.website} target="_blank" rel="noreferrer"><button style={{ marginLeft: '5px' }}>Website</button></a>} | ||
|
Comment on lines
+104
to
+106
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid nesting buttons inside links. Each action is rendered as two interactive controls for one destination. That hurts keyboard/screen-reader behavior and is also why the lint rule is complaining about the inner 🧰 Tools🪛 Biome (2.4.6)[error] 105-105: Provide an explicit type prop for the button element. (lint/a11y/useButtonType) [error] 106-106: Provide an explicit type prop for the button element. (lint/a11y/useButtonType) 🤖 Prompt for AI Agents |
||
| </div> | ||
| </div> | ||
| ))} | ||
| </div> | ||
| {/* @ts-ignore */} | ||
| </win98-window> | ||
|
|
||
| {/* Taskbar */} | ||
| {/* @ts-ignore */} | ||
| <win98-taskbar slot="taskbar"></win98-taskbar> | ||
| </win98-desktop> | ||
|
|
||
| <style jsx global>{` | ||
| @import url('https://fonts.googleapis.com/css2?family=Jersey+10&display=swap'); | ||
|
|
||
| .j-space-container * { | ||
| cursor: default !important; | ||
| } | ||
| .j-space-container a, | ||
| .j-space-container button, | ||
| .j-space-container [role="button"] { | ||
| cursor: pointer !important; | ||
| } | ||
|
|
||
| .window-body h3 { | ||
| font-size: 1.2em; | ||
| margin: 10px 0 5px 0; | ||
| } | ||
|
|
||
| .window-body p { | ||
| margin: 5px 0; | ||
| } | ||
|
|
||
| .window-body ul { | ||
| padding-left: 20px; | ||
| } | ||
| `}</style> | ||
| </div> | ||
| ) | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Remove the commented-out layout branches.
These placeholders are dead code now and will drift from the real layout. Deleting them is cleaner than keeping commented imports/render sites around.
Also applies to: 112-116
🤖 Prompt for AI Agents