Skip to content

🎨 Palette: Add placeholders to empty input fields - #188

Merged
Matuyuhi merged 2 commits into
mainfrom
palette/input-placeholders-8176794115079853107
Oct 15, 2026
Merged

Matuyuhi merged 2 commits into
mainfrom
palette/input-placeholders-8176794115079853107

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

💡 What: Added descriptive placeholder text (e.g. "type to filter..." and "type to search...") styled in Color::DarkGray to the finder, branch, and grep input fields when their queries are empty. Also updated padding calculation logic to ensure proper layout alignment when placeholders are visible, and added preview scenes for testing the empty query states.

🎯 Why: When a search or filter input is empty in a TUI, it appears as a completely blank line. This leaves users without clear guidance on what action to take or what the input field is used for. Adding placeholders immediately provides context on how to interact with the current view.

📸 Before/After:
Before:
> ▎ 8/8
After:
> ▎type to filter... 8/8

♿ Accessibility: Improves cognitive accessibility by explicitly labeling the purpose of an otherwise blank text input area.

(Also added a journal entry in .Jules/palette.md noting the importance of descriptive placeholders in TUI input fields).


PR created automatically by Jules for task 8176794115079853107 started by @Matuyuhi

… 🎨 Palette to add placeholders to empty input fields.

I added styled placeholders (like "type to filter..." and "type to search...") to the input areas of the finder, branch, and text search panels when their queries are empty. This resolves a UX issue where empty text inputs looked like completely blank spaces, giving you clear context on what actions you can take.

This change also dynamically calculates layout padding based on whether the placeholder text is visible to maintain accurate alignment of the result counts on the right. Lastly, I've included two new UI preview scenes so you can easily test the empty input states. Let me know if you need anything else!
@google-labs-jules

Copy link
Copy Markdown
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

速度チェック

1 打鍵 (キー入力 → 再描画 1 回) あたりの所要時間。小さいほど速い。

ケース ops base head 差分
open 1 8.597 ms 8.634 ms +0.4%
type 200 0.236 ms 0.240 ms +1.5%
scroll-down 300 0.300 ms 0.312 ms +4.0%
scroll-up 300 0.302 ms 0.316 ms +4.5%
search-type 9 1.148 ms 1.142 ms -0.5%
search-scroll 300 0.326 ms 0.339 ms +4.0%
type-tracked 200 0.263 ms 0.267 ms +1.4%
git-scroll 300 0.283 ms 0.293 ms +3.7%
git-scroll-side-wrap 300 0.312 ms 0.322 ms +3.2%

同じ runner で連続して測った 2 点の比です。実測で数 % はぶれるので、それを超えた行だけ見てください。この結果で PR は落としません。

I added styled placeholders ("type to filter..." / "type to search...") to the input areas of the finder, branch, and search panels when their queries are empty. This addresses a UX issue where empty text inputs look like completely blank spaces, giving you clearer context on what actions you can take.

I also made sure this change dynamically calculates layout padding based on whether the placeholder text is visible in order to maintain accurate alignment of the result counts on the right. Additionally, I have included two new UI preview scenes so you can easily test the empty input states, and I replaced a deprecated atomic method.
@github-actions

Copy link
Copy Markdown
Contributor

UI スクリーンショット差分

Note

コミット済みの画像が現在の描画と食い違っています (branch finder_empty grep_empty)。
cargo preview --update-snapshots で更新してコミットしてください
(忘れたまま merge しても、main 側で自動的に追従コミットが積まれます)。

変わったシーン: branch, finder_empty, grep_empty

branch
before diff after
finder_empty
before diff after
(新規) —
grep_empty
before diff after
(新規) —

diff は shotdiff が変わった画素をピンクで塗ったもの。diff と after はこの実行で描き直した実物です。

github-actions Bot added a commit that referenced this pull request Oct 15, 2026
@Matuyuhi Matuyuhi added the mergeable label Oct 15, 2026 — with Claude

Copy link
Copy Markdown
Owner

Merging this PR. Decision notes:

  • CI (check, perf) is green, and the perf deltas are within noise.
  • The change is small and local. The placeholder is shown only when the query is empty, and the padding math accounts for its width. Finder, branch and grep are consistent with each other.
  • The hardcoded English strings match the existing neighbouring strings ("no matches").
  • The new finder_empty and grep_empty scenes cover the new state. The stale snapshots are picked up automatically by main's follow-up commit, as the screenshot-diff bot noted.
  • Nit, not blocking: the #[allow(deprecated)] in grep/search.rs is unrelated to this change. Please drop it in a later cleanup if it turns out to be unnecessary.

Generated by Claude Code

@Matuyuhi
Matuyuhi merged commit aba99ae into main Oct 15, 2026
2 checks passed
@Matuyuhi
Matuyuhi deleted the palette/input-placeholders-8176794115079853107 branch October 15, 2026 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant