Skip to content

fix(finance): dark mode theme for finance page#5382

Merged
princerajpoot20 merged 4 commits into
asyncapi:website-uifrom
sammy200-ui:website-ui-finance-fix
May 13, 2026
Merged

fix(finance): dark mode theme for finance page#5382
princerajpoot20 merged 4 commits into
asyncapi:website-uifrom
sammy200-ui:website-ui-finance-fix

Conversation

@sammy200-ui
Copy link
Copy Markdown
Contributor

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

resolves : #5253 (comment)

Before : https://deploy-preview-5253--asyncapi-website.netlify.app/finance

After : https://deploy-preview-5382--asyncapi-website.netlify.app/finance

Summary by CodeRabbit

  • Style

    • Added comprehensive dark-mode styling across the Financial Summary pages: page background, cards, charts, tooltips, headings, tables, lists and sponsor/logo imagery for consistent dark-theme readability.
  • Bug Fixes

    • Charts and mobile summary now render reliably after load.
    • Bar clicks open external links securely in a new tab.
    • List rendering stabilized by using stable keys for repeated items.

Review Change Stack

@netlify
Copy link
Copy Markdown

netlify Bot commented May 7, 2026

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 358f90d
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/6a01a03bf513d90008fda68d
😎 Deploy Preview https://deploy-preview-5382--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 7, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e916630b-d071-48ea-bee7-738c069f8439

📥 Commits

Reviewing files that changed from the base of the PR and between 29da255 and 358f90d.

📒 Files selected for processing (9)
  • components/FinancialSummary/AsyncAPISummary.tsx
  • components/FinancialSummary/BarChartComponent.tsx
  • components/FinancialSummary/Card.tsx
  • components/FinancialSummary/CustomTooltip.tsx
  • components/FinancialSummary/ExpenseBreakdown.tsx
  • components/FinancialSummary/OtherFormsComponent.tsx
  • components/FinancialSummary/SponsorshipTiers.tsx
  • components/FinancialSummary/SuccessStories.tsx
  • pages/finance.tsx

📝 Walkthrough

Walkthrough

Adds Tailwind dark-mode classes across FinancialSummary components and pages/finance.tsx, and introduces an isMounted mount gate in BarChartComponent to avoid hydration mismatches.

Changes

Finance Page Dark Mode

Layer / File(s) Summary
Hydration Fix & BarChart Rendering
components/FinancialSummary/BarChartComponent.tsx
BarChartComponent adds isMounted state (set in useEffect) and gates BarChart/ExpensesCard rendering on isMounted and windowWidth; chart theming and window.open(..., '_blank', 'noopener,noreferrer') updated.
Core Component Dark-Mode Styling
components/FinancialSummary/AsyncAPISummary.tsx, components/FinancialSummary/Card.tsx, components/FinancialSummary/CustomTooltip.tsx
AsyncAPISummary paragraph/container/image add dark-mode classes; Card root adds dark:bg-dark-card/dark:text-white; CustomTooltip adds dark:bg-dark-card and dark:border-gray-600.
Section Components Dark-Mode Styling
components/FinancialSummary/ExpenseBreakdown.tsx, components/FinancialSummary/OtherFormsComponent.tsx, components/FinancialSummary/SponsorshipTiers.tsx, components/FinancialSummary/SuccessStories.tsx
Wrappers, cards, headings, and table/text cells updated with dark-mode background and text classes; OtherFormsComponent list key changed to form.title.
Page Root Dark Background
pages/finance.tsx
Page root <div> adds dark:bg-dark-background to enable dark theme at page level.

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant BarChartComponent
  participant useEffect
  participant BarChart
  participant ExpensesCard
  Browser->>BarChartComponent: mount
  BarChartComponent->>useEffect: register resize listener, compute windowWidth
  useEffect->>BarChartComponent: set isMounted = true
  BarChartComponent->>BarChart: render (if isMounted && windowWidth >= 900)
  BarChartComponent->>ExpensesCard: render (if isMounted && windowWidth < 900)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • asyncapi/website#5382: The main PR’s dark-mode changes across the finance page components mirror the same Tailwind class updates and the gated chart rendering.

Suggested reviewers

  • derberg
  • princerajpoot20
  • akshatnema
  • sambhavgupta0705
  • anshgoyalevil
  • Mayaleeeee

Poem

🐰 Nightfall stitches every class with care,
Cards and charts don a darker flair,
A mount gate waits for client light,
Links open safe into the night,
Hops of joy — the page looks fair.

