Keep menu empty-state text inside the card - #7653
Conversation
There was a problem hiding this comment.
Pull request overview
Constrains empty-state messages to picker card widths and elides long unmatched queries.
Changes:
- Constrains menu, emoji, and clipboard empty-state columns.
- Adds right elision to empty-state messages.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
shell/plugins/menu/Menu.qml |
Constrains and elides menu empty-state text. |
shell/plugins/emojis/Emojis.qml |
Applies equivalent emoji-picker constraints. |
shell/plugins/clipboard/Clipboard.qml |
Applies equivalent clipboard-picker constraints. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Reviewed on a disposable VM running this branch's shell, with an A/B against It fixes #7510 as described. On It also fixes a bug nobody reported. On No wrap-to-elide regression. The risk with adding
Tests: Second opinion: codex at xhigh reviewed independently and agreed on all of the above; its independence is not currently guaranteed, since it can read this session's own transcript. It did contribute the mechanism for the zero-width One thing out of scope, aimed at the maintainer rather than at you: No collision with #7657, which also edits Next: waiting on the maintainer to merge. Nothing needed from you. |
This is my first PR here so please let me know if there is anything I can improve upon or do better to make reviewing easier. I'm looking to learn and get better and will be happy to make changes moving forward.
Thanks!
Ben
Summary
The empty-state
Columnonly hadanchors.centerIn. Its messageTextused a fixedwidth: Style.space(320)with noelide, so once the query was wider than 320px the line was centered on that box and painted outside the card. Giving the columnwidth: parent.width(the already-sized list item) and eliding the message keeps it inside.Fixes #7510
Testing
holas como esatas cjaksjdwdawdjwdj): the message stays inside the card, elided, still centered../test/all— CLI suite passed. Shell suite had three environment-only failures (omarchy-pkgscheckout not present); nothing related to this QML change.Before / after
Before — empty-state text paints past the rounded card:

After — same query stays inside, with an ellipsis:

Clipboard picker/Emoji

