Skip to content

fix(ui): add dark theme visibility to Newsletter component text#5399

Merged
princerajpoot20 merged 1 commit into
asyncapi:website-uifrom
sammy200-ui:website-ui-newsletter-dark-theme
May 12, 2026
Merged

fix(ui): add dark theme visibility to Newsletter component text#5399
princerajpoot20 merged 1 commit into
asyncapi:website-uifrom
sammy200-ui:website-ui-newsletter-dark-theme

Conversation

@sammy200-ui
Copy link
Copy Markdown
Contributor

@sammy200-ui sammy200-ui commented May 11, 2026

fixes #5253 (review)
before
Screenshot 2026-05-11 at 9 59 33 PM

after
Screenshot 2026-05-11 at 9 59 46 PM

Summary by CodeRabbit

  • Style
    • Improved text color handling in the newsletter subscription component for enhanced dark mode support and better visual consistency across themes.

Review Change Stack

@netlify
Copy link
Copy Markdown

netlify Bot commented May 11, 2026

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 97da352
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/6a0204159449c30008d066dd
😎 Deploy Preview https://deploy-preview-5399--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 93402479-078b-47b7-933e-74485c9b8d51

📥 Commits

Reviewing files that changed from the base of the PR and between 80655ae and 97da352.

📒 Files selected for processing (1)
  • components/NewsletterSubscribe.tsx

📝 Walkthrough

Walkthrough

The NewsletterSubscribe component removes hard-coded text-black from its default className and introduces headTextColor and paragraphTextColor variables derived from the dark prop. Paragraph color now always resolves to a value with dark-mode support via Tailwind class composition, replacing the prior conditional logic.

Changes

Theme-aware text styling

Layer / File(s) Summary
Default className styling
components/NewsletterSubscribe.tsx
Default className prop changes from 'p-8 text-center text-black' to 'p-8 text-center', removing hard-coded text color.
Dark-mode-aware text colors
components/NewsletterSubscribe.tsx
Introduces headTextColor and paragraphTextColor variables computed from the dark prop. Paragraph color always resolves to a value (including when not dark) with dark: Tailwind variant support.

🎯 1 (Trivial) | ⏱️ ~3 minutes

🐰 A rabbit hops through themes with grace,
Removing black from every place,
Dark-aware colors now take flight,
Making newsletters dark or light!
Styling bounces, sleek and bright. 🌙✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding dark theme visibility to the Newsletter component's text by adjusting heading color from black to white/lighter for better contrast.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

@sammy200-ui
Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (80655ae) to head (97da352).

Additional details and impacted files
@@             Coverage Diff              @@
##           website-ui     #5399   +/-   ##
============================================
  Coverage      100.00%   100.00%           
============================================
  Files              22        22           
  Lines             830       830           
  Branches          159       159           
============================================
  Hits              830       830           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 11, 2026

✅ Actions performed

Full review triggered.

Copy link
Copy Markdown

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 NewsletterSubscribe component’s default styling so its title/subtitle remain readable under the site-wide dark theme (without relying on a parent text-black).

Changes:

  • Removes the default text-black from the component wrapper className.
  • Sets explicit Tailwind text color classes for heading/subtitle when dark is false, including dark: variants.

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

Comment thread components/NewsletterSubscribe.tsx
Comment thread components/NewsletterSubscribe.tsx
@princerajpoot20 princerajpoot20 merged commit 7c21ddf into asyncapi:website-ui May 12, 2026
35 of 36 checks passed
@github-project-automation github-project-automation Bot moved this from To Be Triaged to Done in Website - Kanban May 12, 2026
@princerajpoot20
Copy link
Copy Markdown
Member

princerajpoot20 commented May 12, 2026

@sammy200-ui what is the reason behind marking this suggestion as resolved? https://github.com/asyncapi/website/pull/5399/changes#r3220548995

@sammy200-ui
Copy link
Copy Markdown
Contributor Author

@princerajpoot20 my mistake - I should i have taken those in consideration , I should have checked how everything was looking on the light theme as well . I totally forgot that , will be more patient when reviewing the PR from next time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants