Skip to content

Logo as SVG file#6573

Merged
ckifer merged 1 commit intomainfrom
logo
Nov 6, 2025
Merged

Logo as SVG file#6573
ckifer merged 1 commit intomainfrom
logo

Conversation

@PavelVanecek
Copy link
Collaborator

@PavelVanecek PavelVanecek commented Nov 5, 2025

Description

Remake our logo as a chart! Because charts ftw. Also publish the same as an .svg file.

Motivation and Context

LambdaTest asked for our logo as an image so that they can link to it so I figured why not make it an SVG and what is better SVG than a chart.

Summary by CodeRabbit

  • New Features

    • Updated Recharts logo with a new stylized graphic design replacing the previous text-based rendering, providing improved visual branding and recognition.
  • Tests

    • Introduced visual regression testing for the logo component to ensure visual consistency is maintained across future updates.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 5, 2025

Walkthrough

Introduces a new RechartsLogo React component rendering a stylized chart-based logo using Recharts. Updates Frame.tsx to use the component instead of static text, adds a visual regression test, and modifies CSS font styling for the logo link.

Changes

Cohort / File(s) Change Summary
New RechartsLogo Component
www/src/layouts/RechartsLogo.tsx
Adds new React component that renders a stylized logo using Recharts LineChart with coordinate lines and a label. Exports RechartsLogo as the primary public interface.
Frame Integration
www/src/layouts/Frame.tsx
Imports RechartsLogo component and replaces static text rendering with component usage in the logo link.
Logo Styling
www/src/layouts/frame.css
Updates logo link font-family fallback from sans-serif to monospace.
Visual Regression Test
test-vr/tests/www/RechartsLogo.spec-vr.tsx
Adds Playwright component test that mounts RechartsLogo and captures screenshot for visual regression testing.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~18 minutes

  • Verify RechartsLogo component logic (coordinate lines, styling with CSS variables, chart configuration)
  • Confirm Frame.tsx integration is correct and preserves existing functionality
  • Review visual regression test configuration and assertions

Suggested reviewers

  • ckifer

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description provides motivation and context but lacks several template sections: no Related Issue link, incomplete testing details, no Screenshots, missing Types of changes checkboxes, and incomplete Checklist items. Complete the description template by: linking the related issue, explicitly describing how the changes were tested, checking appropriate boxes in Types of changes and Checklist sections, and adding screenshots if appropriate.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Logo as SVG file' accurately describes the main change—converting the logo to an SVG-based implementation using a chart component and making it available as an SVG file.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch logo

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

Copy link
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: 1

🧹 Nitpick comments (1)
www/src/layouts/RechartsLogo.tsx (1)

46-53: Remove unnecessary CDATA wrapper from inline styles.

The <![CDATA[ wrapper is XML/XHTML syntax and is not necessary in React/JSX. Modern React handles style tag content without CDATA wrappers, and including it could potentially cause issues in some environments.

Apply this diff to remove the CDATA wrapper:

-      <style type="text/css">{`<![CDATA[
-            .recharts-text {
+      <style type="text/css">{`
+        .recharts-text {
               font-family: var(--font-family-code), monospace;
               font-weight: 300;
               font-size: var(--font-size-xl, 18px);
               white-space: nowrap;
-            }
-      ]]>`}</style>
+        }
+      `}</style>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3d23458 and cb762df.

⛔ Files ignored due to path filters (4)
  • test-vr/__snapshots__/tests/www/RechartsLogo.spec-vr.tsx-snapshots/RechartsLogo-1-chromium-linux.png is excluded by !**/*.png
  • test-vr/__snapshots__/tests/www/RechartsLogo.spec-vr.tsx-snapshots/RechartsLogo-1-firefox-linux.png is excluded by !**/*.png
  • test-vr/__snapshots__/tests/www/RechartsLogo.spec-vr.tsx-snapshots/RechartsLogo-1-webkit-linux.png is excluded by !**/*.png
  • www/public/logo.svg is excluded by !**/*.svg
