Conversation
There was a problem hiding this comment.
Pull request overview
Adds a Vite + React + TypeScript project for “Homework 3” (Yuhua Huang) that implements a multi-view D3-based Spotify visualization, alongside additional template copies under Homework3/React-Template and Homework2/Yuhua_Huang/React-Template.
Changes:
- Added a full React/Vite/TS app under
Homework3/yuhuahuang/, including D3 visualizations and UI scaffolding. - Added (duplicated) React template projects under
Homework3/React-Template/andHomework2/Yuhua_Huang/React-Template/. - Added CSV/JSON demo data and Spotify datasets under each project’s directories.
Reviewed changes
Copilot reviewed 45 out of 56 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| Homework3/yuhuahuang/vite.config.ts | Vite dev server + React plugin configuration. |
| Homework3/yuhuahuang/tsconfig.json | TypeScript compiler configuration for the HW3 project. |
| Homework3/yuhuahuang/src/vite-env.d.ts | Vite client type references. |
| Homework3/yuhuahuang/src/types.ts | Shared TS interfaces for charting/components. |
| Homework3/yuhuahuang/src/style.css | Layout and styling for multi-view dashboard and legend. |
| Homework3/yuhuahuang/src/stores/Reducer.ts | Example reducer/store scaffolding. |
| Homework3/yuhuahuang/src/main.tsx | React entry point mounting App. |
| Homework3/yuhuahuang/src/components/NotesWithReducer.tsx | Example MUI component using context + reducer. |
| Homework3/yuhuahuang/src/components/Notes.tsx | Example MUI component using local state. |
| Homework3/yuhuahuang/src/components/Example.tsx | Example D3 bar chart + data loading demo. |
| Homework3/yuhuahuang/src/App.tsx | Main HW3 D3 visualization implementation (3 coordinated views). |
| Homework3/yuhuahuang/package.json | Project dependencies and scripts. |
| Homework3/yuhuahuang/index.html | Vite HTML entry. |
| Homework3/yuhuahuang/data/demo.json | Demo JSON dataset for examples. |
| Homework3/yuhuahuang/data/demo.csv | Demo CSV dataset for examples. |
| Homework3/yuhuahuang/README.md | Template/framework documentation for the project. |
| Homework3/React-Template/vite.config.ts | Template Vite configuration (duplicate project). |
| Homework3/React-Template/tsconfig.json | Template TS config (duplicate project). |
| Homework3/React-Template/src/vite-env.d.ts | Template Vite client type references. |
| Homework3/React-Template/src/types.ts | Template shared TS interfaces. |
| Homework3/React-Template/src/style.css | Template styling for dashboard layout. |
| Homework3/React-Template/src/stores/Reducer.ts | Template reducer/store scaffolding. |
| Homework3/React-Template/src/main.tsx | Template React entry point. |
| Homework3/React-Template/src/components/NotesWithReducer.tsx | Template reducer-based notes component. |
| Homework3/React-Template/src/components/Notes.tsx | Template notes component. |
| Homework3/React-Template/src/components/Example.tsx | Template example D3 component. |
| Homework3/React-Template/src/App.tsx | Template copy of the D3 multi-view visualization. |
| Homework3/React-Template/package.json | Template dependencies and scripts. |
| Homework3/React-Template/index.html | Template HTML entry. |
| Homework3/React-Template/data/demo.json | Template demo JSON dataset. |
| Homework3/React-Template/data/demo.csv | Template demo CSV dataset. |
| Homework3/React-Template/README.md | Template/framework documentation. |
| Homework2/Yuhua_Huang/React-Template/vite.config.ts | HW2 template Vite configuration (additional project added). |
| Homework2/Yuhua_Huang/React-Template/tsconfig.json | HW2 template TS config. |
| Homework2/Yuhua_Huang/React-Template/src/vite-env.d.ts | HW2 template Vite client type references. |
| Homework2/Yuhua_Huang/React-Template/src/types.ts | HW2 template shared TS interfaces. |
| Homework2/Yuhua_Huang/React-Template/src/style.css | HW2 template styling for dashboard layout. |
| Homework2/Yuhua_Huang/React-Template/src/stores/Reducer.ts | HW2 template reducer/store scaffolding. |
| Homework2/Yuhua_Huang/React-Template/src/main.tsx | HW2 template React entry point. |
| Homework2/Yuhua_Huang/React-Template/src/components/NotesWithReducer.tsx | HW2 template reducer-based notes component. |
| Homework2/Yuhua_Huang/React-Template/src/components/Notes.tsx | HW2 template notes component. |
| Homework2/Yuhua_Huang/React-Template/src/components/Example.tsx | HW2 template example D3 component. |
| Homework2/Yuhua_Huang/React-Template/src/App.tsx | HW2 template app implementing earlier multi-view visualization work. |
| Homework2/Yuhua_Huang/React-Template/package.json | HW2 template dependencies and scripts. |
| Homework2/Yuhua_Huang/React-Template/index.html | HW2 template HTML entry. |
| Homework2/Yuhua_Huang/React-Template/data/demo.json | HW2 template demo JSON dataset. |
| Homework2/Yuhua_Huang/React-Template/data/demo.csv | HW2 template demo CSV dataset. |
| Homework2/Yuhua_Huang/React-Template/README.md | HW2 template/framework documentation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # More about the Framework | ||
|
|
||
|
|
||
| This is a template in React and TypeScript. React has a steeper learning curve than Vue.js because it requires understanding JSX syntax and concepts like hooks and component lifecycle. | ||
|
|
There was a problem hiding this comment.
This PR is labeled as an HW3 submission for a specific student, but it also adds a full Homework3/React-Template/ project. If the template is already tracked elsewhere (or not required for the submission), consider removing it from this PR to reduce duplicated code and keep the submission focused.
| "jsx": "react-jsx", | ||
| }, |
There was a problem hiding this comment.
tsconfig.json contains trailing commas (after the last property in compilerOptions), which makes the file invalid JSON and will cause TypeScript tooling to fail to parse it. Remove the trailing commas so the config is valid JSON.
| "jsx": "react-jsx", | ||
| }, |
There was a problem hiding this comment.
tsconfig.json has trailing commas in JSON (after "jsx": "react-jsx" and after the last property), which makes the file invalid JSON and breaks tsc config parsing. Remove the trailing commas.
| "isolatedModules": true, | ||
| "moduleDetection": "force", | ||
| "noEmit": true, | ||
| "jsx": "react-jsx", |
There was a problem hiding this comment.
This tsconfig.json includes trailing commas in JSON (e.g., after the jsx setting), which makes the file invalid JSON and will prevent TypeScript from reading the config. Remove the trailing commas.
| "jsx": "react-jsx", | |
| "jsx": "react-jsx" |
| setSelectedNode(d[0]); | ||
| setSelectedType("artist"); | ||
| }Homework3 | ||
| }) |
There was a problem hiding this comment.
There is stray text (Homework3) after the closing brace in the click handler, which makes this file fail to compile (syntax error). Remove the extraneous token so the handler body closes normally.
| svg.append("text") | ||
| .attr("x", width / 2) | ||
| .attr("y", -30) | ||
| .attr("text-anchor", "middle") | ||
| .attr("class", "title") | ||
| .text("Top 10 Artists and Their Genre Connections"); |
There was a problem hiding this comment.
The View 3 title is positioned at y = -30, which is outside the SVG viewBox (0..height) and will render off-canvas in most browsers. Use a positive y coordinate (e.g., within the top margin) or adjust the viewBox/margins so the title is visible.
| import { defineConfig } from 'vite' | ||
| import react from '@vitejs/plugin-react' | ||
|
|
||
| // https://vitejs.dev/config/ | ||
| export default defineConfig({ |
There was a problem hiding this comment.
PR title indicates an HW3 submission, but this change set also adds an entire HW2 React template under Homework2/Yuhua_Huang/React-Template/. If HW2 artifacts are not intended to be part of this submission, consider removing them from this PR to keep scope aligned with the PR description.
No description provided.