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

Dashboard page - Manage Students #122

Open
3 tasks done
lloan opened this issue Mar 17, 2020 · 6 comments
Open
3 tasks done

Dashboard page - Manage Students #122

lloan opened this issue Mar 17, 2020 · 6 comments
Assignees
Labels
task scrum label
Milestone

Comments

@lloan
Copy link
Member

lloan commented Mar 17, 2020

This is a three part task:

  • Design the new page
  • Create the proof of concept
  • Implement the proof of concept

Design

What is the new component or item:
Create a design PDF for developers to create a static copy with code. You will be using UIKit components along with Fontawesome PRO icons. Any comments you need to make, make them in the discussion of the issue or the implementation issue for this component.

The expected deliverable will be a design document that shows all the possible states it has. Provide notes as necessary.

** Proof of Concept**

Create a proof of concept - take the design doc, specs sheet and convert it to code. You will be using UIKit as the CSS library along with Fontawesome PRO icons. Do not worry about logic during this step, just build out the component.

The expected deliverable will be a component that is responsive and mobile-ready. Make sure you address all stories requested (states) - if time permits. The next task will deal with adding any additional logic that might be needing. For example, creating API requests, iterating through data, etc.

Implement the Proof of Concept

Take the proof of concept and add missing logic. This means take it from static and make it dynamic if it requires it. Build it to be modular, add comments and make sure the component is polished.

Design documents:

dashboard-manage-students
dashboard-manage-students-specs

@JacobSNGoodwin
Copy link
Contributor

@kvera001 and @lloan, are we breaking out the proof on concept and implementation into separate tasks or should I just operate from here and add this to in progress in the MVP project?

I can still work on it for now. But just trying to keep track of it.

-Guy who still knows nothing about project management

@JacobSNGoodwin
Copy link
Contributor

Also, I'm not sure where we want this page to sit. For now I guess anywhere, but so far the navigation system of the dashboard does not have any role awareness (ie, student vs teacher).

@JacobSNGoodwin
Copy link
Contributor

JacobSNGoodwin commented Mar 19, 2020

I basically made the design and have the checkboxes and course selection working (some of the callouts don't seem to match the appearance, so I can tweak if needed). Right now I just emit an method on props when manage, view, or delete is called.

I figure this methods will be handled at the page level and reset the component data.

https://github.com/inland-empire-software-development/spark/tree/122-manage-students

Right now I'll probably need some help writing queries to get students for a teacher. Right now I see a single teacher "2" in course_meta.

@lloan
Copy link
Member Author

lloan commented Mar 20, 2020

Checking this out - thanks!

@lloan
Copy link
Member Author

lloan commented Mar 20, 2020

@JacobSNGoodwin this looks great. Going to modify the DB to aid in this.

@JacobSNGoodwin
Copy link
Contributor

I just added a utility method in to the dashboard/students page to map the API data format to the format of the courses property of the ManageStudents component. We could do this in the API as well, it just depends on the architecture we want. Since we're not dealing with a large data set, I'm find with doing this as I have.

I also added basic handlers for clicking managing a user, viewing a user, and deleting a single or multiple users. The manage and view methods basically just push the route of the dynamic page for viewing and managing a student. If we know that path where we'll want these pages, I can update those handler methods quickly.

The main thing we need to do now is create an endpoint and db method for removing users from a course. We might want to think about whether this endpoint should return the courses, or if we should just await this call's completion and the refetch users.

If we want to be realllly fancy, we could use https://github.com/zeit/swr which is recommended for client side fetching in nextjs. This can be used to cache and update data. You can even update the students locally via the mutate, and then validate that with a background request to make sure the cache is valid (sort of an eager update).

After reviewing nextjs documention, I think it's best we handle fetching and removing users client side (currently @lloan set it up with client side fetching).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task scrum label
Projects
None yet
Development

No branches or pull requests

2 participants