Skip to content

Conversation

@Debatreya
Copy link
Member

This pull request includes significant updates to the app/[locale]/director-message/page.tsx file, focusing on adding new components and improving the page layout for the Director's message and office information.

Key Changes:

New Components and Constants:

Page Layout Enhancements:

New Card Component:

  • Introduced a new Card component to encapsulate the layout and styling of individual cards for the Director and office members. This component includes props for image, name, designation, and contact details, and ensures a consistent presentation across the page. (app/[locale]/director-message/page.tsxR212-R277)

@Debatreya Debatreya requested a review from Copilot April 16, 2025 20:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment on lines 248 to 250
height={0}
src={imageSrc}
width={0}
Copy link

Copilot AI Apr 16, 2025

Choose a reason for hiding this comment

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

The Next/Image component is specified with height and width set to 0, which may prevent proper image rendering. Consider providing appropriate non-zero dimensions or using a layout strategy (like 'fill') to ensure the image displays correctly.

Suggested change
height={0}
src={imageSrc}
width={0}
layout="intrinsic"
src={imageSrc}

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not faulty. This card component is taken from the faculty page cards.

@som-04
Copy link
Contributor

som-04 commented Apr 18, 2025

image

the content inside must not overflow

@som-04
Copy link
Contributor

som-04 commented Apr 18, 2025

image
the image must cover the whole bg like this.

image
not like this

Do this by keeping image outside the container refer app/[locale]/notifications.tsx to see how it's done there.

Copy link
Contributor

@aryansri-19 aryansri-19 left a comment

Choose a reason for hiding this comment

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

Responsiveness is a little distorted. Fix that.

<section
className="container"
style={{
backgroundImage: `linear-gradient(rgba(249, 245, 235, 1) 0%, rgba(249, 245, 235, 0.85) 85%, rgba(249, 245, 235, 1) 100%)`,
Copy link
Contributor

Choose a reason for hiding this comment

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

there is no bg-image behind other officers

@Debatreya
Copy link
Member Author

@som-04 sir, another review please

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the Director's Message page by adding new components and constants and enhancing the overall page layout. Key changes include importing new assets and icons, defining constants for the Director and office cards, and introducing a new Card component to unify card presentation across the page.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
package.json Added new dependency "yarn" to support additional tooling or workflow
app/[locale]/director-message/page.tsx Added constants for director and office cards, incorporated new background images, and implemented a new Card component for displaying director and office information

Comment on lines 253 to 255
height={0}
src={imageSrc}
width={0}
Copy link

Copilot AI May 28, 2025

Choose a reason for hiding this comment

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

Using height={0} (and width={0} on line 255) with next/image may prevent proper image rendering. Consider providing explicit dimensions or using fill if responsive sizing is intended.

Suggested change
height={0}
src={imageSrc}
width={0}
fill
src={imageSrc}

Copilot uses AI. Check for mistakes.
// DIRECTOR's OFFICE
const directorOfficeCards = [
{
image: `${getS3Url()}/assets/office.jpeg`,
Copy link

Copilot AI May 28, 2025

Choose a reason for hiding this comment

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

[nitpick] The directorOfficeCards array includes multiple entries with identical data. If these are placeholders, please add a comment clarifying; otherwise, consider providing unique details to improve maintainability.

Copilot uses AI. Check for mistakes.
Copy link
Member

@GetPsyched GetPsyched left a comment

Choose a reason for hiding this comment

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

A few bits of advice on general foot-guns to avoid.

Comment on lines 175 to 183
<article className="w-full">
<p className="text-lg max-md:rounded-t md:w-full md:rounded-r ">
{text.message.slice(0, 7).map((message, index) => (
<span key={index} className="mb-5 block">
{message}
</span>
))}
</p>
</article>
Copy link
Member

Choose a reason for hiding this comment

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

This bit is repeated 3 times; I'm assuming this is for responsiveness. Responsiveness should absolutely not warrant writing the same HTML multiple times over, it should only be manipulated using media queries (tailwindcss acting as a wrapper over said media queries here).

HTML defines the structure of what's to be rendered, and CSS defines how to render it.

There can be cases where the design on a certain width looks so wildly different from another width that you can break this rule, but it doesn't look justified here at all.

Copy link
Member

Choose a reason for hiding this comment

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

Okay, I missed the slice(0, 7) stuff here. This is bad, not your code, but the structure of text.message in the i18n files. @som-04 why was the message a list? Was it to divide in different paragraphs?

Copy link
Contributor

@som-04 som-04 May 31, 2025

Choose a reason for hiding this comment

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

yes, the message is divided into paragraphs so each para is a list element, was done to avoid any repetitive lines.

Copy link
Member

Choose a reason for hiding this comment

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

Which other page is this used in? Because here it's being spliced into 3 blocks instead of like 10 that the i18n list has

Copy link
Contributor

@som-04 som-04 May 31, 2025

Choose a reason for hiding this comment

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

oh my bad, even lines containing words like 'Jai Hind' and Director's name were added to message array, so certain indexes were accessed separately in other lines.

Also, the formatting of the message wasn't entirely uniform in the old website (the design followed at that time), so 3 blocks were used; as the 2nd block, The logo of NIT KKR, has a Motto which reads as follows... “Shramaye Anavarat chesta cha” is centered.

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