-
Notifications
You must be signed in to change notification settings - Fork 46
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
Tim add Materials List page #1401
Conversation
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.
Great work on implementing everything! It looks quite nice, and it's also responsive. Scrolling works on the table all throughout, and the code seems to all be in order. Error handling also properly shows error toasts.
I have noticed that if there's a 503 error, then 7 toasts pop up on the page with different timings for all of them. I also cannot close them by pressing the "x" in the top right corner sometimes. I have also noticed that all the buttons on screen seem to stop working when the error messages pop up, and after they are gone as well.
Screen.Recording.2023-10-11.at.3.05.26.PM.mov
Also, it seems there is nothing that occurs when the edit button is pressed.
Screen.Recording.2023-10-11.at.2.49.16.PM.mov
Thanks for your comment. The error toasts are the result of other error handling in the app. The edit buttons are currently not hooked up to anything and return null for now. I've updated the PR description to make this more clear. |
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.
Hi @tdkent I tested your PR and it works as intended.
- Display row data normally, and filter the result properly by project.
- "View" buttons and overflow data work as described
Screen.Recording.2023-10-12.at.1.12.29.AM.mov
- Error state and no data state are shown as described in the test.
Screen.Recording.2023-10-12.at.1.19.32.AM.mov
hi @tdkent. I've tested your PR, and it appears to be working as intended. The table displays properly, the row data is shown correctly, and the filtering by project works as expected. Also "View" and "Tim Admin" buttons works as described. Screen.Recording.2023-10-12.at.1.05.26.PM.mov |
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.
hello @tdkent
I pulled your backend #567 and front end code
After messing with it for longer than id like to admit and realizing I forgot to run build in the backend I got your changes to work! ha-ha
Everything is working as described!
Untitled_.Oct.12.2023.1_43.PM.webm
I would note in galaxy fold view port the projects dropdown is a little off center but no big deal
Nice work!
I attempted to test it, and it displayed this: http://localhost:3000/dashboard/bmdashboard. However, when I tried various methods, it didn't display anything similar to http://localhost:3000/bmdashboard/materials-list. |
Did you check out and build the backend PR? What errors displayed in your console? Please provide more info so it's possible to debug the issue you are having. ETA: the correct route is localhost:3000/bmdashboard |
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.
Hi @tdkent, I followed the steps in your PR and tested locally with the BE PR using a volunteer account.
The functionalities mentioned in the PR work as described. After logging into /bmdashboard, user can access material list page. I tested Modal overflow by shrinking x-axis, and the content will adjust accordingly. For error states, I followed your test instructions, and error states are handled correctly. Great work!
1401.mp4
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.
Hi I test your PR. Worked as expected, great job!
video1378241017.mp4
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.
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.
Hi @tdkent, I tested this PR locally and all the features implemented work as described including error states. Below are my Test recordings. Great Job!!!
P.S. The only issue is that the FE gets "Compiled with warnings". I saw the same error in your recording as well so I assume you are aware of that.
Test Rec:
13.10.2023_17.38.01_REC.mp4
13.10.2023_17.40.22_REC.mp4
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.
Hi Tim,
Minimal adjustments are required to match it exactly with the Figma. Check below:
@@ -156,6 +156,7 @@ export default ( | |||
|
|||
<BMProtectedRoute path="/bmdashboard" exact component={BMDashboard} /> | |||
<Route path="/bmdashboard/login" component={BMLogin} /> | |||
<BMProtectedRoute path="/bmdashboard/materials-list" component={MaterialsList} /> |
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.
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.
Hi Tim! I have tested your PR with the following instruction:
First, I have logged in as volunteer, and go to the “localhost:3000/bmdashboard/materials-list” and the lists have display as expected with 25 rows of data and I can scroll down to see the overflow data.
Next, the filter of project is work great with filter the result of data/
I also have open the Usage, Updates, and Record modal and everything is responsive.
The page wildths is also work. I have test with the smaller screen and it can scroll horizontal to see the over flow data.
Next, for the test error, I have change the ENDPOINTS.BM_MATERIALS_LIST string on the code, and it only show the red modal with the unexpected error. Is it need to be show the incorrect endpoint (404 error)?
Finally, I have remove the res.data in function dispatch(setMaterials(res.data)) and it show “No materials data” . Below is my video of testing
HGN.APP.-.Google.Chrome.2023-10-14.08-32-37.mp4
There is no requirement to exactly match the wireframes. |
Yes, no problem. It needs to match the navbar link URL address, so I will update it in the header to "/bmdashboard/materials-list" instead of "/bmdashboard/material-list. |
f4ea6f0
Thank you all, moving to final review! |
This functionality works as intended and the code is great!! screencast-bpconcjcammlapcogcnnelfmaeghhagj-2023.10.18-12_13_04.webm |
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.
Great job on this. Everything looks really good. The functionality is 100% there and it's fully responsive:
Your error handling within the page works flawlessly as you described in the instructions as well:
I just had some small fixes to suggest and some things I'd like to clarify.
This one isn't related to my request for changes, but it's something that I noticed while checking out your PR. The back to top button seems to be malfunctioning and showing while at the top of the page. (Note: not pr1401 that caused this but the back to top button).
I noticed you were using index as the key in the props. Not sure why linting isn't catching this, but it's generally considered bad practice to do so. If you need to, you could create a unique key through the use of combining the date timestamp & createdBy._id.
I was also wondering your thoughts on implementing a sorting algorithm to sort these by date on the following modals as the date is not sorted chronologically. This could be implemented directly within the mongodb query on the backend:
The only other thing I noticed was a css warning due to use of "end" instead of "flex-end"
Other than those small things, it's all pretty stellar.
List of my requested changes:
- fix the use of "i" as the key
- implement chronological sorting in mongodb query
- fix css use of "align-items: end" to "align-items: flex-end" so the warning goes away
@KurtisIvey Thanks for your comments. I pretty much agree with your suggestions!
|
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 checks out. Great job. The error handling still works without issue as well after the recent changes.
Just like you mentioned, the keys caused a duplicate error. However, it's not important since this was something you said you'd address later. Thanks for taking the time to explain things to me about how a lot of this is still in development
Description
Add the Materials List page (Phase 2), a table of all purchased materials being used by the organization in their building projects.
Related PRS (if any):
To test this PR you need to checkout backend PR #567
Main changes explained:
props
.How to test:
git checkout Tim_bm_materials_list_index
npm install
npm run start:local
ENDPOINTS.BM_MATERIALS_LIST
string so the request is sent to an incorrect endpoint (404 error).dispatch(setMaterials(res.data))
todispatch(setMaterials([]))
Screenshots or videos of changes:
materials-list-demo.mov
Notes:
git pull
thennpm run build
on the backend branch to make sure the branch is up to date.