Skip to content

Conversation

@ankushkhakale
Copy link

Summary

This PR resolves the dark mode display issues affecting the Blog and Projects pages.
The previous implementation did not correctly apply dark theme styling across all components, leading to UI inconsistencies. This update ensures that dark mode now functions reliably and consistently throughout both pages.


Fix Details

Blog Page

  • Corrected missing or incorrect dark mode classes.
  • Updated background, text, and card styling to match global dark theme settings.
  • Ensured consistent visual hierarchy and contrast in dark mode.

Projects Page

  • Fixed dark mode compatibility for layout sections, cards, and text elements.
  • Applied global theme variables to ensure uniform styling.
  • Resolved mismatched colors and elements that remained in light mode.
Screenshot 2025-12-07 233735

Global Styling Adjustments

  • Synced dark mode behavior across shared components used in both pages.
  • Verified theme toggling logic to ensure state persistence and proper UI updates.

Testing

  • Tested theme switching on Blog and Projects pages.
  • Verified dark mode styles across mobile, tablet, and desktop views.
  • Confirmed that all UI elements now respond correctly to dark mode state changes.
  • Checked for regressions on other pages.

Additional Notes

  • No unrelated code was modified.
  • The fix aligns both pages with the project's established dark theme system.

Request

Please review and merge this PR into the main branch.

Thanks for giving me the opportunity to contribute.

Copilot AI review requested due to automatic review settings December 7, 2025 18:08
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 adds dark mode support to the Blog and Projects pages by applying Tailwind's dark mode utility classes throughout the components. The changes ensure that backgrounds, text, borders, and interactive elements properly adapt when dark mode is active.

Key Changes

  • Added dark mode variants (dark:*) to main containers, cards, text elements, borders, and interactive components
  • Ensured consistent color hierarchy using gray-900 for backgrounds, gray-800 for cards, and gray-300 for text
  • Applied dark mode styling to loading states, error states, filter buttons, and content sections

Reviewed changes

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

File Description
src/components/Projects/Projects.tsx Added comprehensive dark mode classes to main container, loading/error states, header text, filter controls, project cards, and all text elements
src/components/Blog/Blog.tsx Added dark mode support to main container, loading/error states, blog post cards, search input, filter buttons, community values section, and blog post detail view
package-lock.json Automated npm lockfile updates adding "peer": true flags to several dependencies (unrelated to dark mode functionality)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


return (
<div className="min-h-screen bg-gray-50 py-12">
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 py-12">
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

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

[nitpick] For consistency with other components in the codebase (Community, Challenges, Profile, etc.), consider adding transition-colors duration-300 to the main container div to provide smooth transitions when toggling dark mode.

Suggested change
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 py-12">
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 py-12 transition-colors duration-300">

Copilot uses AI. Check for mistakes.
if (selectedPost) {
return (
<div className="min-h-screen bg-gray-50 py-8">
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 py-8">
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

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

[nitpick] For consistency with other components in the codebase (Community, Challenges, Profile, etc.), consider adding transition-colors duration-300 to the main container div to provide smooth transitions when toggling dark mode.

Suggested change
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 py-8">
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 py-8 transition-colors duration-300">

Copilot uses AI. Check for mistakes.
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 py-12 flex items-center justify-center">
<div className="text-center">
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-purple-600 mx-auto mb-4"></div>
<p className="text-gray-600">Loading blog posts...</p>
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

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

The loading text should have a dark mode variant to ensure readability on dark backgrounds. Add dark:text-gray-300 to match the pattern used elsewhere in the component.

Suggested change
<p className="text-gray-600">Loading blog posts...</p>
<p className="text-gray-600 dark:text-gray-300">Loading blog posts...</p>

Copilot uses AI. Check for mistakes.

if (error) {
return (
<div className="min-h-screen bg-gray-50 py-12 flex items-center justify-center">
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

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

The error state container background is missing the dark mode class. Add dark:bg-gray-900 to the outer div to match the styling pattern used in the loading state and main content.

Suggested change
<div className="min-h-screen bg-gray-50 py-12 flex items-center justify-center">
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 py-12 flex items-center justify-center">

Copilot uses AI. Check for mistakes.
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 py-12 flex items-center justify-center">
<div className="text-center">
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-purple-600 mx-auto mb-4"></div>
<p className="text-gray-600">Loading projects...</p>
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

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

The loading text should have a dark mode variant to ensure readability on dark backgrounds. Add dark:text-gray-300 to match the pattern used elsewhere in the component.

Suggested change
<p className="text-gray-600">Loading projects...</p>
<p className="text-gray-600 dark:text-gray-300">Loading projects...</p>

Copilot uses AI. Check for mistakes.

if (error) {
return (
<div className="min-h-screen bg-gray-50 py-12 flex items-center justify-center">
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

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

The error state container background is missing the dark mode class. Add dark:bg-gray-900 to the outer div to match the styling pattern used in the loading state and main content.

Suggested change
<div className="min-h-screen bg-gray-50 py-12 flex items-center justify-center">
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 py-12 flex items-center justify-center">

Copilot uses AI. Check for mistakes.

return (
<div className="min-h-screen bg-gray-50 py-12">
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 py-12">
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

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

[nitpick] For consistency with other components in the codebase (Community, Challenges, Profile, etc.), consider adding transition-colors duration-300 to the main container div to provide smooth transitions when toggling dark mode.

Suggested change
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 py-12">
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 py-12 transition-colors duration-300">

Copilot uses AI. Check for mistakes.
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