📒 Files selected for processing (4)
  • test-vr/tests/www/RechartsLogo.spec-vr.tsx (1 hunks)
  • www/src/layouts/Frame.tsx (2 hunks)
  • www/src/layouts/RechartsLogo.tsx (1 hunks)
  • www/src/layouts/frame.css (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
www/**

📄 CodeRabbit inference engine (DEVELOPING.md)

Use the www directory to add and commit examples for the documentation website (recharts.github.io)

Files:

  • www/src/layouts/RechartsLogo.tsx
  • www/src/layouts/frame.css
  • www/src/layouts/Frame.tsx
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
Repo: recharts/recharts PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-25T07:36:02.229Z
Learning: Recharts aims for simple, declarative, and composable charts; prioritize consistency, usability, performance, and accessibility
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-10-25T07:35:46.188Z
Learning: Applies to test/**/*.test.{ts,tsx} : Mock getBoundingClientRect using test/helper/MockGetBoundingClientRect.ts when rendering Recharts components (e.g., Tooltip, Legend, charts)
📚 Learning: 2025-10-25T07:36:02.229Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-25T07:36:02.229Z
Learning: Recharts aims for simple, declarative, and composable charts; prioritize consistency, usability, performance, and accessibility

Applied to files:

  • www/src/layouts/RechartsLogo.tsx
  • www/src/layouts/Frame.tsx
📚 Learning: 2025-10-25T07:35:46.188Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-10-25T07:35:46.188Z
Learning: Applies to test/**/*.test.{ts,tsx} : Mock getBoundingClientRect using test/helper/MockGetBoundingClientRect.ts when rendering Recharts components (e.g., Tooltip, Legend, charts)

Applied to files:

  • www/src/layouts/RechartsLogo.tsx
  • test-vr/tests/www/RechartsLogo.spec-vr.tsx
📚 Learning: 2025-10-25T07:34:46.558Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: DEVELOPING.md:0-0
Timestamp: 2025-10-25T07:34:46.558Z
Learning: Applies to test-vr/__snapshots__/** : Commit newly recorded or updated visual regression snapshot files under test-vr/__snapshots__ to the repository

Applied to files:

  • test-vr/tests/www/RechartsLogo.spec-vr.tsx
📚 Learning: 2025-10-25T07:35:46.188Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-10-25T07:35:46.188Z
Learning: Applies to test/**/*.test.{ts,tsx} : When testing selectors, verify render counts using the spy and rerenderSameComponent from createSelectorTestCase

Applied to files:

  • test-vr/tests/www/RechartsLogo.spec-vr.tsx
📚 Learning: 2025-10-25T07:35:46.188Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-10-25T07:35:46.188Z
Learning: Write unit tests using Vitest and React Testing Library

Applied to files:

  • test-vr/tests/www/RechartsLogo.spec-vr.tsx
📚 Learning: 2025-10-25T07:35:46.188Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-10-25T07:35:46.188Z
Learning: Applies to test/**/*.test.{ts,tsx} : In tests not using createSelectorTestCase, advance timers after renders with vi.runOnlyPendingTimers()

Applied to files:

  • test-vr/tests/www/RechartsLogo.spec-vr.tsx
📚 Learning: 2025-10-25T07:35:46.188Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-10-25T07:35:46.188Z
Learning: Applies to test/**/*.test.{ts,tsx} : Prefer using the createSelectorTestCase helper when writing or modifying tests

Applied to files:

  • test-vr/tests/www/RechartsLogo.spec-vr.tsx
🧬 Code graph analysis (2)
test-vr/tests/www/RechartsLogo.spec-vr.tsx (1)
www/src/layouts/RechartsLogo.tsx (1)
  • RechartsLogo (43-66)
www/src/layouts/Frame.tsx (1)
www/src/layouts/RechartsLogo.tsx (1)
  • RechartsLogo (43-66)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build, Test, Pack
🔇 Additional comments (6)
www/src/layouts/frame.css (1)

17-17: LGTM! Font fallback aligns with the new logo component.

The change from sans-serif to monospace fallback ensures consistency with the RechartsLogo component's monospace styling.

www/src/layouts/Frame.tsx (1)

9-9: LGTM!

Import is correctly added.

test-vr/tests/www/RechartsLogo.spec-vr.tsx (1)

1-8: LGTM! Visual regression test is correctly structured.

The test appropriately uses Playwright component testing to mount the RechartsLogo and capture a screenshot for visual regression testing.

Note: Ensure the generated snapshot file under test-vr/__snapshots__/ is committed to the repository. Based on learnings.

www/src/layouts/RechartsLogo.tsx (3)

1-30: LGTM! Logo coordinate definitions are clear.

The constant definitions and coordinate arrays are well-structured for creating the logo's visual elements.


32-41: LGTM! LogoLine helper promotes code reuse.

The helper component appropriately sets common Line properties and uses CSS variables with fallbacks. Disabling animation is correct for a logo element.


54-63: LGTM! Chart structure is well-configured.

The hidden axes, line rendering, and label positioning are correctly implemented. The use of CSS variables with fallbacks for colors is good practice.

Comment on lines 24 to 26
<Link className="nav-logo" to={`/${locale}/`}>
&lt;Recharts /&gt;
<RechartsLogo />
</Link>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add accessible label to the logo link.

The link now wraps a visual chart component instead of text, so screen readers won't get meaningful content. Add an aria-label attribute to ensure accessibility.

Apply this diff to add an accessible label:

-          <Link className="nav-logo" to={`/${locale}/`}>
+          <Link className="nav-logo" to={`/${locale}/`} aria-label="Recharts">
             <RechartsLogo />
           </Link>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Link className="nav-logo" to={`/${locale}/`}>
&lt;Recharts /&gt;
<RechartsLogo />
</Link>
<Link className="nav-logo" to={`/${locale}/`} aria-label="Recharts">
<RechartsLogo />
</Link>
🤖 Prompt for AI Agents
In www/src/layouts/Frame.tsx around lines 24 to 26, the Link wrapping the
RechartsLogo has no accessible name for screen readers; add an aria-label (e.g.,
aria-label={`Recharts home (${locale})`} or simply aria-label="Recharts home")
to the Link element so the logo link provides meaningful accessible text,
keeping existing className and to props intact.

@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

❌ Patch coverage is 0% with 50 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.17%. Comparing base (7fb128b) to head (cb762df).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
www/src/layouts/RechartsLogo.tsx 0.00% 47 Missing and 1 partial ⚠️
www/src/layouts/Frame.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6573      +/-   ##
==========================================
- Coverage   91.28%   91.17%   -0.12%     
==========================================
  Files         490      491       +1     
  Lines       40951    41001      +50     
  Branches     4581     4582       +1     
==========================================
  Hits        37381    37381              
- Misses       3554     3603      +49     
- Partials       16       17       +1     

☔ 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.

@codecov
Copy link

codecov bot commented Nov 5, 2025

Bundle Report

Bundle size has no change ✅

Copy link
Member

@ckifer ckifer left a comment

Choose a reason for hiding this comment

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

lol, all in

@ckifer ckifer merged commit 7d9783f into main Nov 6, 2025
27 of 29 checks passed
@ckifer ckifer deleted the logo branch November 6, 2025 04:08
@coderabbitai coderabbitai bot mentioned this pull request Feb 27, 2026
7 tasks
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.

2 participants