Skip to content

Commit

Permalink
fix: more comprehensive handling of invalid event rendering (#13645)
Browse files Browse the repository at this point in the history
  • Loading branch information
chandlerprall committed Aug 23, 2024
1 parent 7f329c9 commit 63ef176
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,17 @@
background-color: colors.$grey-100;
transform: translateX(-50%);
}

&:empty {
// virtuoso cannot gracefully handle a <1px item inside an li, so we need to return a 1px tall empty item
// https://virtuoso.dev/troubleshooting/#i-get-error-zero-sized-element-this-should-not-happen
// https://github.com/petyosi/react-virtuoso/issues/35
height: 1px;

/* stylelint-disable-next-line no-descending-specificity */
&::before {
background-color: transparent;
}
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Box } from "components/ui/Box";
import { ConnectionEvent } from "core/api/types/AirbyteClient";

import { ClearEventItem } from "./ClearEventItem";
import styles from "./EventLineItem.module.scss";
import { JobStartEventItem } from "./JobStartEventItem";
import { RefreshEventItem } from "./RefreshEventItem";
import { RunningJobItem } from "./RunningJobItem";
Expand Down Expand Up @@ -59,8 +58,5 @@ export const EventLineItem: React.FC<{ event: ConnectionEvent | InferType<typeof
</Box>
);
}
// virtuoso cannot gracefully handle a <1px item inside an li, so we need to return a 1px tall empty item
// https://virtuoso.dev/troubleshooting/#i-get-error-zero-sized-element-this-should-not-happen
// https://github.com/petyosi/react-virtuoso/issues/35
return <span className={styles.emptyItem} />;
return null;
};

0 comments on commit 63ef176

Please sign in to comment.