Skip to content

Commit

Permalink
fix: naive fix for changed entity borders
Browse files Browse the repository at this point in the history
Reverted to simple square corners for now until we can correctly set top and bottom rounded borders
  • Loading branch information
baiirun committed Jan 10, 2025
1 parent 41b15b8 commit 792d064
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions apps/web/partials/diff/changed-entity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ const ChangedAttribute = ({ changes, renderAttributeStagingComponent }: ChangedA
case 'TEXT': {
return (
<div key={attributeId} className="-mt-px flex gap-8">
<div className="flex-1 border border-grey-02 p-4 first:rounded-t-lg last:rounded-b-lg">
<div className="flex-1 border border-grey-02 p-4">
<div className="text-bodySemibold capitalize">{name}</div>
<div className="text-body">
{changes.map(c => {
Expand All @@ -292,7 +292,7 @@ const ChangedAttribute = ({ changes, renderAttributeStagingComponent }: ChangedA
})}
</div>
</div>
<div className="group relative flex-1 border border-grey-02 p-4 first:rounded-b-lg last:rounded-t-lg">
<div className="group relative flex-1 border border-grey-02 p-4">
{renderAttributeStagingComponent?.(attributeId)}
<div className="text-bodySemibold capitalize">{name}</div>
<div className="text-body">
Expand All @@ -317,7 +317,7 @@ const ChangedAttribute = ({ changes, renderAttributeStagingComponent }: ChangedA
case 'CHECKBOX': {
return (
<div key={attributeId} className="-mt-px flex gap-8">
<div className="flex-1 border border-grey-02 p-4 first:rounded-t-lg last:rounded-b-lg">
<div className="flex-1 border border-grey-02 p-4">
<div className="text-bodySemibold capitalize">{name}</div>
<div className="text-body">
{changes.map((c, index) => {
Expand All @@ -329,7 +329,7 @@ const ChangedAttribute = ({ changes, renderAttributeStagingComponent }: ChangedA
})}
</div>
</div>
<div className="group relative flex-1 border border-grey-02 p-4 first:rounded-b-lg last:rounded-t-lg">
<div className="group relative flex-1 border border-grey-02 p-4">
{renderAttributeStagingComponent?.(attributeId)}
<div className="text-bodySemibold capitalize">{name}</div>
<div className="text-body">
Expand All @@ -348,15 +348,15 @@ const ChangedAttribute = ({ changes, renderAttributeStagingComponent }: ChangedA
case 'RELATION': {
return (
<div key={attributeId} className="-mt-px flex gap-8">
<div className="flex-1 border border-grey-02 p-4 first:rounded-b-lg last:rounded-t-lg">
<div className="flex-1 border border-grey-02 p-4">
<div className="text-bodySemibold capitalize">{name}</div>
<div className="flex flex-wrap gap-2">
{changes.map(c => {
return c.before && <Chip status={c.before.type}>{c.before.valueName ?? c.before.value}</Chip>;
})}
</div>
</div>
<div className="group relative flex-1 border border-grey-02 p-4 first:rounded-t-lg last:rounded-b-lg">
<div className="group relative flex-1 border border-grey-02 p-4">
{renderAttributeStagingComponent?.(attributeId)}
<div className="text-bodySemibold capitalize">{name}</div>
<div className="flex flex-wrap gap-2">
Expand All @@ -376,7 +376,7 @@ const ChangedAttribute = ({ changes, renderAttributeStagingComponent }: ChangedA
// case 'IMAGE': {
// return (
// <div key={attributeId} className="-mt-px flex gap-8">
// <div className="flex-1 border border-grey-02 p-4 first:rounded-t-lg last:rounded-b-lg">
// <div className="flex-1 border border-grey-02 p-4">
// <div className="text-bodySemibold capitalize">{name}</div>
// <div>
// {typeof before !== 'object' && (
Expand All @@ -386,7 +386,7 @@ const ChangedAttribute = ({ changes, renderAttributeStagingComponent }: ChangedA
// )}
// </div>
// </div>
// <div className="group relative flex-1 border border-grey-02 p-4 first:rounded-t-lg last:rounded-b-lg">
// <div className="group relative flex-1 border border-grey-02 p-4">
// <div className="absolute right-0 top-0 inline-flex items-center gap-4 p-4">
// <SquareButton
// onClick={handleDeleteActions}
Expand All @@ -410,7 +410,7 @@ const ChangedAttribute = ({ changes, renderAttributeStagingComponent }: ChangedA
case 'TIME': {
return (
<div key={attributeId} className="-mt-px flex gap-8">
<div className="flex-1 border border-grey-02 p-4 first:rounded-t-lg last:rounded-b-lg">
<div className="flex-1 border border-grey-02 p-4">
<div className="text-bodySemibold capitalize">{name}</div>
<div className="text-body">
{changes.map(c => {
Expand All @@ -419,7 +419,7 @@ const ChangedAttribute = ({ changes, renderAttributeStagingComponent }: ChangedA
})}
</div>
</div>
<div className="flex-1 border border-grey-02 p-4 first:rounded-t-lg last:rounded-b-lg">
<div className="flex-1 border border-grey-02 p-4">
{renderAttributeStagingComponent?.(attributeId)}
<div className="text-bodySemibold capitalize">{name}</div>
<div className="text-body">
Expand All @@ -435,7 +435,7 @@ const ChangedAttribute = ({ changes, renderAttributeStagingComponent }: ChangedA
case 'URL': {
return (
<div key={attributeId} className="-mt-px flex gap-8">
<div className="flex-1 border border-grey-02 p-4 first:rounded-t-lg last:rounded-b-lg">
<div className="flex-1 border border-grey-02 p-4">
<div className="text-bodySemibold capitalize">{name}</div>
<div className="truncate text-ctaPrimary no-underline">
{changes.map(c => {
Expand All @@ -453,7 +453,7 @@ const ChangedAttribute = ({ changes, renderAttributeStagingComponent }: ChangedA
})}
</div>
</div>
<div className="group relative flex-1 border border-grey-02 p-4 first:rounded-t-lg last:rounded-b-lg">
<div className="group relative flex-1 border border-grey-02 p-4">
{renderAttributeStagingComponent?.(attributeId)}
<div className="text-bodySemibold capitalize">{name}</div>
<div className="truncate text-ctaPrimary no-underline">
Expand Down

0 comments on commit 792d064

Please sign in to comment.