Skip to content

feat: Add dark mode support to JigsawStackIcon#9013

Merged
mfortman11 merged 2 commits into
mainfrom
cz/fix-jigsawicon
Jul 11, 2025
Merged

feat: Add dark mode support to JigsawStackIcon#9013
mfortman11 merged 2 commits into
mainfrom
cz/fix-jigsawicon

Conversation

@Cristhianzl
Copy link
Copy Markdown
Member

@Cristhianzl Cristhianzl commented Jul 11, 2025

This pull request introduces a small enhancement to the JigsawStackIcon component by integrating a dark mode state from the useDarkStore.

Summary by CodeRabbit

  • New Features
    • The JigsawStack icon now adapts its appearance based on dark mode settings for a more consistent user experience.

@Cristhianzl Cristhianzl self-assigned this Jul 11, 2025
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 11, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jul 11, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The JigsawStackIcon component was updated to use the useDarkStore hook to access the application's dark mode state. This state is converted to a string and passed as a new prop, isdark, to the JigsawStackIconSVG child component for theming purposes.

Changes

File(s) Change Summary
src/frontend/src/icons/JigsawStack/index.tsx Updated to use useDarkStore for dark mode; passes isdark string prop to SVG child component

Possibly related PRs

Suggested labels

enhancement, javascript, size:S, lgtm

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cz/fix-jigsawicon

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@dosubot dosubot Bot added the enhancement New feature or request label Jul 11, 2025
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 11, 2025
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: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c38df91 and 411345f.

📒 Files selected for processing (1)
  • src/frontend/src/icons/JigsawStack/index.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
`src/frontend/**/*.{ts,tsx}`: Use React 18 with TypeScript for all UI components and frontend logic.

src/frontend/**/*.{ts,tsx}: Use React 18 with TypeScript for all UI components and frontend logic.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/frontend_development.mdc)

List of files the instruction was applied to:

  • src/frontend/src/icons/JigsawStack/index.tsx
`src/frontend/**/*.{ts,tsx,js,jsx,css,scss}`: Use Tailwind CSS for styling all frontend components.

src/frontend/**/*.{ts,tsx,js,jsx,css,scss}: Use Tailwind CSS for styling all frontend components.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/frontend_development.mdc)

List of files the instruction was applied to:

  • src/frontend/src/icons/JigsawStack/index.tsx
`src/frontend/src/icons/**/*.{ts,tsx,js,jsx}`: Use Lucide React for icons in frontend components.

src/frontend/src/icons/**/*.{ts,tsx,js,jsx}: Use Lucide React for icons in frontend components.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/frontend_development.mdc)

List of files the instruction was applied to:

  • src/frontend/src/icons/JigsawStack/index.tsx
`src/frontend/src/icons/*/*`: Create a new directory for your icon in `src/front...

src/frontend/src/icons/*/*: Create a new directory for your icon in src/frontend/src/icons/YourIconName/ and add your SVG as a React component (e.g., YourIconName.jsx) that uses the isdark prop to support both light and dark mode.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/icons.mdc)

List of files the instruction was applied to:

  • src/frontend/src/icons/JigsawStack/index.tsx
`src/frontend/src/icons/*/index.tsx`: Create an `index.tsx` in your icon directory that exports your icon using `forwardRef` and passes the `isdark` prop.

src/frontend/src/icons/*/index.tsx: Create an index.tsx in your icon directory that exports your icon using forwardRef and passes the isdark prop.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/icons.mdc)

