Skip to content

Feat/test new design #29

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 9 commits into
base: main
Choose a base branch
from
Open

Feat/test new design #29

wants to merge 9 commits into from

Conversation

fwextensions
Copy link
Contributor

Use Tailwind to style the new design for the homepage in /beta.

Add BigText.astro to handle the sections with alternating large text.
Fix color style in TagOrnament.astro.
Add paragraph spacing.
Use fragments to pass in the BigText contents.
Add multiple weights of Barlow and Barlow Condensed.
Remove style block from BaseLayout.astro.
Use BigText for the news and code summary headers.
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 @fwextensions, 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 introduces a new design for the homepage in the /beta directory, utilizing Tailwind CSS for styling. It includes configuration changes to integrate Tailwind into the Astro project, addition of a tag ornament SVG, and new components to structure the homepage content.

Highlights

  • Tailwind CSS Integration: The pull request integrates Tailwind CSS into the Astro project for styling the new homepage design. This involves installing the @tailwindcss/vite package and configuring it in astro.config.mjs.
  • New Homepage Components: Several new Astro components are added to structure the homepage content, including BigText, Card, CodeSummary, NewsSummary, HackNightHero, NavLink, and TagOrnament.
  • Global CSS and Styling: A global.css file is created to define base styles and CSS variables, and it's imported into the BaseLayout.astro layout.

Changelog

Click here to see the changelog
  • astro.config.mjs
    • Added @tailwindcss/vite as a plugin to integrate Tailwind CSS.
    • Configured vite to handle CSS modules.
  • package-lock.json
    • Added @tailwindcss/vite and tailwindcss as dependencies.
    • Updated various other dependencies.
  • package.json
    • Added @tailwindcss/vite and tailwindcss as devDependencies.
  • src/assets/icons/tag-ornament.svg
    • Added a new SVG file for a tag ornament icon.
  • src/layouts/BaseLayout.astro
    • Imported global.css to apply global styles.
  • src/pages/beta/_components/BigText.astro
    • Created a new component for displaying large text with optional ornament.
  • src/pages/beta/_components/Card.astro
    • Created a new component for displaying cards with title, body, and link.
  • src/pages/beta/_components/CodeSummary.astro
    • Created a new component to summarize code-related activity using GitHub Events.
  • src/pages/beta/_components/FooterNav.astro
    • Created a new component for the footer navigation.
  • src/pages/beta/_components/GitHubEvents/GitHubEventCard.tsx
    • Created a React component to display a single GitHub event as a card.
  • src/pages/beta/_components/GitHubEvents/GitHubEvents.tsx
    • Created a React component to fetch and display GitHub events.
  • src/pages/beta/_components/GitHubEvents/getRecentEvents.tsx
    • Created a function to fetch recent GitHub events from an organization.
  • src/pages/beta/_components/GitHubEvents/icons.tsx
    • Created React components for the left and right arrow icons.
  • src/pages/beta/_components/HomeSection.astro
    • Created a new component for structuring sections on the homepage.
  • src/pages/beta/_components/NewsSummary.astro
    • Created a new component to summarize recent news articles.
  • src/pages/beta/_components/NewsSummaryItem.astro
    • Created a new component to display a single news summary item.
  • src/pages/beta/_components/TagOrnament.astro
    • Created a new component to render the tag ornament icon.
  • src/pages/beta/_layouts/BaseLayout.astro
    • Created a new base layout for beta pages, including metadata and global styles.
  • src/pages/beta/index.astro
    • Implemented the new homepage design using the new components.
  • src/react/GitHubEvents/GitHubEventCard.module.css
    • Removed CSS module file, styles are now in tailwind.
  • src/styles/global.css
    • Created a global CSS file to define base styles and CSS variables.
  • tailwind.config.js
    • Configured Tailwind CSS, including theme extensions.
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.


With Tailwind's breeze,
The homepage finds its ease,
A modern design.

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

This pull request introduces a significant redesign of the homepage using Tailwind CSS and React components. The changes appear well-structured and should improve the overall user experience. However, it's important to thoroughly test the new design for responsiveness, accessibility, and performance.

Summary of Findings

  • Tailwind CSS Integration: The pull request successfully integrates Tailwind CSS for styling the homepage, which should improve maintainability and consistency. However, verify that all existing styles are migrated and that the new styles are responsive and accessible.
  • React Components and Client-Side Rendering: The pull request introduces React components with client-side rendering for dynamic content. Ensure that the components are properly encapsulated and that data fetching and error handling are implemented correctly.
  • Component Structure and Reusability: The pull request introduces new components such as BigText, Card, and GitHubEvents. Ensure that these components are designed for reusability and that their props are well-defined and documented.

Merge Readiness

The pull request is not yet ready for merging. There are several medium severity issues that need to be addressed before merging. I am unable to approve this pull request, and I recommend that the pull request not be merged until these issues are addressed and that others review and approve this code before merging.

Comment on lines +44 to +46
plugins: [
tailwindcss()
]

Choose a reason for hiding this comment

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

medium

Consider adding a comment explaining why Tailwind CSS is being added as a plugin. This can help future developers understand the purpose of this configuration.

    plugins: [
      tailwindcss() // Integrate Tailwind CSS for styling
    ]

Comment on lines +82 to +87
h2, h3, h4 {
:global(b) {
color: var(--color-sf-red);
font-weight: inherit;
}
}

Choose a reason for hiding this comment

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

medium

Consider using Tailwind CSS classes directly instead of global styles to manage the color and font weight of the b tag. This would align better with the overall styling approach of the project.

  h2, h3, h4 {
    :global(b) {
      @apply text-[var(--color-sf-red)] font-semibold; /* Tailwind classes */
    }
  }

Comment on lines +33 to +39
// This relies on DOM manipulation, which might be less ideal in Astro/React.
// Consider passing a callback prop or using state management to hide the section.
const section = sectionID ? document.getElementById(sectionID) : null;

if (section) {
section.style.display = "none";
}

Choose a reason for hiding this comment

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

medium

Relying on direct DOM manipulation within a React component is generally discouraged. Consider using state management or a callback prop to communicate the error to the parent component and control the visibility of the section. This would make the component more reusable and easier to test.

  const handleError = () => {
    // Use state to control visibility
    setIsError(true);
  };

  return (
    <ErrorBoundary onError={handleError} fallback={null}>
      {!isError && (
        <Suspense fallback={<Loader />}>
          <GitHubEventsList eventsPromise={eventsPromise} />
        </Suspense>
      )}
    </ErrorBoundary>
  );

Copy link

🚀 Preview URL

https://pr-29.sfcivictech-pr-builds.pages.dev

Last updated: 2025-04-14T04:52:52Z

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.

1 participant