🚥 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 summarizes the main change: adding dark mode theme support to the finance page, which is the primary focus across all modified components.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

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

Adds dark-mode theming support to the Finance page by applying Tailwind dark: variants across multiple FinancialSummary sections so backgrounds and text render appropriately when the site is in dark mode.

Changes:

  • Add dark-mode page/section backgrounds (dark:bg-dark-background, dark:bg-dark-card) across Finance components.
  • Add dark-mode text styling (dark:text-dark-text, dark:text-white) for headings, paragraphs, and table cells.
  • Improve BarChart theming for dark mode (axis/grid/legend styling) and invert the GitHub logo in dark mode.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pages/finance.tsx Adds a dark-mode background wrapper for the finance page.
components/FinancialSummary/AsyncAPISummary.tsx Adds dark-mode text styling and inverts the GitHub logo in dark mode.
components/FinancialSummary/BarChartComponent.tsx Adds dark-mode text styling and adjusts grid/axis/legend coloring for the chart.
components/FinancialSummary/Card.tsx Adds dark-mode card background and text color.
components/FinancialSummary/CustomTooltip.tsx Adds dark-mode tooltip background/border styling.
components/FinancialSummary/ExpenseBreakdown.tsx Adds dark-mode section/card backgrounds and text colors.
components/FinancialSummary/OtherFormsComponent.tsx Adds dark-mode section/card backgrounds and text colors.
components/FinancialSummary/SponsorshipTiers.tsx Adds dark-mode section background and text colors for the tier table.
components/FinancialSummary/SuccessStories.tsx Adds dark-mode section background and text colors for story content.

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

Comment thread pages/finance.tsx Outdated
const shouldUseContainer = windowWidth > 1700;