List of files the instruction was applied to:

  • src/frontend/src/icons/JigsawStack/index.tsx
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-30T14:40:29.510Z
Learning: Applies to src/frontend/src/{components,hooks}/**/*.{ts,tsx} : Implement dark mode support in components and hooks where needed.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.846Z
Learning: Applies to src/frontend/src/icons/*/*.jsx : Always support both light and dark mode for custom icons by using the `isdark` prop in your SVG component.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: Custom SVG icon components in React should always support both light and dark mode by accepting an 'isdark' prop and adjusting colors accordingly.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: Dark mode support should be implemented using a dedicated Zustand store (e.g., useDarkStore), and toggled via a custom hook (e.g., useDarkMode) that exposes isDark and toggle.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.846Z
Learning: Applies to src/frontend/src/icons/*/* : Create a new directory for your icon in `src/frontend/src/icons/YourIconName/` and add your SVG as a React component (e.g., `YourIconName.jsx`) that uses the `isdark` prop to support both light and dark mode.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.846Z
Learning: Verify the icon appears correctly in the UI in both light and dark mode.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-30T14:40:29.510Z
Learning: All changes must be tested in both light and dark mode before committing.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.846Z
Learning: Applies to src/frontend/src/icons/*/index.tsx : Create an `index.tsx` in your icon directory that exports your icon using `forwardRef` and passes the `isdark` prop.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: Use a utility like 'stringToBool' to reliably interpret the 'isdark' prop when toggling SVG colors for light/dark mode support.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: All changes must be tested in both light and dark mode to ensure consistent appearance and functionality.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-30T14:40:29.510Z
Learning: Applies to src/frontend/src/icons/**/*.{ts,tsx,js,jsx} : Use Lucide React for icons in frontend components.
Learnt from: luisfucros
PR: langflow-ai/langflow#8940
File: src/frontend/src/icons/SambaNova/SambaNovaLogo.jsx:13-47
Timestamp: 2025-07-09T20:32:24.915Z
Learning: In the SambaNova icon component, only the white text paths should change based on theme (white in dark mode, black in light mode), while the colored gradient paths should remain unchanged to maintain brand consistency.
src/frontend/src/icons/JigsawStack/index.tsx (11)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.846Z
Learning: Applies to src/frontend/src/icons/*/*.jsx : Always support both light and dark mode for custom icons by using the `isdark` prop in your SVG component.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.846Z
Learning: Applies to src/frontend/src/icons/*/index.tsx : Create an `index.tsx` in your icon directory that exports your icon using `forwardRef` and passes the `isdark` prop.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: Custom SVG icon components in React should always support both light and dark mode by accepting an 'isdark' prop and adjusting colors accordingly.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.846Z
Learning: Applies to src/frontend/src/icons/*/* : Create a new directory for your icon in `src/frontend/src/icons/YourIconName/` and add your SVG as a React component (e.g., `YourIconName.jsx`) that uses the `isdark` prop to support both light and dark mode.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-30T14:40:29.510Z
Learning: Applies to src/frontend/src/{components,hooks}/**/*.{ts,tsx} : Implement dark mode support in components and hooks where needed.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: Dark mode support should be implemented using a dedicated Zustand store (e.g., useDarkStore), and toggled via a custom hook (e.g., useDarkMode) that exposes isDark and toggle.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-30T14:40:29.510Z
Learning: Applies to src/frontend/src/icons/**/*.{ts,tsx,js,jsx} : Use Lucide React for icons in frontend components.
Learnt from: dolfim-ibm
PR: langflow-ai/langflow#8394
File: src/frontend/src/icons/Docling/index.tsx:4-6
Timestamp: 2025-06-16T11:14:04.200Z
Learning: The Langflow codebase consistently uses `React.PropsWithChildren<{}>` as the prop type for all icon components using forwardRef, rather than `React.SVGProps<SVGSVGElement>`. This is an established pattern across hundreds of icon files in src/frontend/src/icons/.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: Use a utility like 'stringToBool' to reliably interpret the 'isdark' prop when toggling SVG colors for light/dark mode support.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: Export custom icon components in React using React.forwardRef to ensure proper ref forwarding and compatibility with parent components.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: Use Zustand for state management in React components within the frontend; stores should expose both state and setter functions, and be imported via hooks (e.g., useMyStore).
🧬 Code Graph Analysis (1)
src/frontend/src/icons/JigsawStack/index.tsx (2)
src/frontend/src/stores/darkStore.ts (1)
  • useDarkStore (7-53)
src/frontend/src/icons/JigsawStack/JigsawStackIcon.jsx (1)
  • JigsawStackIconSVG (1-43)
🪛 Biome (1.9.4)
src/frontend/src/icons/JigsawStack/index.tsx

[error] 7-7: Don't use '{}' as a type.

Prefer explicitly define the object shape. '{}' means "any non-nullable value".

(lint/complexity/noBannedTypes)

⏰ 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: autofix
🔇 Additional comments (3)
src/frontend/src/icons/JigsawStack/index.tsx (3)

1-1: LGTM - Import follows established pattern

The import statement correctly brings in the useDarkStore hook for dark mode support.


7-7: Static analysis hint is a false positive - current type is correct

The static analysis tool suggests avoiding {} as a type, but React.PropsWithChildren<{}> is the established pattern used consistently across hundreds of icon files in this codebase, as confirmed by the retrieved learnings.


5-11: Overall architecture follows established patterns

The component correctly:

  • Uses forwardRef for proper ref forwarding
  • Follows the established prop type pattern
  • Integrates with the dark mode store
  • Passes the theme state to the child SVG component

Comment thread src/frontend/src/icons/JigsawStack/index.tsx
Comment thread src/frontend/src/icons/JigsawStack/index.tsx
…nverted to a boolean before being used in the fill color logic
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 11, 2025
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jul 11, 2025
@github-actions
Copy link
Copy Markdown
Contributor

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 71%
73.58% (117/159) 57.46% (77/134) 59.52% (25/42)

Unit Test Results

Tests Skipped Failures Errors Time
45 0 💤 0 ❌ 0 🔥 2.576s ⏱️

@mfortman11 mfortman11 added this pull request to the merge queue Jul 11, 2025
Merged via the queue into main with commit f860d94 Jul 11, 2025
25 of 26 checks passed
@mfortman11 mfortman11 deleted the cz/fix-jigsawicon branch July 11, 2025 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants