WojtekTB / UCSD-Schedule-Visualizer

Chrome extension that creates a timetable of your WebReg classes and shows you where the class you are hovering over would fit in your schedule.
MIT License
5 stars 3 forks source link

Lecture Time is Bugging Out #7

Closed kungharrison closed 2 years ago

kungharrison commented 2 years ago

image Not sure if this is just an issue on my end but when previewing a class the discussion times are showing, but not the lecture times which would be more important to show, preferably showing both. The lecture times in the image above are not showing as the time slots on the very right are just the temp ones created.

WojtekTB commented 2 years ago

So the way it works now is that there is a separate event in each day named "Time Slot". What happens when you hover over a time is that it first sets all "Time Slot" events to be from 23:58 to 23:59 so that they are out of the way, and then again changes the times of the days you are hovering over to be in the correct time.

The reason you are seeing the events on the right now is that css changed and it no longer takes them off screen. We can either change the scope of the timeline so that they go off screen or we can delete them every time. I am of opinion that just moving the timeline to the right a little so that we no longer see them is probably the way to go so we do not have to change too much of the code.

ATM only the time you are hovering over gets rendered. For example if the class has both a Lecture and a Discussion times, only the one you are hovering over will be shown. This is just because of how the HTML of the page is set up it is a little tricky to figure out which two or three lines actually supposed to render together, and I did not want to try implementing it just to later find out that there are sometimes classes with three lines shows for example, which would break the code. I think that for now this is good enough for quick check purposes.

I am yet undecided how much more time should be put into this though since the smarter way to go about this is to figure out how to actually use the webreg API similar to this project someone linked to me and look up the exact class info from just the class id of the element, but I have not had the time to take a closer look into how it works yet.

tldr: we can fix the times showing on the right with css but for more thorough display of all the class times it would take more effort so putting this on the burner for now

WojtekTB commented 2 years ago

After thinking about it, a better solution might be to make a separate class for time slots that are not used that would hide them, so I think that is what I will do.