Conversation
Signed-off-by: Spandan Hota <spandanhota2005@outlook.com>
Signed-off-by: Spandan Hota <spandanhota2005@outlook.com>
Signed-off-by: Spandan Hota <spandanhota2005@outlook.com>
Signed-off-by: Spandan Hota <spandanhota2005@outlook.com>
Signed-off-by: Spandan Hota <spandanhota2005@outlook.com>
Signed-off-by: Spandan Hota <spandanhota2005@outlook.com>
Summary of ChangesHello @burgerphilic18, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request delivers a significant overhaul of the application's user interface, focusing on a fresh aesthetic and improved user experience. It introduces a flexible color theming system, a redesigned homepage, and a more structured profile management experience with dedicated settings. These changes aim to modernize the application's look and feel while enhancing navigation and personalization. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a major UI revamp, including a new homepage, redesigned profile and settings pages, and a new theming system with multiple color schemes. The changes are extensive and generally well-executed, moving towards a more modern and maintainable codebase. I've identified a few areas for improvement, mainly concerning maintainability, accessibility, and a potential bug in profile page navigation. My detailed comments are below.
| } | ||
| > | ||
|
|
||
| <Link to={`/profile/${user?.username}`}> |
There was a problem hiding this comment.
The link to the user's profile page assumes user.username is always available. If a user hasn't set their username yet, user.username can be null, which would create a broken link to /profile/null. The previous implementation had a fallback. A better approach would be to link to the profile settings page if the username is not set.
| <Link to={`/profile/${user?.username}`}> | |
| <Link to={user?.username ? `/profile/${user.username}` : "/settings/profile"}> |
| <div | ||
| className="fixed inset-0 z-10" | ||
| role="button" | ||
| tabIndex={0} | ||
| onClick={() => setIsOpen(false)} | ||
| onKeyDown={(e) => { | ||
| if (e.key === "Enter" || e.key === " " || e.key === "Escape") | ||
| setIsOpen(false); | ||
| }} | ||
| /> |
There was a problem hiding this comment.
For accessibility, the overlay div used to close the theme selector should have an aria-label to describe its purpose to screen reader users. Since it has a role="button", an accessible name is expected.
<div
className="fixed inset-0 z-10"
role="button"
tabIndex={0}
aria-label="Close theme selector"
onClick={() => setIsOpen(false)}
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " " || e.key === "Escape")
setIsOpen(false);
}}
/>
| root.classList.add(systemTheme); | ||
| return; | ||
| } | ||
| root.classList.remove("blue", "green", "purple", "orange", "teal"); |
There was a problem hiding this comment.
The list of theme class names to remove is hardcoded. This can lead to maintainability issues if themes are added or removed. It's better to have a single source of truth for the theme names and derive this list from it. You could create a shared file that exports the theme configurations, which would be used here and in mode-toggle.tsx.
| export const categories = [ | ||
| { | ||
| id: 1, | ||
| name: "General Discussion", | ||
| description: "Talk about anything college-related", | ||
| topics: 145, | ||
| posts: 2341, | ||
| color: "bg-secondary", | ||
| icon: React.createElement(MessageSquare, { className: "w-6 h-6" }), | ||
| }, | ||
| { | ||
| id: 2, | ||
| name: "Academics", | ||
| description: "Course discussions, study groups, and academic help", | ||
| topics: 89, | ||
| posts: 1205, | ||
| color: "bg-accent", | ||
| icon: React.createElement(BookOpen, { className: "w-6 h-6" }), | ||
| }, | ||
| { | ||
| id: 3, | ||
| name: "Campus Life", | ||
| description: "Events, clubs, housing, and campus activities", | ||
| topics: 112, | ||
| posts: 1876, | ||
| color: "bg-primary", | ||
| icon: React.createElement(Users, { className: "w-6 h-6" }), | ||
| }, | ||
| { | ||
| id: 4, | ||
| name: "Tech & Gaming", | ||
| description: "Technology discussions, gaming, and PC builds", | ||
| topics: 203, | ||
| posts: 3456, | ||
| color: "bg-secondary", | ||
| icon: React.createElement(Zap, { className: "w-6 h-6" }), | ||
| }, | ||
| { | ||
| id: 5, | ||
| name: "Marketplace", | ||
| description: "Buy, sell, and trade items with fellow students", | ||
| topics: 67, | ||
| posts: 892, | ||
| color: "bg-accent", | ||
| icon: React.createElement(ShoppingCart, { className: "w-6 h-6" }), | ||
| }, | ||
| ]; |
There was a problem hiding this comment.
There's an inconsistency in how icons are handled across the application. Here, you are storing fully-formed ReactElements by using React.createElement. However, in other places like mode-toggle.tsx, you are storing the component type (React.ElementType). Storing the component type is more flexible as it allows passing different props (like className or size) at the render site. I recommend consistently storing the component type.
For example, you could change this in mock.ts:
export const categories = [
{
// ...
icon: MessageSquare,
},
// ...
];And then use it in home.tsx like this:
const Icon = category.icon;
<Icon className="w-6 h-6" />| @tailwind base; | ||
| @tailwind components; | ||
| @tailwind utilities; | ||
| @custom-variant dark (&:is(.dark *)); |
There was a problem hiding this comment.
|
this is dope @burgerphilic18 🔥 |
|
@consoledotaman made his changes based on this PR branch, #45. this isn't required to be merged anymore |
This PR introduces a new homepage UI with new various color schemes. A redesigned profile page is also made and a separate settings page for the profile edits. CSS variables are divided separately for landing page and old variables are cleaned up.
UI Video
recording_2025-12-13_00.51.07.mp4