Skip to content

Preset icon picker replaces free-text icon field - #15

Merged
jhd3197 merged 1 commit into
mainfrom
dev
Aug 2, 2026
Merged

Preset icon picker replaces free-text icon field#15
jhd3197 merged 1 commit into
mainfrom
dev

Conversation

@jhd3197

@jhd3197 jhd3197 commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Typing an mdi: key by hand was the weak point of the custom-icon feature. The Icon field is now a visual picker: click the preview bubble to open a searchable popover with a curated emoji grid (28, labelled for search) plus every bundled Iconify glyph (84), a "Default (name monogram)" clear row, and a "use custom" row so power users can still enter any emoji or key. Stored value is unchanged (plain string), so rail/backend/mock are untouched; the unknown-key warning stays for custom entries.

Typing an mdi: key by hand was the weak point of the custom-icon feature.
The Icon field is now a visual picker: click the preview bubble to open a
searchable popover with a curated emoji grid (28, labelled for search) plus
every bundled Iconify glyph (84), a "Default (name monogram)" clear row,
and a "use custom" row so power users can still enter any emoji or key.
Stored value is unchanged (plain string), so rail/backend/mock are
untouched; the unknown-key warning stays for custom entries.
Copilot AI review requested due to automatic review settings August 2, 2026 22:15
@jhd3197
jhd3197 merged commit b274eb9 into main Aug 2, 2026
2 checks passed

Copilot AI 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.

Pull request overview

This PR updates the connection profile “Icon” field UX by replacing a free-text input with a visual IconPicker popover, while keeping the stored profile.icon value as a plain string to avoid backend/rail changes.

Changes:

  • Replaces the ProfileEditor icon text input + inline preview with a reusable IconPicker component.
  • Adds IconPicker with searchable emoji presets, bundled Iconify glyphs, a “Default (monogram)” clear action, and a “Use custom” option.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/components/ProfileEditor.tsx Swaps the old icon text field for the new IconPicker, preserving the existing “unknown icon key” warning behavior.
src/components/IconPicker.tsx Implements the new popover-based picker UI (emoji grid, bundled glyph grid, custom entry).
Suppressed comments (1)

src/components/IconPicker.tsx:215

  • The “Use custom icon” row saves q (lowercased) instead of what the user typed. This alters the stored icon string (e.g. case-sensitive keys or custom text) versus the previous input field and the PR’s stated behavior.
              {q && (
                <button
                  type="button"
                  onClick={() => pick(q)}
                  className="mt-1.5 flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-xs text-text-muted transition-colors hover:bg-bg-hover"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +127 to +133
<div
role="dialog"
aria-label="Pick a bubble icon"
onClick={(e) => e.stopPropagation()}
style={{ top: pos.top, left: pos.left }}
className="anim-modal fixed flex max-h-80 w-80 flex-col rounded-xl border border-border bg-bg-panel shadow-elev-3"
>
Comment on lines +140 to +142
onKeyDown={(e) => {
if (e.key === "Enter" && q) pick(q);
}}
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.

2 participants