Skip to content

fix(search-bar): make the placeholder readable in dark mode - #64

Merged
ross-dash merged 2 commits into
masterfrom
fix/searchbar-placeholder-dark
Nov 13, 2026
Merged

ross-dash merged 2 commits into
masterfrom
fix/searchbar-placeholder-dark

Conversation

@ross-dash

@ross-dash ross-dash commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

Fixes #54. The SearchBar prompt used Color.dash.black1000Alpha30, which has no dark variant, so in dark mode the placeholder was black on near-black.

What was done?

The prompt uses Color.dash.searchPlaceholder: the same black at 30% in light mode (identical colour, so the light reference does not change), white at 50% in dark mode. The dark snapshot reference, which had recorded the bug, is re-recorded from CI.

How Has This Been Tested?

  • swift build, .github/scripts/conventions.sh.
  • Snapshot job failed on the old dark reference as expected; the new one was fetched with .github/scripts/fetch-snapshots.sh (run 43237599092).

Before / After

Snapshot references (SearchBarSnapshotTests/testPlaceholderAndText). Light is unchanged (same colour); dark is re-recorded in 306b391.

Before After
Light
Dark
  • No visual change (refactor, tests, docs). Say why in "What was done?".

Breaking Changes

None.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Style
    • Updated the search bar placeholder text color.

The prompt used black1000Alpha30, which has no dark variant, so on a dark
background the placeholder was black on near-black. It now uses the
searchPlaceholder token: the same black at 30% in light mode, white at 50%
in dark mode.

Fixes #54

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The SearchBar prompt now uses Color.dash.searchPlaceholder instead of Color.dash.black1000Alpha30.

Changes: SearchBar placeholder styling

Layer / File(s) Summary
Update placeholder color
Sources/DashUIKit/Components/SearchBar.swift
The search prompt foreground style now uses Color.dash.searchPlaceholder.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: romchornyi

Merge Risk: Minimal · up to 306b3

The SearchBar placeholder now uses a theme-aware color token so it stays readable in dark mode, and the light-mode color is unchanged. No merge-blocking risk remains.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Linked Issues check Inconclusive [#54] Code requirement met in source. The raw summary reports one changed line in Sources/DashUIKit/Components/SearchBar.swift (+1/-1). The prompt now uses Color.dash.searchPlaceholder instead of Colo… Confirm the re-recorded dark reference testPlaceholderAndText.states-dark.png at head 306b391 matches the searchPlaceholder dark colour (white at 50%) and shows a readable placeholder. Reviewable evidence for that file is needed to reach a …
Passed Passed checks: 3 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the scope (search-bar) and the change (placeholder readability in dark mode). The diff changes the SearchBar placeholder color from black1000Alpha30 to searchPlaceholder, and the linke…
Out of Scope Changes check Passed The only reported source change is the single prompt colour token swap in SearchBar.swift, which directly implements [#54]. The re-recorded dark snapshot reference supports the same fix and is a test …
Full details: Title check

Explanation

The title names the scope (search-bar) and the change (placeholder readability in dark mode). The diff changes the SearchBar placeholder color from black1000Alpha30 to searchPlaceholder, and the linked objectives confirm this targets dark-mode readability. The title is short, specific, and matches the main change.

Full details: Out of Scope Changes check

Explanation

The only reported source change is the single prompt colour token swap in SearchBar.swift, which directly implements [#54]. The re-recorded dark snapshot reference supports the same fix and is a test artifact tied to the change. The PR does not change the other Search* tokens. The issue lists those only as optional review items, so their absence is not out of scope. No unrelated change is evident in the summary.

Full details: Linked Issues check

Explanation

[#54] Code requirement met in source. The raw summary reports one changed line in Sources/DashUIKit/Components/SearchBar.swift (+1/-1). The prompt now uses Color.dash.searchPlaceholder instead of Color.dash.black1000Alpha30. This matches the issue Fix section. The token is black at 30% in light mode, so light references stay unchanged. [#54] Requirement to re-record the dark reference depends on SnapshotTests/Tests/DashUIKitSnapshotTests/Snapshots/SearchBarSnapshotTests/testPlaceholderAndText.states-dark.png. That file is excluded by ignored_files rule '!**/.png'. Its content cannot be inspected. The PR description states the file was re-recorded in commit 306b391, but this is not independently verified. The issue also asks for the change to make the placeholder readable in dark mode. The dark snapshot content cannot be confirmed from reviewable evidence. Other unused Search tokens are optional review items, not requirements.

Resolution

Confirm the re-recorded dark reference testPlaceholderAndText.states-dark.png at head 306b391 matches the searchPlaceholder dark colour (white at 50%) and shows a readable placeholder. Reviewable evidence for that file is needed to reach a verdict.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 41ff490 and 306b391.

Files ignored due to path filters: 1

  • SnapshotTests/Tests/DashUIKitSnapshotTests/__Snapshots__/SearchBarSnapshotTests/testPlaceholderAndText.states-dark.png is excluded by !**/*.png
Files selected for processing: 1

  • Sources/DashUIKit/Components/SearchBar.swift

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Rendered by the CI snapshot job for the searchPlaceholder change; the old
reference had recorded the unreadable placeholder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@romchornyi-pitcrew romchornyi-pitcrew left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: approve

No findings. Reviewed at 306b391.

  • Fixes #54 with the token that already existed for this purpose. searchPlaceholder has been in Color+DashUI.swift since the scaffold but was unused.
  • Light mode: SearchPlaceholder and Black1000Alpha30 have the same light value (#0A0B0D at 0.30), so the light reference is unchanged, as the description says.
  • Dark mode: white at 0.50, the same alpha as TextFieldPlaceholder from #61, so the two input placeholders now match in dark mode.
  • The dark snapshot reference was re-recorded from CI. The Before/After table links the base and head commits.
  • All checks are green.

🤖 Reviewed with Claude Code

@ross-dash
ross-dash merged commit 5fc436c into master Nov 13, 2026
14 of 15 checks passed
@ross-dash
ross-dash deleted the fix/searchbar-placeholder-dark branch November 13, 2026 12:40
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.

SearchBar: the placeholder is invisible in dark mode

3 participants