return <div>{shouldUseContainer ? <Container wide>{renderComponents()}</Container> : renderComponents()}</div>;
return <div className='dark:bg-dark-background'>{shouldUseContainer ? <Container wide>{renderComponents()}</Container> : renderComponents()}</div>;
Comment on lines 18 to 21
<div className='bg-opacity-90/90 rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-dark-card p-2 shadow-md'>
<p className='text-14 mb-1 font-bold'>{data.Category}</p>
<p className='text-12 text-gray-900'>${data.Amount.toFixed(2)}</p>
<p>Click the bar to learn more</p>
Comment on lines 18 to 20
<div className='bg-opacity-90/90 rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-dark-card p-2 shadow-md'>
<p className='text-14 mb-1 font-bold'>{data.Category}</p>
<p className='text-12 text-gray-900'>${data.Amount.toFixed(2)}</p>
@@ -69,7 +69,7 @@ export default function AsyncAPISummary() {
</a>
<a href='https://github.com/sponsors/asyncapi' target='_blank'>
className='mx-4 inline size-10 transition-transform hover:scale-110 active:scale-90'
className='mx-4 inline size-10 transition-transform hover:scale-110 active:scale-90 dark:invert'
src='/img/logos/github-black.svg'
alt='Github'
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (29da255) to head (358f90d).
⚠️ Report is 26 commits behind head on website-ui.

Additional details and impacted files
@@             Coverage Diff              @@
##           website-ui     #5382   +/-   ##
============================================
  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.

@sammy200-ui
Copy link
Copy Markdown
Contributor Author

Ready for Review

Copy link
Copy Markdown
Contributor

@Sourya07 Sourya07 left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution

@princerajpoot20
Copy link
Copy Markdown
Member

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 10, 2026

✅ Actions performed

Full review triggered.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@components/FinancialSummary/BarChartComponent.tsx`:
- Around line 231-233: Replace the direct window.open call in BarChartComponent
where matchedLinkObject is used: call const newWindow =
window.open(matchedLinkObject.link, '_blank', 'noopener,noreferrer') and then if
(newWindow) newWindow.opener = null; this ensures the external link is opened
with noopener,noreferrer and defensively severs the opener reference to prevent
tabnabbing for the matchedLinkObject handling code.
- Around line 215-248: The BarChart is rendered whenever isMounted is true even
though barWidth and barHeight are undefined for windowWidth < 900; update the
render condition so the BarChart (component using BarChart, barWidth, barHeight,
chartData, and the Bar onClick logic) is only rendered when isMounted &&
windowWidth >= 900, while retaining the existing ExpensesCard render for small
screens (windowWidth < 900); locate the JSX where BarChart is returned and
wrap/guard it with the windowWidth >= 900 check.

In `@components/FinancialSummary/CustomTooltip.tsx`:
- Around line 18-20: Replace the invalid Tailwind opacity utility and add a
dark-mode text variant: in the CustomTooltip component, update the wrapper div's
class to use a valid opacity utility (replace "bg-opacity-90/90" with
"bg-opacity-90"), and update the amount paragraph (the <p> that renders
{data.Amount.toFixed(2)}) to include "dark:text-dark-text" alongside
"text-gray-900" (e.g., "text-12 text-gray-900 dark:text-dark-text") so the
amount remains readable on dark:bg-dark-card.

In `@components/FinancialSummary/ExpenseBreakdown.tsx`:
- Line 41: The long JSX heading line in ExpenseBreakdown.tsx (the h2 rendering
expense.title) violates Prettier; split the element's attributes and content
across multiple lines so it conforms to Prettier formatting (e.g., put the
className on its own line and the children on a new line) for the h2 that
renders expense.title to resolve the CI formatting failure.

In `@components/FinancialSummary/OtherFormsComponent.tsx`:
- Line 29: Prettier fails because the JSX props on the mapped div in
OtherFormsComponent are on the same line; split the props so each prop (key and
className) is on its own line and reformat the JSX accordingly, and replace the
unstable key={index} with a stable identifier such as key={form.id ?? form.title
?? index} (use the form object from the map callback) to avoid reordering
issues—update the div in the map inside OtherFormsComponent to use the new key
expression and multiline props.

In `@components/FinancialSummary/SponsorshipTiers.tsx`:
- Line 22: Prettier is flagging the single-line JSX props on the Paragraph
component; update the Paragraph element (the one using ParagraphTypeStyle.md and
the className with Tailwind classes) to format props across multiple lines so
each prop is on its own line (e.g., place the typeStyle prop on its own line,
the className prop on its own line) and close the tag on a new line to satisfy
the formatter.

In `@pages/finance.tsx`:
- Line 58: The JSX return expression in the component currently uses a
single-line conditional which breaks Prettier; rewrite the return so the outer
<div> and its child conditional are formatted across multiple lines (put the
<div className='dark:bg-dark-background'> on its own line, the conditional
expression on the next lines, with <Container
wide>{renderComponents()}</Container> and renderComponents() each on their own
lines) while keeping the existing logic that uses shouldUseContainer and the
renderComponents() call and the Container component.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5d2cee9b-e322-4ac7-a6c0-5cf669cc8344

📥 Commits

Reviewing files that changed from the base of the PR and between 29da255 and 950544d.

📒 Files selected for processing (9)
  • components/FinancialSummary/AsyncAPISummary.tsx
  • components/FinancialSummary/BarChartComponent.tsx
  • components/FinancialSummary/Card.tsx
  • components/FinancialSummary/CustomTooltip.tsx
  • components/FinancialSummary/ExpenseBreakdown.tsx
  • components/FinancialSummary/OtherFormsComponent.tsx
  • components/FinancialSummary/SponsorshipTiers.tsx
  • components/FinancialSummary/SuccessStories.tsx
  • pages/finance.tsx

Comment thread components/FinancialSummary/BarChartComponent.tsx
Comment thread components/FinancialSummary/BarChartComponent.tsx
Comment thread components/FinancialSummary/CustomTooltip.tsx Outdated
Comment thread components/FinancialSummary/ExpenseBreakdown.tsx Outdated
Comment thread components/FinancialSummary/OtherFormsComponent.tsx Outdated
Comment thread components/FinancialSummary/SponsorshipTiers.tsx Outdated
Comment thread pages/finance.tsx Outdated
@sonarqubecloud
Copy link
Copy Markdown

@sammy200-ui
Copy link
Copy Markdown
Contributor Author

@princerajpoot20 Resolved coderabbit suggestion , had to consider all of the reviews cause some were related to prettier , other were related to invalid Tailwind syntax

@princerajpoot20
Copy link
Copy Markdown
Member

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

✅ Actions performed

Full review triggered.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
components/FinancialSummary/AsyncAPISummary.tsx (1)

52-76: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add rel="noopener noreferrer" to external links opened in new tabs.

All three anchors using target='_blank' should include rel='noopener noreferrer' to prevent reverse-tabnabbing.

Suggested patch
-        <a href='https://opencollective.com/asyncapi' target='_blank'>
+        <a href='https://opencollective.com/asyncapi' target='_blank' rel='noopener noreferrer'>
...
-        <a
+        <a
           href='https://crowdfunding.lfx.linuxfoundation.org/projects/445898e9-42a2-4965-9e0a-c2a714f381bc'
           target='_blank'
+          rel='noopener noreferrer'
         >
...
-        <a href='https://github.com/sponsors/asyncapi' target='_blank'>
+        <a href='https://github.com/sponsors/asyncapi' target='_blank' rel='noopener noreferrer'>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/FinancialSummary/AsyncAPISummary.tsx` around lines 52 - 76, In the
AsyncAPISummary React component update each anchor element that uses
target='_blank' (the three <a> tags rendering Open Collective, LFX and GitHub
links) to include rel='noopener noreferrer'; locate these anchors inside the JSX
in AsyncAPISummary.tsx and add the rel attribute to prevent reverse-tabnabbing
while keeping the existing target and other attributes unchanged.
🧹 Nitpick comments (1)
components/FinancialSummary/BarChartComponent.tsx (1)

248-248: 💤 Low value

Consider simplifying the ternary operator.

The ternary with null can be simplified using the && operator for more concise code.

♻️ Proposed simplification
-        {isMounted && windowWidth < 900 ? <ExpensesCard /> : null}
+        {isMounted && windowWidth < 900 && <ExpensesCard />}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/FinancialSummary/BarChartComponent.tsx` at line 248, Replace the
ternary that returns null with a logical && expression to simplify the render in
BarChartComponent: locate the JSX expression using isMounted and windowWidth
that currently reads "{isMounted && windowWidth < 900 ? <ExpensesCard /> :
null}" and change it to use short-circuit rendering with "isMounted &&
windowWidth < 900 && <ExpensesCard />" so the ExpensesCard component is only
rendered when both conditions are true.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@components/FinancialSummary/AsyncAPISummary.tsx`:
- Around line 52-76: In the AsyncAPISummary React component update each anchor
element that uses target='_blank' (the three <a> tags rendering Open Collective,
LFX and GitHub links) to include rel='noopener noreferrer'; locate these anchors
inside the JSX in AsyncAPISummary.tsx and add the rel attribute to prevent
reverse-tabnabbing while keeping the existing target and other attributes
unchanged.

---

Nitpick comments:
In `@components/FinancialSummary/BarChartComponent.tsx`:
- Line 248: Replace the ternary that returns null with a logical && expression
to simplify the render in BarChartComponent: locate the JSX expression using
isMounted and windowWidth that currently reads "{isMounted && windowWidth < 900
? <ExpensesCard /> : null}" and change it to use short-circuit rendering with
"isMounted && windowWidth < 900 && <ExpensesCard />" so the ExpensesCard
component is only rendered when both conditions are true.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7dc26a6a-6843-46b6-bb14-81ed3b2a4e91

