Skip to content
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

fix: some costmetic issues: badges corner, recommended for tensorrt models #2346

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion uikit/src/badge/styles.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.badge {
@apply focus:ring-ring border-border inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2;
@apply focus:ring-ring border-border inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2;

&-primary {
@apply border-transparent bg-blue-100 text-blue-600;
Expand Down
2 changes: 1 addition & 1 deletion web/containers/DropdownListSidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ const DropdownListSidebar = ({
<span className="font-bold text-muted-foreground">
{toGibibytes(x.metadata.size)}
</span>
{x.engine == InferenceEngine.nitro && (
{x.metadata.size && (
<ModelLabel size={x.metadata.size} />
)}
</div>
Expand Down
7 changes: 4 additions & 3 deletions web/screens/ExploreModels/ExploreModelItemHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,11 @@
const EngineBadge: React.FC<EngineBadgeProps> = ({ engine }) => {
switch (engine) {
case 'nitro-tensorrt-llm':
const title = 'TensorRT-LLM'

Check failure on line 183 in web/screens/ExploreModels/ExploreModelItemHeader/index.tsx

View workflow job for this annotation

GitHub Actions / test-on-macos

Unexpected lexical declaration in case block

Check failure on line 183 in web/screens/ExploreModels/ExploreModelItemHeader/index.tsx

View workflow job for this annotation

GitHub Actions / test-on-windows (mcafee)

Unexpected lexical declaration in case block

Check failure on line 183 in web/screens/ExploreModels/ExploreModelItemHeader/index.tsx

View workflow job for this annotation

GitHub Actions / test-on-ubuntu

Unexpected lexical declaration in case block
return (
<div className="flex items-center justify-center rounded-md bg-[#EFF6FF] px-2 py-[2px] font-semibold text-primary">
TensorRT-LLM
</div>
<Badge themes="primary" className="line-clamp-1" title={title}>
{title}
</Badge>
)
default:
return null
Expand Down
Loading