Skip to content

Conversation

@jordan-smith721
Copy link
Collaborator

Adds an "Aggregations" page to display the information from the agg endpionts. Also updates the python server code to create a new index on the comments db to avoid timeouts.

Copy link
Collaborator

@cbullinger cbullinger left a comment

Choose a reason for hiding this comment

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

overall lgtm. a couple visual nits and we're missing accessibility options (e.g. table captions)

const yearData = yearResult.status === 'fulfilled' ? yearResult.value : { success: false, error: 'Failed to fetch year data' };
const directorsData = directorsResult.status === 'fulfilled' ? directorsResult.value : { success: false, error: 'Failed to fetch directors data' };

console.log('Aggregations SSR: Data fetch completed', {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
console.log('Aggregations SSR: Data fetch completed', {
if (process.env.NODE_ENV === 'development') {
console.log('Aggregations SSR: Data fetch completed', {
}

Comment on lines 40 to 42
fetchMoviesWithComments(5),
fetchMoviesByYear(),
fetchDirectorStats(15)
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we move these to constants?

Comment on lines 87 to 88
{movie.recentComments?.slice(0, 2).map((comment, index) => (
<div key={index} className={styles.comment}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
{movie.recentComments?.slice(0, 2).map((comment, index) => (
<div key={index} className={styles.comment}>
key={`${movie._id}-${comment.date}-${index}`}

@@ -0,0 +1,182 @@
import React from 'react';
import { fetchMoviesWithComments, fetchMoviesByYear, fetchDirectorStats } from '../lib/api';
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we also import MovieWithComments, YearlyStats, and DirectorStats?

max-width: 1200px;
margin: 0 auto;
padding: 2rem;
font-family: var(--font-system);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm getting a "Cannot resolve '--font-system' custom property " error in my IDE here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated to use actual fonts


.year {
font-weight: 600;
color: #3498db;
Copy link
Collaborator

Choose a reason for hiding this comment

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

the blue here indicates a clickable link to me. can we make it a header column instead (i.e. the same dark blue/white text that the header row has?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Took away the color and I think it looks good just bolded a bit so left it at that


.rank {
font-weight: 700;
color: #e74c3c;
Copy link
Collaborator

Choose a reason for hiding this comment

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

same with the rank -- is there a different styling we can do that doesn't solely rely on text color?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed color

@jordan-smith721 jordan-smith721 merged commit 55b7c65 into mongodb:development Nov 6, 2025
3 checks passed
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.

2 participants