Skip to content

Keyfeatures section in the middle of the screen #61

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

maishivamhoo123
Copy link

Closes #60

πŸ“ Description

Screenshot 2025-04-15 231927

πŸ”§ Changes Made

πŸ“· Screenshots or Visual Changes (if applicable)

🀝 Collaboration

Collaborated with: @username (optional)

βœ… Checklist

  • I have read the contributing guidelines.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if applicable).
  • Any dependent changes have been merged and published in downstream modules.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Hello @maishivamhoo123, 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!

Summary of Changes

This pull request addresses issue #60 and aims to improve the user interface and overall user experience of the application. The primary focus is on the BasicDetails.jsx page, where the layout and styling of form elements have been enhanced. Additionally, the theme toggle functionality has been streamlined, and the ThemeProvider has been updated to simplify theme management. The key features section on the homepage has also been modified to improve the layout.

Highlights

  • UI Enhancement: The BasicDetails.jsx page has undergone significant UI improvements, including better color theming, label adjustments, and overall form element styling to provide a more visually appealing and user-friendly experience.
  • Theme Toggle Simplification: The ModeToggle component has been refactored to use a simpler implementation, directly toggling between light and dark themes instead of using a dropdown menu. This provides a more intuitive user experience.
  • ThemeProvider Update: The ThemeProvider component has been updated to streamline theme management, using a simplified context and useEffect hook to apply and persist the selected theme.
  • Key Features Section Layout: The key features section on the homepage has been modified to improve the layout and responsiveness of the content.
  • Form Reset Functionality: Added a reset form functionality to the BasicDetails page, allowing users to clear the form and start over.

Changelog

Click here to see the changelog
  • Frontend/src/components/mode-toggle.jsx
    • Refactored the ModeToggle component to directly toggle between light and dark themes using a button click instead of a dropdown menu.
    • Removed the DropdownMenu and related components, simplifying the theme selection process.
    • Updated the component to use the theme value from useTheme hook to determine which icon to display (Sun or Moon).
  • Frontend/src/components/theme-provider.jsx
    • Simplified the ThemeProvider component by using a basic context for theme management.
    • Removed the 'system' theme option and directly toggled between 'light' and 'dark' themes.
    • Updated the useEffect hook to toggle the 'dark' class on the document element based on the current theme.
    • Modified the initial theme state to default to 'light' if no theme is stored in localStorage.
  • Frontend/src/index.jsx
    • Wrapped the App component with the ThemeProvider to provide theme context to the entire application.
  • Frontend/src/pages/BasicDetails.jsx
    • Added new imports for React, useState, and useEffect.
    • Added Target icon from lucide-react.
    • Added reset form functionality.
    • Updated labels with sky-500 color.
    • Updated select components with white text color and blue-100 background color.
    • Updated social media labels with appropriate colors.
    • Updated Inpact text color to sky-500.
    • Updated check icon color to sky-500.
    • Updated button text color to white-500.
    • Added onClick handler to reset form button.
  • Frontend/src/pages/HomePage.jsx
    • Modified the key features section to improve the layout and responsiveness of the content.
Using Gemini Code Assist

The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and 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 to provide feedback.

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.


A button click,
A theme now switches quick,
Dark to light we see.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request introduces several changes to the frontend, including updates to the mode toggle, theme provider, and basic details page. The changes are generally well-structured and improve the user interface. However, there are a few areas that could be improved, such as simplifying the mode toggle logic and ensuring consistent color customization.

Summary of Findings

  • Mode Toggle Logic: The mode toggle logic in Frontend/src/components/mode-toggle.jsx could be simplified by directly toggling between 'light' and 'dark' themes based on the current theme.
  • ThemeProvider Context: The ThemeProvider in Frontend/src/components/theme-provider.jsx can be simplified by directly toggling the 'dark' class on the document element and storing the theme in local storage.
  • Color Customization: The color customization in Frontend/src/pages/BasicDetails.jsx could be improved by using a consistent color palette and naming conventions.
  • Form Reset Functionality: The form reset functionality in Frontend/src/pages/BasicDetails.jsx is a good addition, but it could be enhanced by providing visual feedback to the user after the form is reset.
  • Container Class: The container class in Frontend/src/pages/HomePage.jsx is being applied twice, which is unnecessary.

Merge Readiness

The pull request is not yet ready for merging. There are several issues that need to be addressed before merging, including simplifying the mode toggle logic, ensuring consistent color customization, and removing the duplicate container class. I am unable to approve this pull request, and recommend that others review and approve this code before merging.

Comment on lines +8 to +15
export function ThemeProvider({ children, storageKey = "vite-ui-theme" }) {
const [theme, setTheme] = useState(() => localStorage.getItem(storageKey) || "light");

useEffect(() => {
const root = window.document.documentElement

root.classList.remove("light", "dark")

if (theme === "system") {
const systemTheme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"

root.classList.add(systemTheme)
return
}

root.classList.add(theme)
}, [theme])

const value = {
theme,
setTheme: (theme) => {
localStorage.setItem(storageKey, theme)
setTheme(theme)
},
}
const root = document.documentElement;
root.classList.toggle("dark", theme === "dark");
localStorage.setItem(storageKey, theme);
}, [theme]);

Choose a reason for hiding this comment

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

medium

The ThemeProvider can be simplified by directly toggling the 'dark' class on the document element and storing the theme in local storage. This eliminates the need for the conditional logic to remove and add classes.

  const [theme, setTheme] = useState(() => localStorage.getItem(storageKey) || "light");

  useEffect(() => {
    const root = document.documentElement;
    root.classList.toggle("dark", theme === "dark");
    localStorage.setItem(storageKey, theme);
  }, [theme]);

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.

Aligning the Key features section in middle
1 participant