-
Notifications
You must be signed in to change notification settings - Fork 42
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
Redesign of / page #964
Redesign of / page #964
Conversation
web/ts/api/courses.ts
Outdated
case "IRH102": | ||
return "https://nav.tum.de/room/5620.01.102"; | ||
default: | ||
return "#"; |
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.
I think this could be a better fallback (with importing fmt
):
return "#"; | |
return fmt.Sprintf("https://nav.tum.de/search?q=%s", this.Name); |
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.
IMO we should add a new field to the lecture_halls
table, e.g. string ExternalLink
instead of mapping them in the codebase.
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.
Agreed. Should we add the column in this PR or in a follow-up?
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.
Did it in this one. Ids don't necessarily have to be the same, I guess.
Here's the SQL insert statement:
update lecture_halls
set external_url = 'https://nav.tum.de/room/5602.EG.001'
where id = 1;
update lecture_halls
set external_url = 'https://nav.tum.de/room/5604.EG.011'
where id = 2;
update lecture_halls
set external_url = 'https://nav.tum.de/room/5606.EG.011'
where id = 3;
update lecture_halls
set external_url = 'https://nav.tum.de/room/5620.01.101'
where id = 4;
update lecture_halls
set external_url = 'https://nav.tum.de/room/5620.01.102'
where id = 5;
update lecture_halls
set external_url = 'https://nav.tum.de/room/5608.EG.038'
where id = 6;
update lecture_halls
set external_url = 'https://nav.tum.de/room/5613.EG.009A'
where id = 7;
update lecture_halls
set external_url = 'https://nav.tum.de/room/5607.EG.014'
where id = 9;
update lecture_halls
set external_url = 'https://nav.tum.de/room/5510.EG.001'
where id = 10;
update lecture_halls
set external_url = 'https://nav.tum.de/room/5510.02.001'
where id = 11;
Some nitpicks:
Thanks for the feedback! 💙 1 and 2 are test server related. The about, imprint, data privacy pages aren't stored in the database. The current semester is actually automatically selected if no Year/Term is specified, however, SS23 isn't in the database either 😅 The scroll bars are unfortunately only an issue on certain operating systems. For example, on MacOS the start page looks like: I will style the scroll bar to be invisible. Thanks for the catch! |
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.
I like this change (I am not qualified, this is why this is ony a comment not an aproval)
I have added some inline comments, but nothing major
This reverts commit 091529e.
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.
Amazing, looking forward to seeing this on prod :)
* Add temporary home route * minor changes * Update dropdown * Add basic structure * Minor ui changes * Add semesters api endpoint * Add current semester to api * Add livestream endpoint * Add users endpoint * Add my-courses view * Introduce views in ts * Clean up fetch function * Update public course api * Add live-today * Add recent-vod list * Update today and recent lecture ts * Add progress to start page videos * Add query params * Add ts routing * Clean up typescript * Update grid-cols * Merge endpoints * Add batch progress endpoint * Make browser undo work with js * Add data classes * Fix undo bug * Update Data classes * Add css classes * Update css * Add view to history * Test config * Fix un-logged-in errors * Remove old start page * Add init.js * Add nothing to do * Make notifications usable mobile * Add comments; Remove old index page files * Update ToggleableElement * Remove notifications from old header * update side navigation css * Remove unused function * Update TS directory structure * Add live thumbnails * Add correct navigtum urls * Add ts/api folder - Slim down home.ts * Add comment * Clean up handler * Add permissions for thumbnails * Hide scrollbars * Forgot the notification scroll bar ^ * Format css file * Add return after error * Remove unused variables * Clean up init.js * Remove icon code * Inline function * add dtos, fix loading of courses for lecturers * Revert "Remove old start page" This reverts commit 091529e. * restore old start page * use /new for new start page * allow thumbnails for vod * use gin.File for live thumbs * slightly modify video sizes and fix aspect ratio to 16/9 * Add server notifications * Add paginator * Add external_url to lecture hall model --------- Co-authored-by: Joscha Henningsen <joscha.henningsen@tum.de>
Motivation and Context
Redesign and reimplement the start page using best practices of Alpine, Tailwind, and TypeScript.
Description
x-data="json.stringify({{data}})"
!)views/
: Whole pages (used only once)components/
: Single UI Elements (used more than once, e.g. aheader
module)utilities/
: Reusable Classes, Functions, Enums, etc. that can be included in components and viewsapi/
: API-Wrappers, DTOs, objectsentry/
: Combination of views and components to bundle functionality as close as possibletools/pathprovider/pathprovider.go
to reduce code duplication and a place to put present and future file-path stuff.Help needed 🙋♂️
There is probably a better way to built multiple css files than my current approach. I simply appended another
npx
command to the existing one.❓Are there any changes needed in the production config (webpack)?
Potential follow-ups
I propose the following Follow-Ups in order to decrease the size of this PR:
Bookmarks
,VideoSections
) to separate file inapi/
.data-store/
api/
for examplesSteps for Testing
Head to
/
and click on everything you can in all the browsers you have installed.