-
Notifications
You must be signed in to change notification settings - Fork 24
Add the new home page #3906
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
base: main
Are you sure you want to change the base?
Add the new home page #3906
Conversation
3fe5c13 to
251dc07
Compare
front_end/src/app/(main)/(home)/new/components/future_eval_table.tsx
Outdated
Show resolved
Hide resolved
251dc07 to
e9e75f2
Compare
| # includes extra columns in the SELECT. ArraySubquery wraps the query in PostgreSQL's ARRAY() | ||
| # which requires exactly one column. Querying the through table with a direct FK lookup | ||
| # generates a clean single-column SELECT. | ||
| ThroughModel = Post.projects.through |
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.
But what about default_project? We don't duplicate default project of the post into ThroughModel table
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.
Strictly for this usecase of getting the top posts for a category, this is not needed. But I agree, it's not nice that this annotation is on the projects general QS and should use the default_project too, but I have not managed to get that working, so I need some help.
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.
Important! I see that the homepage isn’t very dynamic or personalized, but it does make a lot of backend requests and is used frequently. Maybe we should consider caching it entirely, say for 15 minutes?
front_end/src/app/(main)/(home)/new/components/why_metaculus.tsx
Outdated
Show resolved
Hide resolved
front_end/src/app/(main)/(home)/new/components/why_metaculus.tsx
Outdated
Show resolved
Hide resolved
front_end/src/app/(main)/(home)/new/components/tournaments_section.tsx
Outdated
Show resolved
Hide resolved
front_end/src/app/(main)/(home)/new/components/research_and_updates.tsx
Outdated
Show resolved
Hide resolved
| @@ -0,0 +1,557 @@ | |||
| "use client"; | |||
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.
Do we really need "use client" here?
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.
The component is dynamic - it can load different questions depending on the tab user chose, so yes, I believe we need it.
front_end/src/app/(main)/(home)/new/components/homepage_forecasts.tsx
Outdated
Show resolved
Hide resolved
| @@ -0,0 +1,170 @@ | |||
| "use client"; | |||
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.
Check if this is really needed
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.
It's an interactive component, the user can expand the table
…namentsSection components
…nts" This reverts commit 931a4bd.
9f98619 to
935476c
Compare
935476c to
ebfd1ea
Compare
Figma Link here: https://www.figma.com/design/9N8DIIhfRt6ADzpZrRCBxS/Homepage?node-id=5267-13700&m=dev
Sadly, it's a very large PR, but it is separated into smaller commits which are easier to be reviewed independently