ucsb-cs156-s24 / proj-organic-s24-5pm-2

https://ucsb-cs156-s24.github.io/proj-organic-s24-5pm-2/
0 stars 0 forks source link

EPIC: Refactor Course create/edit to use dropdown for schools #2

Closed github-actions[bot] closed 4 months ago

github-actions[bot] commented 5 months ago

Discussion

If you go to the course page, and click create you will see a field where you can enter school for the course.

However, we also have a place where we enter information about schools. We don't want users to be able to put "just anything" in the schools field like they can now. Instead, they should have a dropdown menu with just the schools that have already been entered into the system. School values are things like UCSB, WSU, OSU, UW-Hilo, etc.

What we want is to "get all" schools from the schools API, build a drop down menu from those results, and use that select from all the already created schools when creating or editing a course.

Acceptance Criteria

Implementation Todos

First Issue: Just create the React component for the dropdown for schools.

You can look and learn how to create and implement the dropdown from https://courses.dokku-00.cs.ucsb.edu/. As you can see if you hover over the quarter you can see the drop-down list. You can use the storybook to explore how these dropdown work.

There are also other drop downs, such as the one in the model for personal schedules, that are populated from lists (this is more like what you are bulding.)

In this first issue, JUST focus on creating that one React component, along with fixtures for the schools, storybook story, and tests. You'll then use it later when refactoring the form.

Second issue: refactor the form for creating/editing courses to use the dropdown menu instead of a free form text field.

You can go to the courses repo and see how the dropdown is used on the modal for adding courses to a personal schedule, or when searching for courses.