-
Notifications
You must be signed in to change notification settings - Fork 43
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
Course page updates #1122
Course page updates #1122
Conversation
Your Testserver will be ready at https://1122.test.live.mm.rbg.tum.de in a few minutes. Logins
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Some neat tricks with the smart array! Just a small remark.
web/ts/components/course.ts
Outdated
@@ -137,6 +135,10 @@ export function courseContext(slug: string, year: number, term: string, userId: | |||
dropdown.toggle(false); | |||
}, | |||
|
|||
getMonthName(m: number): string { | |||
return Intl.DateTimeFormat("locale", { month: "long" }).format(new Date(m)); // January |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work for me, I always get "January" or sometimes the error "date value is not finite in DateTimeFormat.format()"
Maybe we should keep it simple like this, since we don't localize anyway?
return Intl.DateTimeFormat("locale", { month: "long" }).format(new Date(m)); // January | |
return ["January", "February", "March", "April", "May", "June", | |
"July", "August", "September", "October", "November", "December" | |
][m-1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* Add smart array * Add GroupedSmartArray * Update groupedsmartarray * Add sorting * Fix variable vod title length due to ellipsis button * Update grid sizing * Lint * Add ts-ignore * Fix lint (2) * Fix lint (3) * Lint * Lint please work * Lint :-) * Fix download * Update getMonthName
Motivation and Context
Improve usability of the course page.
& Resolve #1090 for new UI
Description
Steps for Testing
Prerequisites: