agent: fill the inbox/todos header pill to match the rest of the cluster
HeaderPill used the bordered/transparent .hive-pill shape while every other chip in .agent-header-pills (StatusChips, MetaNav's trigger) is @hive/shared's filled Badge (.ui-badge) -- the one visibly hollow pill in a row of filled ones. Restyled .header-pill with .ui-badge's own values (filled --purple-dim background, no border, matching radius/ padding/hover) instead of a new shape, and dropped hive-pill from the markup since it no longer describes what this component looks like.
This commit is contained in:
parent
3e4ffa9312
commit
ad58894c25
2 changed files with 23 additions and 16 deletions
|
|
@ -320,25 +320,31 @@ h2, h3 {
|
|||
}
|
||||
|
||||
/* Header pill — inbox / loose-ends triggers. Compact, count-prominent.
|
||||
Markup carries `hive-pill` alongside `header-pill` (shared pill.css
|
||||
supplies border/radius/padding/font-size/letter-spacing; `display`
|
||||
is the one thing overridden here, to `inline-flex`, for the icon+
|
||||
label+count row layout — see pill.css's own note on that). */
|
||||
Filled to match every OTHER chip in `.agent-header-pills`
|
||||
(StatusChips' alive/state/model/effort/pause, MetaNav's 🔗 trigger —
|
||||
all `@hive/shared`'s `Badge`, an `.ui-badge` filled pill) — no
|
||||
`hive-pill` on the markup any more (its bordered/transparent shape
|
||||
is what made this one read as visually distinct from its neighbours;
|
||||
values below are `.ui-badge`/`.ui-badge-interactive`'s own, not a
|
||||
new shape). `display: inline-flex` (not Badge's default) for the
|
||||
icon+label+count row this component alone needs. */
|
||||
.header-pill {
|
||||
background: transparent;
|
||||
border-color: var(--purple-dim);
|
||||
background: var(--purple-dim);
|
||||
border: none;
|
||||
border-radius: 1em;
|
||||
padding: 0.15em 0.6em;
|
||||
min-height: 2.75em;
|
||||
padding-inline: 0.8em;
|
||||
color: var(--fg);
|
||||
font-family: inherit;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4em;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
|
||||
transition: background 0.15s ease, color 0.15s ease;
|
||||
}
|
||||
.header-pill:hover {
|
||||
border-color: var(--purple);
|
||||
color: var(--purple);
|
||||
box-shadow: 0 0 10px -2px var(--purple);
|
||||
background: var(--border);
|
||||
}
|
||||
.header-pill-icon { font-size: 1.05em; line-height: 1; }
|
||||
.header-pill-label { color: var(--muted); }
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
// <HeaderPill> — the inbox/todos flyout triggers in the header's right
|
||||
// cluster. Reuses agent.css's existing `.hive-pill.header-pill…` rules
|
||||
// (loaded globally) — same "layout is a like-for-like port, the
|
||||
// component model is the change" approach as Header.tsx. Hidden
|
||||
// (renders nothing) at count 0, matching the old page's `pill.hidden =
|
||||
// count === 0`.
|
||||
// cluster. Reuses agent.css's existing `.header-pill…` rules (loaded
|
||||
// globally), styled to match `@hive/shared`'s filled `Badge` pill —
|
||||
// every other chip in the same cluster is one — not the bordered
|
||||
// `.hive-pill` shape (mara: "inbox badge looks different from all the
|
||||
// other ones"). Hidden (renders nothing) at count 0, matching the old
|
||||
// page's `pill.hidden = count === 0`.
|
||||
export interface HeaderPillProps {
|
||||
kind: 'inbox' | 'todos';
|
||||
icon: string;
|
||||
|
|
@ -15,7 +16,7 @@ export interface HeaderPillProps {
|
|||
export function HeaderPill({ kind, icon, label, count, onClick }: HeaderPillProps) {
|
||||
if (count === 0) return null;
|
||||
return (
|
||||
<button type="button" class={`hive-pill header-pill header-pill-${kind}`} onClick={onClick} title={`open ${label} flyout`}>
|
||||
<button type="button" class={`header-pill header-pill-${kind}`} onClick={onClick} title={`open ${label} flyout`}>
|
||||
<span class="header-pill-icon" aria-hidden="true">
|
||||
{icon}
|
||||
</span>
|
||||
|
|
|
|||
Loading…
Reference in a new issue