Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
add [properties-fe] - improve display property pills styling to match sort property pill (#372)
Daniel Kweona5e04bff025a
diff --git a/js/app/packages/app/component/PropertyDisplayControl.tsx b/js/app/packages/app/component/PropertyDisplayControl.tsxindex 55201dc5a8..27e26ad229 100644--- a/js/app/packages/app/component/PropertyDisplayControl.tsx+++ b/js/app/packages/app/component/PropertyDisplayControl.tsx@@ -1,10 +1,9 @@-import { IconButton } from '@core/component/IconButton';import type { PropertyDefinitionFlat } from '@core/component/Properties/types';import { PropertyDataTypeIcon } from '@core/component/Properties/utils';import { ERROR_MESSAGES } from '@core/component/Properties/utils/errorHandling';import { toast } from '@core/component/Toast/Toast';import { isErr } from '@core/util/maybeResult';-import DeleteIcon from '@icon/bold/x-bold.svg';+import XIcon from '@phosphor-icons/core/assets/regular/x.svg';import { propertiesServiceClient } from '@service-properties/client';import type { Accessor, Component } from 'solid-js';import {@@ -111,42 +110,30 @@ const SuggestedPill: Component<SuggestedPillProps> = (props) => {};const PropertyPill: Component<PropertyPillProps> = (props) => {- const [isHovered, setIsHovered] = createSignal(false);-return (- <div- class="relative inline-flex max-w-[140px] shrink-0"- onMouseEnter={() => setIsHovered(true)}- onMouseLeave={() => setIsHovered(false)}- >+ <div class="inline-flex max-w-[200px] shrink-0"><div- class="w-full min-h-[24px]- inline-flex items-center gap-2+ class="min-h-[24px]+ inline-flex items-center gap-1.5px-2 py-1text-xs text-inkbg-transparent hover:bg-hoverborder border-edge- cursor-pointer"+ min-w-0 overflow-hidden">- <PropertyDataTypeIcon property={props.property} />- <span class="truncate flex-1 font-mono">- {props.property.display_name}- </span>- <Show when={isHovered()}>- <div class="absolute right-1 inset-y-0 flex items-center">- <IconButton- icon={DeleteIcon}- theme="clear"- size="xs"- class="!text-failure !bg-[#2a2a2a] hover:!bg-[#444444] !cursor-pointer !w-4 !h-4 !min-w-4 !min-h-4"- onClick={(e) => {- e.stopPropagation();- props.onRemove();- }}- />- </div>- </Show>+ <PropertyDataTypeIcon property={props.property} class="shrink-0" />+ <span class="truncate font-mono">{props.property.display_name}</span></div>+ <button+ type="button"+ onClick={(e) => {+ e.stopPropagation();+ props.onRemove();+ }}+ class="px-1 bg-edge-muted hover:opacity-70 transition-opacity shrink-0 border border-edge"+ >+ <XIcon class="size-3.5" />+ </button></div>);};@@ -345,18 +332,10 @@ export const PropertyDisplayControl: Component<PropertyDisplayControlProps> = (<divref={containerRef}- class="flex flex-col- border border-edge- w-full max-w-full- focus-within:ring-2 focus-within:ring-accent/50 focus-within:border-accent"+ class="flex flex-col gap-1 w-full max-w-full border border-edge focus-within:ring-2 focus-within:ring-accent/50 focus-within:border-accent"><Show when={selectedProperties().length > 0}>- <div- class="w-full h-fit- flex flex-wrap items-start justify-start- gap-1- px-1.5 pt-1.5 pb-0.5"- >+ <div class="w-full h-fit px-1 pt-1 flex flex-wrap items-start justify-start gap-1"><For each={selectedProperties()}>{(property) => (<PropertyPill@@ -368,7 +347,7 @@ export const PropertyDisplayControl: Component<PropertyDisplayControlProps> = (</div></Show>- <div class="px-1 py-0.5 relative">+ <div class="relative w-full"><inputref={searchInputRef}type="text"@@ -379,11 +358,7 @@ export const PropertyDisplayControl: Component<PropertyDisplayControlProps> = (}}onFocus={() => setIsDropdownOpen(true)}placeholder="Search Properties..."- class="w-full- px-2 py-1- font-mono text-xs- text-ink placeholder-ink-muted- bg-transparent"+ class="w-full px-2 py-1 font-mono text-xs text-ink placeholder-ink-muted bg-transparent"/><PropertyDropdown