Skip to content

Conversation

@dannyroosevelt
Copy link
Collaborator

@dannyroosevelt dannyroosevelt commented Dec 8, 2025

WHY

Summary by CodeRabbit

  • New Features

    • Dark mode support for Select controls with new theme color tokens for hover/selected states and app icon backgrounds.
    • Improved app icon background visibility for Select items and selected values in dark themes.
    • Refined default styling for Select dropdowns and consistent option text sizing for better readability.
  • Version

    • Updated to 2.3.0 (changelog entry added).

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Dec 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Dec 8, 2025 5:03am
pipedream-docs-redirect-do-not-edit Ignored Ignored Dec 8, 2025 5:03am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

Walkthrough

Release 2.3.0: adds dark-mode support for select components via new theme tokens (optionHover, optionSelected, optionSelectedHover, appIconBackground), centralizes select styling with createBaseSelectStyles/resolveSelectColors, and introduces memoization across select components to reduce recomputation.

Changes

Cohort / File(s) Summary
Version & Changelog
packages/connect-react/package.json, packages/connect-react/CHANGELOG.md
Bumped package version to 2.3.0. Added changelog entry (2025-12-07) documenting dark mode support and new select theme tokens including appIconBackground.
Select styling utilities
packages/connect-react/src/utils/select-styles.ts
resolveSelectColors now derives theme-driven colors and returns appIconBg; removed prior fallback helper. createBaseSelectStyles now includes menuList, standardizes fontSize for singleValue/input, extends option state with isDisabled, and adds an :active override to preserve selectedHoverBg.
ControlSelect / render wiring
packages/connect-react/src/components/ControlSelect.tsx
Replaced in-file style objects with memoized resolvedColors and createBaseSelectStyles usage; merged context customization props/components with caller overrides; enforced container gridArea and adjusted style merge order; always wraps MenuList with a computed CustomMenuList.
ControlApp / SelectApp / SelectComponent
packages/connect-react/src/components/ControlApp.tsx, packages/connect-react/src/components/SelectApp.tsx, packages/connect-react/src/components/SelectComponent.tsx
Added memoized resolvedColors and baseSelectStyles to reduce recalculation; components now use resolvedColors.appIconBg for app icon backgrounds; memoized custom components and selected-value computation; preserved public APIs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Verify style-merge precedence: baseSelectStyles vs. customization context styles vs. caller selectProps.styles (ControlSelect).
  • Confirm resolveSelectColors defaults and appIconBg are applied consistently in Option, SingleValue, and MenuList renderers.
  • Check memoization dependency arrays include theme.colors, theme.boxShadow, and any customization props/components to avoid stale values or unnecessary recomputations.
  • Review MenuList wrapping and component-merge logic for potential regressions in loading/mount behavior.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is incomplete; the 'WHY' section contains only a placeholder comment ('') with no actual explanation of the changes or rationale. Complete the 'WHY' section with a clear explanation of the dark mode styling changes, including what was fixed, why it was necessary, and how it improves the user experience.
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix dark mode styling' aligns with the main changes shown in the diff: adding dark mode support for select components with new theme color tokens and app icon backgrounds.
✨ 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 danny/connect-react/publish-dark-mode-polish

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7a78b57 and fd4451d.

