Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/@itwin-tree-widget-react-fancy-ears-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@itwin/tree-widget-react": patch
---

Fix tree widget header skeletons not matching real component heights
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ function LoadingTree() {
<SelectableTree
buttons={
<>
<Skeleton variant={"rounded"} width={28} height={28} />
<Skeleton variant={"rounded"} width={28} height={28} />
<Skeleton variant={"rounded"} width={28} height={28} />
<Skeleton variant={"rounded"} width={28} height={28} />
<Skeleton variant={"rounded"} width={28} height={28} />
<Skeleton variant={"rounded"} width={28} height={28} />
<Skeleton variant={"rounded"} width={24} height={24} />
<Skeleton variant={"rounded"} width={24} height={24} />
<Skeleton variant={"rounded"} width={24} height={24} />
<Skeleton variant={"rounded"} width={24} height={24} />
<Skeleton variant={"rounded"} width={24} height={24} />
<Skeleton variant={"rounded"} width={24} height={24} />
</>
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export function WidgetHeader({ defaultSelectedContentId, trees, onSelect, onSear
function LoadingHeader() {
return (
<div className="tw-content-header">
<Skeleton variant={"rounded"} className={"tw-content-header-search"} height={24} />
<Skeleton variant={"rounded"} className={"tw-content-header-search"} height={22} />
<Skeleton variant={"rounded"} width={24} height={24} style={{ flexShrink: 0 }} />
Comment thread
grigasp marked this conversation as resolved.
Resolved
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions packages/tree-widget/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ export default defineConfig({
expect: {
toMatchScreenshot: {
comparatorName: "pixelmatch",
/* Any pixel differing by more than 5% (YIQ color distance) fails; tolerates only subtle antialiasing noise. */
comparatorOptions: { threshold: 0.05 },
/* Any pixel differing by more than 2% (YIQ color distance) fails; tolerates only subtle antialiasing noise. */
comparatorOptions: { threshold: 0.02 },
},
},
},
Expand Down
Loading