Skip to content

Commit

Permalink
Merge pull request #3144 from opral/filp-history-rows
Browse files Browse the repository at this point in the history
flip the rows in the History view and the arrow
  • Loading branch information
NilsJacobsen authored Sep 25, 2024
2 parents a2eaae0 + 032a7a5 commit 4491b19
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions lix/packages/csv-app2/src/components/HistoryEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,17 @@ export const HistoryEntry = (props: { commit: Commit }) => {
{changed_col}
</p>
</SlTooltip>
{change.previous?.value?.[changed_col] ? (
{change.current.value?.[changed_col] ? (
<SlTooltip
content={change.previous.value?.[changed_col]}
content={change.current.value?.[changed_col]}
>
<p className="px-3 py-1.5 bg-zinc-200 flex-1 md:w-[140px] overflow-hidden whitespace-nowrap text-ellipsis">
{change.previous.value?.[changed_col]}
<p className="px-3 py-1.5 bg-white border border-zinc-200 flex-1 md:w-[140px] overflow-hidden whitespace-nowrap text-ellipsis">
{change.current.value?.[changed_col]}
</p>
</SlTooltip>
) : (
<p className="px-3 py-1.5 min-h-[38px] bg-zinc-100 border border-zinc-400 border-dashed flex-1 md:w-[140px]"></p>
)}

<svg
xmlns="http://www.w3.org/2000/svg"
width="18"
Expand All @@ -157,15 +156,15 @@ export const HistoryEntry = (props: { commit: Commit }) => {
>
<path
fill="currentColor"
d="M11 4h2v12l5.5-5.5l1.42 1.42L12 19.84l-7.92-7.92L5.5 10.5L11 16z"
d="M11 20h2V8l5.5 5.5l1.42-1.42L12 4.16l-7.92 7.92L5.5 13.5L11 8z"
/>
</svg>
{change.current.value?.[changed_col] ? (
{change.previous?.value?.[changed_col] ? (
<SlTooltip
content={change.current.value?.[changed_col]}
content={change.previous.value?.[changed_col]}
>
<p className="px-3 py-1.5 bg-white border border-zinc-200 flex-1 md:w-[140px] overflow-hidden whitespace-nowrap text-ellipsis">
{change.current.value?.[changed_col]}
<p className="px-3 py-1.5 bg-zinc-200 flex-1 md:w-[140px] overflow-hidden whitespace-nowrap text-ellipsis">
{change.previous.value?.[changed_col]}
</p>
</SlTooltip>
) : (
Expand Down

0 comments on commit 4491b19

Please sign in to comment.