Skip to content

Conversation

@IllGive
Copy link
Contributor

@IllGive IllGive commented Sep 5, 2023

See linked issue

Added setting to choose how many schedules to show on the homepage, and added a show more schedule button

@IllGive IllGive self-assigned this Sep 5, 2023
@vercel
Copy link

vercel bot commented Sep 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
coursify ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 7, 2023 2:47am

@IllGive IllGive linked an issue Sep 5, 2023 that may be closed by this pull request
3 tasks
@IllGive IllGive added feature improvement builds on existing features low prio Doesn't meaningfully impact a users experience bite sized feature labels Sep 5, 2023
Copy link
Contributor

@quick007 quick007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few things:

First off, we have a pr template for a reason. it makes it significantly harder to review your code and harder to catch things that were changed, especially when I have to go back and ask you after them in a later pr.

when set to 0 schedules, the classes should extend across
image

didn't catch this in ur last pr, but please change the way these these dates are displayed here:
image
that overflow looks really weird, and the calendar day isn't all that important for a user. What if you did this?
image

also btw idk if this was actually finished, but please make this a draft if it wasn't

Comment on lines +160 to +172
<DropdownSection
name="Number of schedules to show"
description="Choose how many days of schedules to show on your homepage. By default we show two."
currentValue={
numberOfSchedulesToShow.find(
(theNumber) => theNumber.id == settings.schedulesToShow
)!
}
values={numberOfSchedulesToShow}
onChange={(value) =>
set({ schedulesToShow: value.id as Settings["schedulesToShow"] })
}
/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for some reason the dropdown section isn't always to the right

homepageAssignments: "all" | "student" | "none";
homepageView: "auto" | "tabbed" | "student" | "teacher";
showAMPM: boolean;
schedulesToShow: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7";
Copy link
Contributor

@quick007 quick007 Sep 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for future reference, it might be easier to use an enum or normal numbers, but this works just as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tried that, turns out that settings wanted strings and I was too tired to deal with it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, my bad then

Comment on lines +161 to +191
{schedules.length > 2 && !showMoreSchedules && (
<Button
className="justify-center max-lg:hidden"
onClick={() => setShowMoreSchedules(true)}
>
Show More Schedules
</Button>
)}
{showMoreSchedules && (
<div className="max-lg:hidden">
{schedules.slice(2).map((schedule, index) => (
<div key={index} className="w-full md:mr-4 lg:mr-0">
<h2 className="title mr-2">
{dateFormat.format(schedule.date)}
</h2>

<ScheduleComponent
classes={classes}
schedule={schedule.schedule}
loading={loading}
/>
</div>
))}
<Button
className="justify-center"
onClick={() => setShowMoreSchedules(false)}
>
Show Fewer Schedules
</Button>
</div>
)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple issues with this button:

  • it disappears on smaller screen sizes
  • if you select more than 2 schedules in settings, this button appears. If I'm a student and want to see 3 schedules on my homescreen, why would I want to have to click this every single time

let's remove this for now, or at least find a better way to implement it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that's what you wanted....

k. should have been draft though, ur right

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, my bad. probably should've discussed this one more

<section
id="Schedule"
className="flex grow flex-col md:flex-row lg:ml-10 lg:flex-col"
className="flex grow flex-col md:flex-row lg:ml-10 lg:flex-col max-lg:"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you add max-lg here

@IllGive IllGive marked this pull request as draft September 7, 2023 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bite sized feature feature improvement builds on existing features low prio Doesn't meaningfully impact a users experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Schedule Changes

4 participants