Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

feat(style): tweaks and changes to hover styles and hover tooltip behavior (#4159)

Aidan Holloway-Bidwell3f14652fdf38
diff --git a/js/app/packages/app/component/command/CommandItem.tsx b/js/app/packages/app/component/command/CommandItem.tsx
index d7697f94f5..fca94cac26 100644
--- a/js/app/packages/app/component/command/CommandItem.tsx
+++ b/js/app/packages/app/component/command/CommandItem.tsx
@@ -199,7 +199,7 @@ export function CommandItem(props: CommandItemProps) {
class={cn(
'rounded-md group flex items-center h-10 px-2 text-sm font-semibold relative',
{
- 'bg-active ring ring-edge': props.selected,
+ 'bg-active': props.selected,
'hover:bg-hover/50': !props.selected,
}
)}
diff --git a/js/app/packages/app/component/interactive-onboarding/components-lib.tsx b/js/app/packages/app/component/interactive-onboarding/components-lib.tsx
index e151b76319..c510355082 100644
--- a/js/app/packages/app/component/interactive-onboarding/components-lib.tsx
+++ b/js/app/packages/app/component/interactive-onboarding/components-lib.tsx
@@ -220,8 +220,7 @@ export function ContinueButton(props: ContinueButtonProps) {
{
'bg-transparent text-ink/40 font-normal ring-1 ring-edge-muted':
props.disabled,
- 'bg-accent text-surface hover:bg-accent hover:ring-2 ring-accent ring-offset-1 ring-offset-surface focus:ring-2':
- !props.disabled,
+ 'bg-accent text-surface hover:bg-accent/90': !props.disabled,
}
)}
onClick={props.onClick}
diff --git a/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx b/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx
index 8959cf95b7..f7b3af6145 100644
--- a/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx
@@ -149,11 +149,11 @@ export const SoupSectionHeader = (props: {
onClick={props.onClick}
data-highlighted={props.highlighted || undefined}
class={cn(
- 'group/header relative w-[calc(100%-0.5rem)] mx-1 my-0.5 rounded px-2 py-2 flex items-center gap-2.5 text-xs font-semibold tracking-tight',
+ 'group/header relative w-[calc(100%-0.5rem)] mx-1 my-0.5 rounded-lg px-2 py-2 flex items-center gap-2.5 text-xs font-semibold tracking-tight',
'text-text-muted bg-surface border border-edge-muted relative',
props.onClick && 'hover:bg-active',
props.class,
- props.highlighted && 'ring ring-edge bg-active ring-inset'
+ props.highlighted && 'bg-active'
)}
>
{props.children}
@@ -186,15 +186,15 @@ const AssigneeGroupContent = (props: {
const STATUS_GROUP_HEADER_TINTS: Record<string, string> = {
[PROPERTY_OPTION_IDS.STATUS.NOT_STARTED]:
- 'bg-task/5 border-task/10 data-highlighted:ring-task/10 data-highlighted:bg-task/10 hover:bg-task/10',
+ 'bg-task/5 border-task/10 data-highlighted:bg-task/10 hover:bg-task/10',
[PROPERTY_OPTION_IDS.STATUS.IN_PROGRESS]:
- 'bg-alert/5 border-alert/10 data-highlighted:ring-alert/10 data-highlighted:bg-alert/10 hover:bg-alert/10',
+ 'bg-alert/5 border-alert/10 data-highlighted:bg-alert/10 hover:bg-alert/10',
[PROPERTY_OPTION_IDS.STATUS.IN_REVIEW]:
- 'bg-note/5 border-note/10 data-highlighted:ring-note/10 data-highlighted:bg-note/10 hover:bg-note/10',
+ 'bg-note/5 border-note/10 data-highlighted:bg-note/10 hover:bg-note/10',
[PROPERTY_OPTION_IDS.STATUS.COMPLETED]:
- 'bg-accent/5 border-accent/10 data-highlighted:ring-accent/10 data-highlighted:bg-accent/10 hover:bg-accent/10',
+ 'bg-accent/5 border-accent/10 data-highlighted:bg-accent/10 hover:bg-accent/10',
[PROPERTY_OPTION_IDS.STATUS.CANCELED]:
- 'bg-ink/5 border-ink/10 data-highlighted:ring-ink/10 data-highlighted:bg-ink/10 hover:bg-ink/10',
+ 'bg-ink/5 border-ink/10 data-highlighted:bg-ink/10 hover:bg-ink/10',
};
const DefaultGroupHeader = (
@@ -1338,7 +1338,7 @@ export const SoupViewList = (props: SoupViewListProps) => {
class={cn(
'my-1 rounded min-h-9 flex items-center justify-center',
highlighted()
- ? 'w-[calc(100%-0.5rem)] mx-1 ring ring-edge bg-active/60 ring-inset'
+ ? 'w-[calc(100%-0.5rem)] mx-1 bg-active/60'
: 'mx-auto'
)}
>
diff --git a/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListEntity.tsx b/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListEntity.tsx
index 40e3572a9a..4a65b26a2e 100644
--- a/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListEntity.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListEntity.tsx
@@ -146,9 +146,9 @@ export function TaskListEntity(props: TaskListEntityProps) {
{
'min-h-10 mx-1': !isMobile(),
'bg-accent/8': props.checked,
- 'ring ring-accent/16 ring-inset':
+ 'bg-accent/16':
props.checked && props.highlighted && !isTouchDevice(),
- 'ring ring-edge bg-active/60 ring-inset':
+ 'bg-active/60':
props.highlighted && !props.checked && !isTouchDevice(),
'hover:bg-active/30':
!props.highlighted && !props.checked && !isTouchDevice(),
diff --git a/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListHeader.tsx b/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListHeader.tsx
index cbbfececca..89a9a3caa0 100644
--- a/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListHeader.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListHeader.tsx
@@ -15,7 +15,10 @@ import {
import './list-property-value.css';
import { Tooltip } from '@ui';
-const HEADER_ICON_CLASS = 'size-3 text-ink-muted';
+// `size-3` at wide/medium (shown beside the label), upsizing to `size-4` on
+// narrow containers to match the row's collapsed status/priority icons
+// (`@max-[840px]/u-list:size-4` in list-property-value.tsx).
+const HEADER_ICON_CLASS = 'size-3 @max-[840px]/u-list:size-4 text-ink-muted';
/** Map column IDs to their icons for narrow mode */
const COLUMN_ICONS: Record<string, () => JSX.Element> = {
diff --git a/js/app/packages/app/component/next-soup/soup-view/views/tasks/list-property-value.tsx b/js/app/packages/app/component/next-soup/soup-view/views/tasks/list-property-value.tsx
index 8a7f13528a..5ebc20d918 100644
--- a/js/app/packages/app/component/next-soup/soup-view/views/tasks/list-property-value.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/views/tasks/list-property-value.tsx
@@ -39,7 +39,7 @@ export const ListPropertyValue: Component<ListPropertyValueProps> = (props) => {
>
<Property.Tooltip property={props.property}>
<Layer depth={2}>
- <Property.EditTrigger class="list-property-cell w-full max-w-full min-w-0 overflow-hidden rounded-full hover:bg-surface/50 inline-flex items-center gap-1 px-2 py-1.5 leading-tight text-left hover:ring ring-edge ring-inset @max-[840px]/u-list:hover:ring-0 @max-[840px]/u-list:px-1">
+ <Property.EditTrigger class="list-property-cell w-full max-w-full min-w-0 overflow-hidden rounded-full hover:bg-surface/50 inline-flex items-center gap-1 px-2 py-1.5 leading-tight text-left @max-[840px]/u-list:px-1">
<Show
when={!isEmpty()}
fallback={
diff --git a/js/app/packages/app/index.css b/js/app/packages/app/index.css
index 3ed6d27de6..ee4c921f7b 100644
--- a/js/app/packages/app/index.css
+++ b/js/app/packages/app/index.css
@@ -457,9 +457,10 @@ a {
/* Channel message hover + non-selection highlight */
/* Suppressed on touch devices */
+/* Background-only — borders/rings are reserved for structural UI edges. */
html:not([data-touch-device="true"]) [data-message][data-highlighted],
html:not([data-touch-device="true"]) [data-message]:hover{
- @apply bg-ink/3 rounded-sm ring ring-edge ring-inset;
+ @apply bg-ink/5 rounded-sm;
}
/* Channel message long-press animation */
diff --git a/js/app/packages/block-canvas/component/FloatingMenu.tsx b/js/app/packages/block-canvas/component/FloatingMenu.tsx
index 731317a2dc..8dbc39fc54 100644
--- a/js/app/packages/block-canvas/component/FloatingMenu.tsx
+++ b/js/app/packages/block-canvas/component/FloatingMenu.tsx
@@ -156,7 +156,7 @@ function AlignmentOption(props: {
}) {
return (
<div
- class="size-6 mx-1 flex justify-center items-center rounded-sm hover:bg-hover hover-transition-bg hover:border hover:border-edge"
+ class="size-6 mx-1 flex justify-center items-center rounded-sm hover:bg-hover hover-transition-bg"
onClick={() => {
props.onClick(props.alignment);
}}
diff --git a/js/app/packages/core/comments/Thread.tsx b/js/app/packages/core/comments/Thread.tsx
index 4f1e516271..6d299b5032 100644
--- a/js/app/packages/core/comments/Thread.tsx
+++ b/js/app/packages/core/comments/Thread.tsx
@@ -245,7 +245,7 @@ export function Thread(props: {
<Show when={replyIds().length > 0 && lastReplyId()}>
<Show when={collapsedCount() > 0}>
<button
- class="text-xs text-ink-extra-muted hover:bg-hover hover:ring hover:ring-edge-muted text-left ml-5 rounded p-1 px-2 mb-2"
+ class="text-xs text-ink-extra-muted hover:bg-hover text-left ml-5 rounded p-1 px-2 mb-2"
on:click={() => {
batch(() => {
setActiveThread(props.comment.threadId);
diff --git a/js/app/packages/entity/src/composed/ListEntity.tsx b/js/app/packages/entity/src/composed/ListEntity.tsx
index f6c95b0f73..02d2359d43 100644
--- a/js/app/packages/entity/src/composed/ListEntity.tsx
+++ b/js/app/packages/entity/src/composed/ListEntity.tsx
@@ -201,8 +201,8 @@ export function ListEntity(props: ListEntityProps) {
{
'min-h-10 mx-1': !isMobile(),
'bg-accent/8': props.checked,
- 'ring ring-accent/16 ring-inset': props.checked && props.highlighted,
- 'ring ring-edge bg-active/60 ring-inset':
+ 'bg-accent/16': props.checked && props.highlighted,
+ 'bg-active/60':
props.highlighted && !props.checked && !isTouchDevice(),
'hover:bg-active/30':
!props.highlighted && !props.checked && !isTouchDevice(),
diff --git a/js/app/packages/entity/src/composed/list-entity/foreign.tsx b/js/app/packages/entity/src/composed/list-entity/foreign.tsx
index fda6223f49..b0d03acef5 100644
--- a/js/app/packages/entity/src/composed/list-entity/foreign.tsx
+++ b/js/app/packages/entity/src/composed/list-entity/foreign.tsx
@@ -330,7 +330,7 @@ function GithubPullRequestChecksPopover(props: {
class={cn(
'group/check-card relative flex h-8 w-full min-w-0 items-center gap-2 rounded-lg px-2 text-left text-xs font-medium outline-none',
hasUrl()
- ? 'cursor-default hover:bg-active hover:ring hover:ring-edge focus-visible:bg-ink/5'
+ ? 'cursor-default hover:bg-active focus-visible:bg-ink/5'
: 'cursor-not-allowed opacity-50'
)}
href={check.url ? check.url : undefined}
diff --git a/js/app/packages/property/src/extractors/PropertyTooltip.tsx b/js/app/packages/property/src/extractors/PropertyTooltip.tsx
index 9b9ec0f3d6..bea81dfa8b 100644
--- a/js/app/packages/property/src/extractors/PropertyTooltip.tsx
+++ b/js/app/packages/property/src/extractors/PropertyTooltip.tsx
@@ -1,6 +1,7 @@
import { PropertyTooltip as CorePropertyTooltip } from '@property/component/propertyValue/PropertyTooltip';
import { HoverCard } from '@ui';
-import type { JSX } from 'solid-js';
+import { type JSX, useContext } from 'solid-js';
+import { PropertyRootContext } from '../core/context';
import type { Property } from '../types';
type Props = {
@@ -12,10 +13,19 @@ type Props = {
* Wraps children in a HoverCard showing the property's tooltip content.
* The tooltip body is delegated to the existing CorePropertyTooltip so
* consumers see the same content across migrations.
+ *
+ * Suppresses the hover card while the editor popover is open (clicking the
+ * pill opens the popover anchored to the same trigger) so a click dismisses
+ * the hover card instead of stacking both surfaces. Reads the optional
+ * <Property.Root> context directly so it still works when used standalone.
*/
export function PropertyTooltip(props: Props) {
+ const ctx = useContext(PropertyRootContext);
return (
- <HoverCard content={<CorePropertyTooltip property={props.property} />}>
+ <HoverCard
+ content={<CorePropertyTooltip property={props.property} />}
+ disabled={ctx?.editorOpen() ?? false}
+ >
{props.children}
</HoverCard>
);
diff --git a/js/app/packages/ui/components/HoverCard.tsx b/js/app/packages/ui/components/HoverCard.tsx
index 61f3c1afb2..45d8e3be76 100644
--- a/js/app/packages/ui/components/HoverCard.tsx
+++ b/js/app/packages/ui/components/HoverCard.tsx
@@ -1,7 +1,7 @@
import { isTouchDevice } from '@core/mobile/isTouchDevice';
import type { Placement } from '@floating-ui/dom';
import { Tooltip as KobalteTooltip } from '@kobalte/core/tooltip';
-import { type JSX, type ParentProps, Show } from 'solid-js';
+import { createSignal, type JSX, type ParentProps, Show } from 'solid-js';
import { cn } from '../utils/classname';
import { Surface } from './Surface';
@@ -11,6 +11,13 @@ type HoverCardProps = ParentProps<{
placement?: Placement;
content: JSX.Element;
as?: 'div' | 'span';
+ /**
+ * When true, force the hover card closed and prevent it from opening on
+ * hover. Use to defer to another surface anchored on the same trigger — e.g.
+ * an editor popover that opens on click — so a click dismisses the hover card
+ * instead of stacking it on top of the popover.
+ */
+ disabled?: boolean;
}>;
/**
@@ -20,9 +27,17 @@ type HoverCardProps = ParentProps<{
* </HoverCard>
*/
export function HoverCard(props: HoverCardProps) {
+ // Controlled open: mirror Kobalte's hover-driven state via onOpenChange, then
+ // gate it on `disabled` so the card hides immediately when suppressed — even
+ // if it was already open when `disabled` flipped true.
+ const [hovered, setHovered] = createSignal(false);
+ const open = () => hovered() && !props.disabled;
+
return (
<Show when={!isTouchDevice()} fallback={props.children}>
<KobalteTooltip
+ open={open()}
+ onOpenChange={setHovered}
placement={props.placement ?? 'bottom'}
overflowPadding={16}
fitViewport={true}