Skip to content

Conversation

@elisescu
Copy link
Contributor

@elisescu elisescu commented Dec 11, 2025

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

# 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
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

@hlbmtc hlbmtc Dec 12, 2025

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?

@@ -0,0 +1,557 @@
"use client";
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@@ -0,0 +1,170 @@
"use client";
Copy link
Contributor

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

Copy link
Contributor Author

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

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.

6 participants