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

Course page updates #1122

Merged
merged 18 commits into from
Aug 22, 2023
Merged

Course page updates #1122

merged 18 commits into from
Aug 22, 2023

Conversation

MatthiasReumann
Copy link
Collaborator

@MatthiasReumann MatthiasReumann commented Aug 16, 2023

Motivation and Context

Improve usability of the course page.
& Resolve #1090 for new UI

Description

  • Group course streams by month
  • Fix changing of title width if context menu becomes visible

Steps for Testing

Prerequisites:

  • 1 Account
  • 1 Course
  1. Log in
  2. Navigate to the course page
  3. Click and Test

@github-actions
Copy link

Your Testserver will be ready at https://1122.test.live.mm.rbg.tum.de in a few minutes.

Logins
Kurs1 Kurs2 Kurs3 Kurs4
public public loggedin enrolled
prof1 prof1 prof2 prof1
prof2
student1
student2
student3
student1
student2
student2
student3
student1
student2

@MatthiasReumann MatthiasReumann marked this pull request as ready for review August 21, 2023 08:01
@MatthiasReumann MatthiasReumann changed the title UI/course page update Course page updates Aug 21, 2023
Copy link
Member

@joschahenningsen joschahenningsen left a 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.

@@ -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
Copy link
Member

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?

Suggested change
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];

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yup, agree.

Copy link
Member

@joschahenningsen joschahenningsen left a comment

Choose a reason for hiding this comment

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

Thanks!

@joschahenningsen joschahenningsen merged commit a470e12 into dev Aug 22, 2023
8 checks passed
@joschahenningsen joschahenningsen deleted the ui/course-page-update branch August 22, 2023 13:10
SebiWrn pushed a commit that referenced this pull request May 7, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(old ui) Download button on course page not working
2 participants