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

Assignment submission by Jie Li #4

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
16 changes: 8 additions & 8 deletions REQUIREMENTS.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# Requirements

## Core
- [ ] An text box on the page that can be used to filter based on the name of a school. When the value of this text box changes, only schools that have the value as a substring of their name should be shown on the map and in the list.
- [X] An text box on the page that can be used to filter based on the name of a school. When the value of this text box changes, only schools that have the value as a substring of their name should be shown on the map and in the list.

**The `input` element should be available on the global `window` object as a variable named `window.schoolNameFilter`.**

- [ ] A set of checkboxes that can be used to filter based on the grades (K-12) served at a school. When a box is checked, only schools that serve the corresponding grade should be shown on the map. (_You can alternatively choose to include filters for grade levels. If you do, only include options for Elementary, Middle, High, and Transition/Overage -- not, for example, `Elementary-Middle`_).
- [X] A set of checkboxes that can be used to filter based on the grades (K-12) served at a school. When a box is checked, only schools that serve the corresponding grade should be shown on the map. (_You can alternatively choose to include filters for grade levels. If you do, only include options for Elementary, Middle, High, and Transition/Overage -- not, for example, `Elementary-Middle`_).

**An array of `input` elements should be available on the global `window` object as a variable named `window.schoolGradeFilters` (or `window.schoolLevelFilters` if using school levels instead of grades).**

- [ ] A marker should be present on the map for each school that meets the current filter criteria, and no markers should be present for schools that _do not_ meet the filter criteria.
- [X] A marker should be present on the map for each school that meets the current filter criteria, and no markers should be present for schools that _do not_ meet the filter criteria.

**The Leaflet Map object that represents the map on the page should be available on the global `window` objects as a variable named `window.schoolMap`.**

- [ ] A list item should be present in the schools list for each school that meets the current filter criteria, and no list items should be present for schools that _do not_ meet the filter criteria. List items should contain at least:
- [X] A list item should be present in the schools list for each school that meets the current filter criteria, and no list items should be present for schools that _do not_ meet the filter criteria. List items should contain at least:
- School name
- Grades served

**The element represeting the list (i.e. the `ul` or `ol`) should be available on the global `window` object as a variable named `window.schoolList`.**
**The element representing the list (i.e. the `ul` or `ol`) should be available on the global `window` object as a variable named `window.schoolList`.**

## Stretch 1: Selecting Schools

- [ ] When you click on a school in the list or map, the school should be highlighted. The corresponding school in the map or list should also be highlighted.
- [X] When you click on a school in the list or map, the school should be highlighted. The corresponding school in the map or list should also be highlighted.

- [ ] When a school is highlighted, that school's catchment area should be shown on the map. If the school is not a neighborhood school (i.e., doesn't have a catchment), then the outline of the city should be shown.
- [X] When a school is highlighted, that school's catchment area should be shown on the map. If the school is not a neighborhood school (i.e., doesn't have a catchment), then the outline of the city should be shown.

## Stretch 2: Comparing Schools

- [ ] When a school is highlighted, it should be added to a table where multiple schools can be campared side-by-side.
- [X] When a school is highlighted, it should be added to a table where multiple schools can be campared side-by-side.

## Stretch 3: Sharing School Selections

Expand Down
Loading