📥 Commits

Reviewing files that changed from the base of the PR and between 29da255 and 358f90d.

📒 Files selected for processing (9)
  • components/FinancialSummary/AsyncAPISummary.tsx
  • components/FinancialSummary/BarChartComponent.tsx
  • components/FinancialSummary/Card.tsx
  • components/FinancialSummary/CustomTooltip.tsx
  • components/FinancialSummary/ExpenseBreakdown.tsx
  • components/FinancialSummary/OtherFormsComponent.tsx
  • components/FinancialSummary/SponsorshipTiers.tsx
  • components/FinancialSummary/SuccessStories.tsx
  • pages/finance.tsx

@princerajpoot20
Copy link
Copy Markdown
Member

@sammy200-ui I hope the suggestions by CodeRabbit that you marked as resolved have been addressed as I don't see any justification mentioned there

@sammy200-ui
Copy link
Copy Markdown
Contributor Author

@princerajpoot20 yep all the 7 coderabbit suggestion has been taken in consideration 358f90d

@princerajpoot20
Copy link
Copy Markdown
Member

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

✅ Actions performed

Full review triggered.

@princerajpoot20
Copy link
Copy Markdown
Member

princerajpoot20 commented May 13, 2026

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

✅ Actions performed

Full review triggered.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

@princerajpoot20 Triggering a full review of PR #5382 now.

✅ Actions performed

Full review triggered.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

✅ Actions performed

Full review triggered.

1 similar comment
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

✅ Actions performed

Full review triggered.

Copy link
Copy Markdown
Member

@princerajpoot20 princerajpoot20 left a comment

Choose a reason for hiding this comment

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

@sammy200-ui Thanks for your effort

@princerajpoot20 princerajpoot20 merged commit e39ca3c into asyncapi:website-ui May 13, 2026
30 of 31 checks passed
@github-project-automation github-project-automation Bot moved this from To Be Triaged to Done in Website - Kanban May 13, 2026
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.

4 participants