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.

fix [properties-fe] - front matter panel horizontal scrolling on small screens

Daniel Kweone56124c14c81
diff --git a/js/app/packages/core/component/Properties/EntityValueDisplay.tsx b/js/app/packages/core/component/Properties/EntityValueDisplay.tsx
index 5147ec6944..b34f410064 100644
--- a/js/app/packages/core/component/Properties/EntityValueDisplay.tsx
+++ b/js/app/packages/core/component/Properties/EntityValueDisplay.tsx
@@ -183,7 +183,7 @@ export const EntityValueDisplay: Component<EntityValueDisplayProps> = (
return (
<div
- class="relative inline-flex max-w-[150px] shrink-0"
+ class="relative inline-flex max-w-[140px] shrink-0"
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
>
diff --git a/js/app/packages/core/component/Properties/components/PropertiesContent.tsx b/js/app/packages/core/component/Properties/components/PropertiesContent.tsx
index 9197e32162..c4727871e7 100644
--- a/js/app/packages/core/component/Properties/components/PropertiesContent.tsx
+++ b/js/app/packages/core/component/Properties/components/PropertiesContent.tsx
@@ -25,7 +25,7 @@ export const PropertiesContent: Component<PropertiesContentProps> = (props) => {
</Show>
<Show when={hasProperties()}>
- <div class="flex-1 overflow-y-auto px-2 pb-2">
+ <div class="flex-1 overflow-y-auto overflow-x-auto px-2 pb-2">
<PropertiesList properties={props.properties()} />
</div>
</Show>
diff --git a/js/app/packages/core/component/Properties/components/PropertiesList.tsx b/js/app/packages/core/component/Properties/components/PropertiesList.tsx
index 93dc9c5596..3e6cf8eb4c 100644
--- a/js/app/packages/core/component/Properties/components/PropertiesList.tsx
+++ b/js/app/packages/core/component/Properties/components/PropertiesList.tsx
@@ -49,7 +49,7 @@ export const PropertiesList: Component<PropertiesListProps> = (props) => {
</div>
}
>
- <div class="grid grid-cols-[minmax(auto,50%)_1fr] gap-x-4 gap-y-3 pt-2">
+ <div class="grid grid-cols-[minmax(120px,50%)_minmax(150px,1fr)] gap-x-4 gap-y-3 pt-2 min-w-fit">
<Show when={metadataProperties().length > 0}>
<For each={metadataProperties()}>
{(property) => (
diff --git a/js/app/packages/core/component/Properties/components/property-display/LinkValue.tsx b/js/app/packages/core/component/Properties/components/property-display/LinkValue.tsx
index 7af2ddec56..42de617972 100644
--- a/js/app/packages/core/component/Properties/components/property-display/LinkValue.tsx
+++ b/js/app/packages/core/component/Properties/components/property-display/LinkValue.tsx
@@ -254,7 +254,7 @@ const LinkDisplay: Component<LinkDisplayProps> = (props) => {
return (
<div
- class="relative inline-flex max-w-[225px] shrink-0"
+ class="relative inline-flex max-w-[200px] shrink-0"
onMouseEnter={() => props.setHoveredLink(props.url)}
onMouseLeave={() => props.setHoveredLink(null)}
>
diff --git a/js/app/packages/core/component/Properties/components/property-display/SelectValue.tsx b/js/app/packages/core/component/Properties/components/property-display/SelectValue.tsx
index 0bf2c4c22c..573e24cd08 100644
--- a/js/app/packages/core/component/Properties/components/property-display/SelectValue.tsx
+++ b/js/app/packages/core/component/Properties/components/property-display/SelectValue.tsx
@@ -77,7 +77,7 @@ export const SelectValue: Component<SelectValueProps> = (props) => {
const isHovered = () => hoveredValue() === value;
return (
<div
- class="relative inline-flex max-w-[150px] shrink-0"
+ class="relative inline-flex max-w-[140px] shrink-0"
onMouseEnter={() => setHoveredValue(value)}
onMouseLeave={() => setHoveredValue(null)}
>
diff --git a/js/app/packages/core/component/Properties/components/property-display/TextValue.tsx b/js/app/packages/core/component/Properties/components/property-display/TextValue.tsx
index 125d92598b..134fba6bb6 100644
--- a/js/app/packages/core/component/Properties/components/property-display/TextValue.tsx
+++ b/js/app/packages/core/component/Properties/components/property-display/TextValue.tsx
@@ -43,6 +43,11 @@ export const TextValue: Component<TextValueProps> = (props) => {
}
};
+ const hasValue = () =>
+ props.property.value &&
+ typeof props.property.value === 'string' &&
+ props.property.value.length > 0;
+
return (
<Show
when={editor.isEditing()}
@@ -55,14 +60,7 @@ export const TextValue: Component<TextValueProps> = (props) => {
: 'bg-transparent text-ink-muted cursor-default'
} block max-w-full break-words`}
>
- <Show
- when={
- props.property.value &&
- typeof props.property.value === 'string' &&
- props.property.value.length > 0
- }
- fallback={<>—</>}
- >
+ <Show when={hasValue()} fallback={<>—</>}>
<span class="block max-w-full">
{formatPropertyValue(
props.property,
diff --git a/js/app/packages/core/component/Properties/styles/propertyStyles.ts b/js/app/packages/core/component/Properties/styles/propertyStyles.ts
index ad93bc3b3d..a13b73538a 100644
--- a/js/app/packages/core/component/Properties/styles/propertyStyles.ts
+++ b/js/app/packages/core/component/Properties/styles/propertyStyles.ts
@@ -38,9 +38,9 @@ export const PROPERTY_STYLES = {
button:
'text-right text-ink text-xs hover:bg-hover px-2 py-1 cursor-pointer border border-edge bg-transparent inline-block max-w-full',
multi:
- 'text-right text-xs px-2 py-1 border border-edge bg-transparent inline-block shrink-0 max-w-[150px] break-words',
+ 'text-right text-xs px-2 py-1 border border-edge bg-transparent inline-block shrink-0 max-w-[140px] break-words',
multiButton:
- 'text-right text-ink text-xs hover:bg-hover px-2 py-1 cursor-pointer border border-edge bg-transparent inline-block shrink-0 max-w-[150px] break-words',
+ 'text-right text-ink text-xs hover:bg-hover px-2 py-1 cursor-pointer border border-edge bg-transparent inline-block shrink-0 max-w-[140px] break-words',
},
checkbox: {