Skip to content
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

Merged
merged 29 commits into from
Apr 14, 2023
Merged

Frontend updates #140

merged 29 commits into from
Apr 14, 2023

Conversation

AbhinavReddy-Dev
Copy link
Contributor

@AbhinavReddy-Dev AbhinavReddy-Dev commented Apr 13, 2023

This PR is to merge all the updates from frontend to main with the following features :

Copy link
Contributor

@ysiddhapura ysiddhapura left a 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.

@AbhinavReddy-Dev
Copy link
Contributor Author

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.

@hamsaraj7106 hamsaraj7106 self-requested a review April 13, 2023 06:48
hardikpatil
hardikpatil previously approved these changes Apr 13, 2023
Copy link
Contributor

@hardikpatil hardikpatil left a 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

ysiddhapura
ysiddhapura previously approved these changes Apr 13, 2023
AbhinavReddy-Dev and others added 2 commits April 13, 2023 22:04
* 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]>
Copy link
Contributor

@jayrevolinskyjr jayrevolinskyjr left a 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.

@hardikpatil hardikpatil self-assigned this Apr 14, 2023
…ated readme for local eslint & .env file usage
….example file and updated readme for local eslint & .env file usage
@AbhinavReddy-Dev
Copy link
Contributor Author

The old linter README instructions are now outdated. We should change them to include the steps shown in the updated linter.yml file.

I have updated the root README as well, please check and let us know if we can go ahead and merge this.

@AbhinavReddy-Dev AbhinavReddy-Dev added the Urgent Need everyone's attention label Apr 14, 2023
@hardikpatil hardikpatil requested a review from ysiddhapura April 14, 2023 08:25
Copy link
Contributor

@jayrevolinskyjr jayrevolinskyjr left a 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. --
FrontendIssues

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 jayrevolinskyjr self-assigned this Apr 14, 2023
@hardikpatil
Copy link
Contributor

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. -- FrontendIssues

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.

E7C3B04E-B8A1-4879-8287-AECE608EA4BC

Copy link
Contributor

@briswells briswells left a 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.

@hardikpatil
Copy link
Contributor

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.

@jayrevolinskyjr
Copy link
Contributor

Works after I rebuilt with --no-cache specified

@hardikpatil hardikpatil merged commit dc7032e into main Apr 14, 2023
@hardikpatil hardikpatil deleted the frontend branch April 14, 2023 17:55
@hardikpatil hardikpatil restored the frontend branch April 14, 2023 17:55
@AbhinavReddy-Dev AbhinavReddy-Dev deleted the frontend branch April 14, 2023 19:15
briswells added a commit that referenced this pull request Apr 15, 2023
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working DevOps Concerns developer operations feature New feature or request UI Concerns UI presentation Urgent Need everyone's attention
Projects
None yet
Development

Successfully merging this pull request may close these issues.