-
Notifications
You must be signed in to change notification settings - Fork 34
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
Frontend updates #140
Frontend updates #140
Conversation
Added ESLint for react frontend. Removed ESLint from root directory as there were plugin issues. To check lint ` cd PantryNodeReact && npm run lint `
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.
Just want to make sure the json file is up to date, since it didn't pass all the checks for frontend, otherwise it looks good to me.
Yeah, thanks! I just updated the package-lock locally, need to resolve the lint errors, working on it. |
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.
Looks good on both docker and locally
* fix lint error on indent. resolved #147 * resolved console error on donor page * Update actions.yml to handle PR to frontend * Update linter.yml to handle PR to frontend * changed off to warn: no-explicit-any and no-unused-vars * changed CI to false to not consider lint warns as errors * changed CI to false in package.json * added names to run commands in actions.yml * added names to run commands in actions.yml v2 --------- Co-authored-by: Jay Revolinsky <[email protected]> Co-authored-by: AbhinavReddy-Dev <[email protected]>
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.
The old linter README instructions are now outdated. We should change them to include the steps shown in the updated linter.yml file.
…ated readme for local eslint & .env file usage
….example file and updated readme for local eslint & .env file usage
I have updated the root README as well, please check and let us know if we can go ahead and merge this. |
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.
It builds on my system but then miragejs seems to be tossing errors, even when I run a fresh docker build.
Compiled with problems:
ERROR in ./src/Components/Summary/BarChart.tsx 5:0-108
Module not found: Error: Can't resolve 'recharts' in '/app/frontend/src/Components/Summary'
ERROR in ./src/mirage/index.ts 3:0-40
Module not found: Error: Can't resolve 'miragejs' in '/app/frontend/src/mirage'
ERROR in src/Components/Summary/BarChart.tsx:2:98
TS2307: Cannot find module 'recharts' or its corresponding type declarations.
1 | import React from "react";2 | import { BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from "recharts";
| ^^^^^^^^^^
3 |
4 | interface DataProps {
5 | name: string;ERROR in src/mirage/auth.ts:1:34
TS2307: Cannot find module 'miragejs' or its corresponding type declarations.
1 | import { Registry, Server } from "miragejs";
| ^^^^^^^^^^
2 | import { AnyFactories, AnyModels } from "miragejs/-types";
3 |
4 | export const getAuthRoutes = (ERROR in src/mirage/auth.ts:2:41
TS2307: Cannot find module 'miragejs/-types' or its corresponding type declarations.
1 | import { Registry, Server } from "miragejs";2 | import { AnyFactories, AnyModels } from "miragejs/-types";
| ^^^^^^^^^^^^^^^^^
3 |
4 | export const getAuthRoutes = (
5 | mirage: Server<Registry<AnyModels, AnyFactories>>ERROR in src/mirage/feed.ts:1:34
TS2307: Cannot find module 'miragejs' or its corresponding type declarations.
1 | import { Registry, Server } from "miragejs";
| ^^^^^^^^^^
2 | import { AnyFactories, AnyModels } from "miragejs/-types";
3 | export const getFeedRoutes = (
4 | mirage: Server<Registry<AnyModels, AnyFactories>>ERROR in src/mirage/feed.ts:2:41
TS2307: Cannot find module 'miragejs/-types' or its corresponding type declarations.
1 | import { Registry, Server } from "miragejs";2 | import { AnyFactories, AnyModels } from "miragejs/-types";
| ^^^^^^^^^^^^^^^^^
3 | export const getFeedRoutes = (
4 | mirage: Server<Registry<AnyModels, AnyFactories>>
5 | ) => {ERROR in src/mirage/index.ts:1:30
TS2307: Cannot find module 'miragejs' or its corresponding type declarations.
1 | import { createServer } from "miragejs";
| ^^^^^^^^^^
2 | import { getAuthRoutes } from "./auth";
3 | import { getSaleRoutes } from "./sale";
4 | import { getFeedRoutes } from "./feed";ERROR in src/mirage/sale.ts:1:34
TS2307: Cannot find module 'miragejs' or its corresponding type declarations.
1 | import { Registry, Server } from "miragejs";
| ^^^^^^^^^^
2 | import { AnyFactories, AnyModels } from "miragejs/-types";
3 |
4 | export const getSaleRoutes = (ERROR in src/mirage/sale.ts:2:41
TS2307: Cannot find module 'miragejs/-types' or its corresponding type declarations.
1 | import { Registry, Server } from "miragejs";2 | import { AnyFactories, AnyModels } from "miragejs/-types";
| ^^^^^^^^^^^^^^^^^
3 |
4 | export const getSaleRoutes = (
5 | mirage: Server<Registry<AnyModels, AnyFactories>>
What I see when i am on localhost:3000. --
Looks like it's just an issue with imports but I am not sure if any of the frontend pages are working. Could be a me-problem, if so let me know!
@jayrevolinskyjr Yeah, I received the same. Images are cached. I had to prune it and removed all stopped containers and images, and compose build, up again. Give it a one more shot. |
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.
Everything looks good. I did not review for contents, just general changes and app stability. I was able to run the app after just a docker compose build, without it throwing errors for new libraries. I am unsure why Jay is having issues.
Probably a cache thing. I had the same. |
Works after I rebuilt with |
commit dc7032e Merge: d45499b aab812b Author: Hardik Patil <[email protected]> Date: Fri Apr 14 10:55:20 2023 -0700 Frontend updates (#140) This PR is to merge all the updates from `frontend` to `main` with the following features : - Donor page UI improvements - @prasannarajezzzy - Linter for frontend - @shmansa @AbhinavReddy-Dev - Moved .eslintrc.cjs from root to backend directory to resolve plugin issues. - @shmansa @AbhinavReddy-Dev - Summary page @decoles @abhilashSreenivasa - mirageJS support to mock API @sathyanarayanan-v - Linter error fix @hardikpatil @jayrevolinskyjr commit aab812b Author: hardikpatil <[email protected]> Date: Fri Apr 14 01:22:48 2023 -0700 resolved warnings on the container logs commit 87909e6 Author: AbhinavReddy-Dev <[email protected]> Date: Fri Apr 14 00:45:09 2023 -0700 remnamed PantryNodeReact to frontend, updated actions.yml, added .env.example file and updated readme for local eslint & .env file usage commit 59ae5fc Author: AbhinavReddy-Dev <[email protected]> Date: Fri Apr 14 00:45:09 2023 -0700 remnamed PantryNodeReact to frontend, added .env.example file and updated readme for local eslint & .env file usage commit 04751ca Author: hardikpatil <[email protected]> Date: Fri Apr 14 00:15:58 2023 -0700 how to linter test update on readme commit 1dcf5cb Author: Hardik Patil <[email protected]> Date: Thu Apr 13 22:32:11 2023 -0700 Linter error on frontend (#150) * fix lint error on indent. resolved #147 * resolved console error on donor page * Update actions.yml to handle PR to frontend * Update linter.yml to handle PR to frontend * changed off to warn: no-explicit-any and no-unused-vars * changed CI to false to not consider lint warns as errors * changed CI to false in package.json * added names to run commands in actions.yml * added names to run commands in actions.yml v2 --------- Co-authored-by: Jay Revolinsky <[email protected]> Co-authored-by: AbhinavReddy-Dev <[email protected]> commit 817266c Merge: af86a69 d45499b Author: AbhinavReddy-Dev <[email protected]> Date: Thu Apr 13 22:04:56 2023 -0700 conflict resolve: Merge branch 'main' into frontend commit d45499b Merge: eb11be4 6839a0b Author: briswells <[email protected]> Date: Thu Apr 13 21:53:10 2023 -0700 Docker module issue Closing #139 (#149) commit 6839a0b Author: Brian S Wells <[email protected]> Date: Thu Apr 13 17:33:22 2023 -0700 Update path for start script commit 1ea02cf Author: Brian S Wells <[email protected]> Date: Thu Apr 13 17:30:20 2023 -0700 Updated mounts to not include node modules commit af86a69 Merge: 16d8afe 6d735ba Author: Sathya <[email protected]> Date: Thu Apr 13 17:04:23 2023 -0700 Add mirageJS support to mock API (#145) I have covered most of the pages to use MirageJS to mock APIs'. - I have mocked API for the following pages - Sale - Feed - Login Currently MirageJS is enabled on prod. Once we feel that APIs are solid, we can enable it only on dev environment. Closes #146 Docs for MirageJS - [Click here!](https://miragejs.com/) commit 6d735ba Merge: 1cc370b 16d8afe Author: Sathya <[email protected]> Date: Thu Apr 13 17:00:48 2023 -0700 Merge branch 'frontend' into mirage-js-integration commit 16d8afe Author: David Coles <[email protected]> Date: Thu Apr 13 16:51:45 2023 -0700 Stock Summary Page (#142) * Inital table configuration started #91 * Tables configured for mobile, interfaces and temp data started #91 * Test data setup in tables #91 * Added count from array of data (hopefully can be used later) #91 * Summary now has scrollable tables and scrolling whole page isnt needed for bigger displays, resizing works well #91 * updated Summary page to include themed table headers & alternating colors on rows #91 * BarChart file has been created #91 * Bar chart fuctionality has been added #91 * Added bar chart with some data to summary page #91 * Toggle button has been added, Tables and Charts are separated #91 * Toggle button has been added, Tables and Charts are separated #91 * Added comments to toggle functions and states #91 * tables are set to default active toggle and margin has been added #91 * made changes to UI, Resolved issue #91 --------- Co-authored-by: Abhilash Sreenivasa <[email protected]> commit b2b9614 Author: AbhinavReddy-Dev <[email protected]> Date: Thu Apr 13 16:27:27 2023 -0700 no-const-assign in backend lint error fix commit 250c2b3 Merge: b6fd8e7 eb11be4 Author: AbhinavReddy-Dev <[email protected]> Date: Thu Apr 13 16:23:39 2023 -0700 eslintrc.cjs and linter.yml conflicts resolved commit 1cc370b Merge: 41a2692 b6fd8e7 Author: Sathya <[email protected]> Date: Thu Apr 13 11:40:19 2023 -0700 Merge branch 'frontend' into mirage-js-integration commit 41a2692 Author: Sathya <[email protected]> Date: Thu Apr 13 11:37:54 2023 -0700 resolve conflicts with frontend branch commit 6d28b4d Merge: 429cf62 8e6920c Author: Sathya <[email protected]> Date: Thu Apr 13 11:36:57 2023 -0700 Merge branch 'frontend' into mirage-js-integration commit 429cf62 Author: Sathya <[email protected]> Date: Thu Apr 13 11:31:50 2023 -0700 Merge branch 'frontend' into mirage-js-integration commit 3061f1b Author: Sathya <[email protected]> Date: Thu Apr 13 10:32:48 2023 -0700 add miragejs for all the API routes commit eb11be4 Author: Anoushka Sharma <[email protected]> Date: Thu Apr 13 09:52:11 2023 -0700 Issue undef1 (#103) * .eslintrc.cjs * changed eslintrc.cjs * changed eslintrc.cjs * Changed eslintrc.cjs * Changed eslintrc.cjs * Unsure of changes to init-models.ts * Unsure of changes to init-models.ts * Changed eslintrc.cjs * Removed all errors and left some as warnings * Changed eslintrc.cjs file and ignored some errors * Fixed issueundef error * Clean Up --------- Co-authored-by: Anoushka Sharma <[email protected]> Co-authored-by: James Krepelka <[email protected]>
This PR is to merge all the updates from
frontend
tomain
with the following features :