Skip to content
Merged
2 changes: 1 addition & 1 deletion js/app/packages/app/component/Soup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ export function Soup() {
>
<Tabs
ref={tabsRef}
class="@container/soup flex flex-col gap-1 size-full overflow-x-clip"
class="@container/soup [container-type:inline-size] flex flex-col gap-1 size-full overflow-x-clip"
classList={{
'border-r border-edge-muted': preview(),
'pt-2 pb-0': showHelpDrawer().has(selectedView()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,11 +533,11 @@ export function EntityWithEverything(
}}
>
<div class="flex flex-row items-center justify-end gap-2 min-w-0">
<div class="flex flex-row items-center justify-end w-fit h-full pr-3">
<Show when={properties().length > 0}>
<Show when={properties().length > 0}>
<div class="pr-2 overflow-hidden shrink min-w-0">
<PropertyPills properties={properties()} />
</Show>
</div>
</div>
</Show>
<Show when={sharedData()}>
{(shared) => (
<Tooltip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@ export const BooleanPropertyPill = (props: BooleanPropertyPillProps) => {
style={{ 'clip-path': cornerClip('0.2rem', 0, 0, 0) }}
>
<div
class="inline-flex items-center gap-1.5 px-2 py-1 text-xs leading-none text-ink-muted bg-panel box-border"
class="inline-flex items-center gap-1.5 p-1.5 @3xl/soup:px-2 @3xl/soup:py-1 text-xs leading-none text-ink-muted bg-panel box-border"
style={{ 'clip-path': cornerClip('calc(0.2rem - 0.5px)', 0, 0, 0) }}
>
<PropertyDataTypeIcon
property={{
data_type: 'BOOLEAN',
}}
class="size-3.5 shrink-0"
/>
<span class="truncate max-w-[120px]">
<span class="truncate max-w-[120px] hidden @3xl/soup:inline">
{props.property.displayName}
</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,13 @@ const SingleEntityPill = (props: SingleEntityPillProps) => {
style={{ 'clip-path': cornerClip('0.2rem', 0, 0, 0) }}
>
<div
class="inline-flex items-center gap-1.5 px-2 py-1 text-xs leading-none text-ink-muted bg-panel box-border"
class="inline-flex items-center gap-1.5 p-1.5 @3xl/soup:px-2 @3xl/soup:py-1 text-xs leading-none text-ink-muted bg-panel box-border"
style={{ 'clip-path': cornerClip('calc(0.2rem - 0.5px)', 0, 0, 0) }}
>
<Show when={entityIcon()}>{entityIcon()}</Show>
<span class="truncate max-w-[120px]">{entityName()}</span>
<span class="truncate max-w-[120px] hidden @3xl/soup:inline">
{entityName()}
</span>
</div>
</div>
</Tooltip>
Expand Down Expand Up @@ -236,16 +238,17 @@ const MultiEntityPill = (props: MultiEntityPillProps) => {
style={{ 'clip-path': cornerClip('0.2rem', 0, 0, 0) }}
>
<div
class="inline-flex items-center gap-1.5 px-2 py-1 text-xs leading-none text-ink-muted bg-panel box-border"
class="inline-flex items-center gap-1.5 p-1.5 @3xl/soup:px-2 @3xl/soup:py-1 text-xs leading-none text-ink-muted bg-panel box-border"
style={{ 'clip-path': cornerClip('calc(0.2rem - 0.5px)', 0, 0, 0) }}
>
<PropertyDataTypeIcon
property={{
data_type: 'ENTITY',
specific_entity_type: props.property.specificEntityType,
}}
class="size-3.5 shrink-0"
/>
<span class="truncate max-w-[120px]">
<span class="truncate max-w-[120px] hidden @3xl/soup:inline">
{props.property.displayName} ({props.entities.length})
</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,24 @@ const SingleLinkPill = (props: SingleLinkPillProps) => {
style={{ 'clip-path': cornerClip('0.2rem', 0, 0, 0) }}
>
<div
class="inline-flex items-center gap-1.5 px-2 py-1 text-xs leading-none text-ink-muted bg-panel box-border"
class="inline-flex items-center gap-1.5 p-1.5 @3xl/soup:px-2 @3xl/soup:py-1 text-xs leading-none text-ink-muted bg-panel box-border"
style={{ 'clip-path': cornerClip('calc(0.2rem - 0.5px)', 0, 0, 0) }}
>
<Show
when={faviconUrl() && !imageError()}
fallback={<LinkIcon class="size-4 text-ink-muted" />}
fallback={<LinkIcon class="size-4 text-ink-muted shrink-0" />}
>
<img
src={faviconUrl()!}
class="size-4 object-cover rounded"
class="size-4 object-cover rounded shrink-0"
crossorigin="anonymous"
alt=""
onError={() => setImageError(true)}
/>
</Show>
<span class="truncate max-w-[100px]">{title()}</span>
<span class="truncate max-w-[100px] hidden @3xl/soup:inline">
{title()}
</span>
</div>
</div>
</Tooltip>
Expand Down Expand Up @@ -170,15 +172,16 @@ const MultiLinkPill = (props: MultiLinkPillProps) => {
style={{ 'clip-path': cornerClip('0.2rem', 0, 0, 0) }}
>
<div
class="inline-flex items-center gap-1.5 px-2 py-1 text-xs leading-none text-ink-muted bg-panel box-border"
class="inline-flex items-center gap-1.5 p-1.5 @3xl/soup:px-2 @3xl/soup:py-1 text-xs leading-none text-ink-muted bg-panel box-border"
style={{ 'clip-path': cornerClip('calc(0.2rem - 0.5px)', 0, 0, 0) }}
>
<PropertyDataTypeIcon
property={{
data_type: 'LINK',
}}
class="size-3.5 shrink-0"
/>
<span class="truncate max-w-[120px]">
<span class="truncate max-w-[120px] hidden @3xl/soup:inline">
{props.property.displayName} ({props.urls.length})
</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const PropertyPills = (props: PropertyPillsProps) => {

return (
<Show when={props.properties.length > 0}>
<div class="flex items-center gap-1 flex-wrap justify-end">
<div class="flex items-center gap-1 justify-end">
<For each={displayProperties()}>
{(property) => <PropertyPill property={property} />}
</For>
Expand Down Expand Up @@ -65,7 +65,10 @@ const PropertyPill = (props: PropertyPillProps) => {
};

/**
* Pill for String, Number, Date, Select types
* Pill - shows icon + text when wide, icon only when narrow
* Uses @container/soup from Soup.tsx
* - >= @3xl (~768px): full (icon + text)
* - < @3xl: compact (icon only)
*/
const TextPropertyPill = (props: PropertyPillProps) => {
const displayValue = () => formatPillValue(props.property);
Expand All @@ -83,20 +86,21 @@ const TextPropertyPill = (props: PropertyPillProps) => {
}}
>
<div
class="p-px bg-edge box-border h-fit flex items-center"
class="p-px bg-edge box-border h-fit flex items-center shrink-0"
style={{ 'clip-path': cornerClip('0.2rem', 0, 0, 0) }}
>
<div
class="inline-flex items-center gap-1.5 px-2 py-1 text-xs leading-none text-ink-muted bg-panel box-border"
class="inline-flex items-center gap-1.5 p-1.5 @3xl/soup:px-2 @3xl/soup:py-1 text-xs leading-none text-ink-muted bg-panel box-border"
style={{ 'clip-path': cornerClip('calc(0.2rem - 0.5px)', 0, 0, 0) }}
>
<PropertyDataTypeIcon
property={{
data_type: props.property.valueType,
specific_entity_type: props.property.specificEntityType,
}}
class="size-3.5 shrink-0"
/>
<span class="truncate max-w-[120px]" title={value}>
<span class="truncate max-w-[100px] hidden @3xl/soup:inline">
{value}
</span>
</div>
Expand Down