📒 Files selected for processing (4)
  • packages/connect-react/CHANGELOG.md (1 hunks)
  • packages/connect-react/package.json (1 hunks)
  • packages/connect-react/src/components/ControlSelect.tsx (9 hunks)
  • packages/connect-react/src/utils/select-styles.ts (3 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-08-27T16:47:38.177Z
Learnt from: jverce
Repo: PipedreamHQ/pipedream PR: 18187
File: packages/connect-react/src/components/ControlSelect.tsx:138-145
Timestamp: 2025-08-27T16:47:38.177Z
Learning: In the connect-react package, changes should be non-behavioral during the SDK migration. The LoadMore functionality in ControlSelect should maintain its current runtime behavior.

Applied to files:

  • packages/connect-react/package.json
  • packages/connect-react/CHANGELOG.md
  • packages/connect-react/src/components/ControlSelect.tsx
  • packages/connect-react/src/utils/select-styles.ts
📚 Learning: 2025-08-27T16:48:48.776Z
Learnt from: jverce
Repo: PipedreamHQ/pipedream PR: 18187
File: packages/connect-react/src/components/Errors.tsx:16-19
Timestamp: 2025-08-27T16:48:48.776Z
Learning: In the connect-react package refactoring PR, maintain current runtime behavior even when type patterns are not ideal - prioritize behavioral consistency over type safety improvements when explicitly requested by the maintainer.

Applied to files:

  • packages/connect-react/package.json
📚 Learning: 2025-08-27T17:25:10.425Z
Learnt from: jverce
Repo: PipedreamHQ/pipedream PR: 18187
File: packages/connect-react/src/utils/type-guards.ts:23-33
Timestamp: 2025-08-27T17:25:10.425Z
Learning: In the connect-react package, the isOptionWithLabel type guard intentionally restricts value types to string|number for runtime filtering purposes, even though LabelValueOption<T> allows any T. This runtime behavior should be preserved over type safety improvements.

Applied to files:

  • packages/connect-react/src/components/ControlSelect.tsx
🧬 Code graph analysis (2)
packages/connect-react/src/components/ControlSelect.tsx (2)
packages/connect-react/src/utils/select-styles.ts (2)
  • resolveSelectColors (28-53)
  • createBaseSelectStyles (59-131)
packages/connect-react/src/types.ts (1)
  • LabelValueOption (40-42)
packages/connect-react/src/utils/select-styles.ts (1)
packages/connect-react/src/theme.ts (1)
  • Colors (8-73)
⏰ 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). (2)
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
🔇 Additional comments (6)
packages/connect-react/package.json (1)

3-3: LGTM!

Version bump to 2.3.0 is appropriate for the new dark mode feature addition. Follows semantic versioning correctly.

packages/connect-react/CHANGELOG.md (1)

5-10: LGTM!

Changelog entry accurately documents the dark mode additions and new theme color tokens. Format is consistent with existing entries.

packages/connect-react/src/utils/select-styles.ts (1)

104-128: LGTM! Option styling logic is well-structured.

The background color priority (selected+focused → selected → focused → surface) and the :active override to replace default blue with theme colors are correctly implemented for dark mode support.

packages/connect-react/src/components/ControlSelect.tsx (3)

170-195: LGTM!

The simplified finalComponents logic correctly uses the caller's MenuList override when provided, falling back to the default. Using refs for showLoadMoreButton and onLoadMore keeps the dependency array minimal while ensuring callbacks stay current.


284-295: LGTM!

Style merging order is correct: base dark mode styles (selectStyles) can be overridden by user-provided styles (selectProps?.styles), with final inline overrides for container and menuPortal. This ensures dark mode support while maintaining customization flexibility.


105-107: Good documentation of design decision.

The comment clearly explains why styles are applied directly rather than through getProps, helping future maintainers understand the intentional separation for dark mode support.

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fd4451d and 41d377b.

