-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated * to itwinui 3 #141
base: main
Are you sure you want to change the base?
Changes from 2 commits
73d8f25
4036a55
563f7fd
f4b53dc
a40ceab
db5e7a7
64a4b1c
3202c29
0b228ca
2046e4b
dade065
c72c000
283a12f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@itwin/imodel-browser-react", | ||
"comment": "updade to 3.x", | ||
"type": "patch" | ||
} | ||
], | ||
"packageName": "@itwin/imodel-browser-react" | ||
} |
Large diffs are not rendered by default.
aruniverse marked this conversation as resolved.
Show resolved
Hide resolved
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,40 +85,45 @@ export const ITwinTile = ({ | |
); | ||
return ( | ||
<ThemeProvider theme="inherit"> | ||
<Tile | ||
key={iTwin?.id} | ||
name={<span title={iTwin?.displayName}>{iTwin?.displayName}</span>} | ||
description={<span title={iTwin?.number}>{iTwin?.number ?? ""}</span>} | ||
badge={ | ||
iTwin?.status && | ||
iTwin.status.toLocaleLowerCase() !== "active" && ( | ||
<Badge | ||
backgroundColor={ | ||
iTwin.status.toLocaleLowerCase() === "inactive" | ||
? "#A47854" /** $iui-color-background-oak */ | ||
: "#4585A5" /** $iui-color-background-steelblue */ | ||
} | ||
<Tile.Wrapper key={iTwin?.id} {...(tileProps ?? {})}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change will cause issue with anyone using the property overrides, as they used to be able to modifiy all the props through useIndidividualState, which infrastructure cloud use, and now we completely loose this ability, it is no longer possible to override anything in the tile, for example, if you want to add information to the bottom of the tile, or change the image to add a saved view drop down, that is no longer possible. I dont think this is a viable solution for this particular package. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or, if we really need thos, we need to take into account the tile props and redistribute them within this Tile.Wrapper elements as https://github.com/iTwin/iTwinUI/blob/5e310430f93094ff6aaa2bf1255d8a54cf5a103c/packages/itwinui-react/src/core/Tile/Tile.tsx#L544 is already doing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I believe I did it in the same way, the remaining props are |
||
<Tile.Action | ||
onClick={() => onThumbnailClick?.(iTwin)} | ||
aria-label={ | ||
onThumbnailClick ? `${strings.navigateToITwin} ${iTwin?.id}` : "" | ||
} | ||
> | ||
<Tile.ThumbnailArea> | ||
<Tile.BadgeContainer> | ||
{iTwin?.status && | ||
iTwin.status.toLocaleLowerCase() !== "active" && ( | ||
<Badge | ||
backgroundColor={ | ||
iTwin.status.toLocaleLowerCase() === "inactive" | ||
? "oak" | ||
: "steelblue" | ||
} | ||
> | ||
{iTwin.status.toLocaleLowerCase() === "inactive" | ||
? strings.inactiveBadge | ||
: strings.trialBadge} | ||
</Badge> | ||
)} | ||
</Tile.BadgeContainer> | ||
<Tile.ThumbnailPicture | ||
style={{ cursor: onThumbnailClick ? "pointer" : "auto" }} | ||
> | ||
{iTwin.status.toLocaleLowerCase() === "inactive" | ||
? strings.inactiveBadge | ||
: strings.trialBadge} | ||
</Badge> | ||
) | ||
} | ||
moreOptions={moreOptions} | ||
thumbnail={ | ||
<div | ||
role="button" | ||
aria-label={ | ||
onThumbnailClick ? `${strings.navigateToITwin} ${iTwin?.id}` : "" | ||
} | ||
onClick={() => onThumbnailClick?.(iTwin)} | ||
style={{ cursor: onThumbnailClick ? "pointer" : "auto" }} | ||
> | ||
<ITwinIcon /> | ||
</div> | ||
} | ||
rightIcon={ | ||
<ITwinIcon /> | ||
</Tile.ThumbnailPicture> | ||
</Tile.ThumbnailArea> | ||
</Tile.Action> | ||
<Tile.Name> | ||
<Tile.NameLabel>{iTwin?.displayName}</Tile.NameLabel> | ||
</Tile.Name> | ||
<Tile.ContentArea> | ||
<Tile.Description>{iTwin?.number ?? ""}</Tile.Description> | ||
</Tile.ContentArea> | ||
<Tile.MoreOptions>{moreOptions}</Tile.MoreOptions> | ||
<Tile.Buttons> | ||
<IconButton | ||
aria-label={ | ||
isFavorite ? strings.removeFromFavorites : strings.addToFavorites | ||
|
@@ -132,9 +137,8 @@ export const ITwinTile = ({ | |
> | ||
{isFavorite ? <SvgStar /> : <SvgStarHollow />} | ||
</IconButton> | ||
} | ||
{...(tileProps ?? {})} | ||
/> | ||
</Tile.Buttons> | ||
</Tile.Wrapper> | ||
</ThemeProvider> | ||
); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think itiwnui would need to become a peer dep
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated all packages in monorepo