iOlivers / BrockTimeTable

3 stars 0 forks source link

[TASK] Add Autocomplete to Course Selector #2

Open condyl opened 2 weeks ago

condyl commented 2 weeks ago

I feel like it would be nice to add some sort of autocomplete (preferably using some component library, so we don't need to implement it ourselves). This would be both nice visually, and would be very convenient for users. I assume most users will be first year students, that don't know how to make their own timetable or register for courses.

After a very short search, I would use a component like autocomplete or a combobox, which seems to be available in most component libraries.

EDIT: Since we've pretty much committed to using MaterialUI, we should be using it's autocomplete component.

The Idea

Implementing something like this would require being able to easily get the course code of all the courses being offered in a term. My idea is to update updater.js (private repo) to save all course departments, and all the course codes in a given department, to a file such as TimeTableIndex.json. This file should store data in a format like this:

{
    'COSC': [
        '1P02',
        '1P03',
        '1P50',
        '1P71',
        '2P03',
        ...
    ],
    'MATH': [
        '1P12',
        '1P66,
        '1P67',
        '1P98',
        ...
    ]
}

This data should only be loaded once the user has selected a term (because some classes aren't offered every term).