📒 Files selected for processing (4)
  • packages/connect-react/src/components/ControlApp.tsx (2 hunks)
  • packages/connect-react/src/components/ControlSelect.tsx (7 hunks)
  • packages/connect-react/src/components/SelectApp.tsx (4 hunks)
  • packages/connect-react/src/components/SelectComponent.tsx (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-08-27T16:47:38.177Z
Learnt from: jverce
Repo: PipedreamHQ/pipedream PR: 18187
File: packages/connect-react/src/components/ControlSelect.tsx:138-145
Timestamp: 2025-08-27T16:47:38.177Z
Learning: In the connect-react package, changes should be non-behavioral during the SDK migration. The LoadMore functionality in ControlSelect should maintain its current runtime behavior.

Applied to files:

  • packages/connect-react/src/components/ControlApp.tsx
  • packages/connect-react/src/components/ControlSelect.tsx
  • packages/connect-react/src/components/SelectComponent.tsx
  • packages/connect-react/src/components/SelectApp.tsx
📚 Learning: 2025-08-27T17:25:10.425Z
Learnt from: jverce
Repo: PipedreamHQ/pipedream PR: 18187
File: packages/connect-react/src/utils/type-guards.ts:23-33
Timestamp: 2025-08-27T17:25:10.425Z
Learning: In the connect-react package, the isOptionWithLabel type guard intentionally restricts value types to string|number for runtime filtering purposes, even though LabelValueOption<T> allows any T. This runtime behavior should be preserved over type safety improvements.

Applied to files:

  • packages/connect-react/src/components/ControlSelect.tsx
🧬 Code graph analysis (3)
packages/connect-react/src/components/ControlApp.tsx (1)
packages/connect-react/src/utils/select-styles.ts (2)
  • resolveSelectColors (28-53)
  • createBaseSelectStyles (59-131)
packages/connect-react/src/components/SelectComponent.tsx (1)
packages/connect-react/src/utils/select-styles.ts (2)
  • resolveSelectColors (28-53)
  • createBaseSelectStyles (59-131)
packages/connect-react/src/components/SelectApp.tsx (2)
packages/connect-react/src/utils/select-styles.ts (2)
  • resolveSelectColors (28-53)
  • createBaseSelectStyles (59-131)
packages/connect-react/src/hooks/customization-context.tsx (1)
  • BaseReactSelectProps (133-140)
⏰ 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: Lint Code Base
🔇 Additional comments (5)
packages/connect-react/src/components/ControlApp.tsx (1)

58-78: Memoized select colors/styles are correct and preserve control behavior.

Color resolution and base select styles are now only recomputed when theme.colors or theme.boxShadow change, and the control style override still delegates to the base style before setting gridArea: "control". This matches the pattern used by the other select components and is a clean perf win with no behavior change.

Also applies to: 99-102

packages/connect-react/src/components/SelectApp.tsx (1)

101-121: SelectApp theming and icon background integration look solid.

Resolved colors and base select styles are now memoized off theme.colors/theme.boxShadow, and the app icon background uses resolvedColors.appIconBg with correct dependencies in customComponents. This keeps styling consistent with other select components while limiting recalculation.

Also applies to: 124-124, 142-142, 166-166, 200-200

packages/connect-react/src/components/SelectComponent.tsx (1)

53-73: Consistent memoization of select styles in SelectComponent.

Color resolution and base select styles are now memoized exactly like in the other select components, and those styles are fed through select.getProps via baseSelectProps.styles. This reduces recalculation without altering load-more or selection behavior.

Also applies to: 98-98

packages/connect-react/src/components/ControlSelect.tsx (2)

60-80: Memoized select styles and LoadMore wrapper preserve existing behavior.

Color resolution and base select styles are now memoized off theme.colors/theme.boxShadow, and those styles are fed into select.getProps("controlSelect", …) via customizationProps, matching the pattern in other select components. The new finalComponents merge (customizationProps.componentscomponentsOverrideCustomMenuList wrapper) still delegates to the parent MenuList and appends LoadMoreButton based on showLoadMoreButtonRef, so the LoadMore runtime behavior remains unchanged while gaining customization support. Based on learnings, this keeps ControlSelect’s LoadMore semantics intact.

Also applies to: 147-201


147-155: Consider forwarding more of select.getProps to keep ControlSelect aligned with other select components.

Here select.getProps("controlSelect", …) is only used to pull classNamePrefix, classNames, theme, styles, and components into customizationProps, and only those are forwarded to MaybeCreatableSelect. In SelectApp, SelectComponent, and ControlApp, the full result of select.getProps is spread into the underlying Select, so any future additions to the customization contract (e.g., default menuPlacement, filterOption, or other props) would apply automatically.

For consistency and to future‑proof customization, consider either:

  • Spreading customizationProps onto MaybeCreatableSelect (with care for precedence vs. selectProps and your explicit props), or
  • Explicitly forwarding any additional keys that select.getProps("controlSelect", …) is expected to supply beyond theme/classNamePrefix/classNames/styles/components.

This would keep ControlSelect behavior in line with the other select wrappers if the customization API expands.

Also applies to: 171-201, 280-283

⛔ Skipped due to learnings
Learnt from: jverce
Repo: PipedreamHQ/pipedream PR: 18187
File: packages/connect-react/src/components/ControlSelect.tsx:138-145
Timestamp: 2025-08-27T16:47:38.177Z
Learning: In the connect-react package, changes should be non-behavioral during the SDK migration. The LoadMore functionality in ControlSelect should maintain its current runtime behavior.

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

♻️ Duplicate comments (1)
packages/connect-react/src/components/ControlSelect.tsx (1)

292-303: LGTM! Guard for selectProps?.styles correctly applied.

The ?? {} guard addresses the previous review feedback. Note that the explicit container and menuPortal definitions will override any user-provided styles for these keys—this appears intentional for enforcing layout (gridArea) and stacking context (zIndex) requirements.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 41d377b and 6cc226a.

📒 Files selected for processing (1)
  • packages/connect-react/src/components/ControlSelect.tsx (7 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-08-27T16:47:38.177Z
Learnt from: jverce
Repo: PipedreamHQ/pipedream PR: 18187
File: packages/connect-react/src/components/ControlSelect.tsx:138-145
Timestamp: 2025-08-27T16:47:38.177Z
Learning: In the connect-react package, changes should be non-behavioral during the SDK migration. The LoadMore functionality in ControlSelect should maintain its current runtime behavior.

Applied to files:

  • packages/connect-react/src/components/ControlSelect.tsx
📚 Learning: 2025-08-27T16:48:48.776Z
Learnt from: jverce
Repo: PipedreamHQ/pipedream PR: 18187
File: packages/connect-react/src/components/Errors.tsx:16-19
Timestamp: 2025-08-27T16:48:48.776Z
Learning: In the connect-react package refactoring PR, maintain current runtime behavior even when type patterns are not ideal - prioritize behavioral consistency over type safety improvements when explicitly requested by the maintainer.

Applied to files:

  • packages/connect-react/src/components/ControlSelect.tsx
📚 Learning: 2025-08-27T17:25:10.425Z
Learnt from: jverce
Repo: PipedreamHQ/pipedream PR: 18187
File: packages/connect-react/src/utils/type-guards.ts:23-33
Timestamp: 2025-08-27T17:25:10.425Z
Learning: In the connect-react package, the isOptionWithLabel type guard intentionally restricts value types to string|number for runtime filtering purposes, even though LabelValueOption<T> allows any T. This runtime behavior should be preserved over type safety improvements.

Applied to files:

  • packages/connect-react/src/components/ControlSelect.tsx
🧬 Code graph analysis (1)
packages/connect-react/src/components/ControlSelect.tsx (2)
packages/connect-react/src/utils/select-styles.ts (2)
  • resolveSelectColors (28-53)
  • createBaseSelectStyles (59-131)
packages/connect-react/src/types.ts (1)
  • LabelValueOption (40-42)
🔇 Additional comments (4)
packages/connect-react/src/components/ControlSelect.tsx (4)

28-31: LGTM!

The new utility imports align with the centralized select styling approach, consistent with the pattern in SelectComponent and SelectApp.


59-80: LGTM! Memoization correctly implemented.

The two-tier memoization creates a proper dependency chain: theme.colorsresolvedColorsbaseSelectStyles. This prevents unnecessary style object recreation on every render.


147-155: LGTM!

The customization props pattern correctly passes baseSelectStyles as the default, allowing user customizations to merge on top while preserving dark mode styling.


169-201: LGTM!

The component merge order (context → caller overrides → MenuList wrapper) is correct, and the dependency array properly includes customizationProps.components.

Comment on lines +279 to +282
// Apply customization context values as defaults
classNamePrefix={customizationProps.classNamePrefix || "react-select"}
classNames={customizationProps.classNames}
theme={customizationProps.theme}
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider using ?? instead of || for classNamePrefix.

Using || treats empty string as falsy, so customizationProps.classNamePrefix = "" (intentionally no prefix) would fall back to "react-select". Using ?? would only fallback for null/undefined, preserving explicit empty string customization.

-      classNamePrefix={customizationProps.classNamePrefix || "react-select"}
+      classNamePrefix={customizationProps.classNamePrefix ?? "react-select"}
🤖 Prompt for AI Agents
In packages/connect-react/src/components/ControlSelect.tsx around lines 279 to
282, the code uses the || operator for classNamePrefix which treats an explicit
empty string as falsy and will wrongly fall back to "react-select"; change this
to the nullish coalescing operator (??) so that only null or undefined trigger
the default while preserving an intentional empty string, i.e., replace the ||
usage with ?? for classNamePrefix.

@dannyroosevelt dannyroosevelt merged commit a5e39f4 into master Dec 8, 2025
7 checks passed
@dannyroosevelt dannyroosevelt deleted the danny/connect-react/publish-dark-mode-polish branch December 8, 2025 05:12
@github-project-automation github-project-automation bot moved this from Ready for PR Review to Done in Component (Source and Action) Backlog Dec 8, 2025
jcortes pushed a commit that referenced this pull request Dec 9, 2025
* improving dark mode (esp for highlighted and selected states)

* linting

* PR feedback

* PR feedback

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants