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: model version name overflow on mobile [ET-384] #9827

Merged
merged 2 commits into from
Aug 20, 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
Original file line number Diff line number Diff line change
@@ -1,46 +1,38 @@
.base {
background-color: var(--theme-colors-monochrome-17);
margin: 0;
padding: 12px;
width: 100%;

.breadcrumbs {
border-bottom: 1px solid var(--theme-colors-monochrome-12);
padding-bottom: 8px;
}
.headerContent {
margin: 0 12px;

.mainRow {
align-items: center;
display: flex;
flex-shrink: 1;
gap: 8px;
justify-content: space-between;
margin: 12px 0;
max-width: 100%;

.title {
align-items: center;
display: flex;
gap: 12px;

.versionBox {
background-color: var(--theme-colors-monochrome-14);
border-radius: 15%;
height: min-content;
padding: 8px;
width: min-content;
}
.versionName {
font-size: 24px;
margin: 0;
}
.versionBox {
background-color: var(--theme-surface-strong);
border-radius: 15%;
height: min-content;
padding: 8px;
width: min-content;
}
.versionName {
font-size: 24px;
margin: 0;
}
.buttons {
display: flex;
gap: 4px;
}
.buttons {
display: flex;
gap: 4px;

.overflowAction {
display: block;
}
.overflowAction {
display: block;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Nameplate from 'hew/Nameplate';
import Row from 'hew/Row';
import Spinner from 'hew/Spinner';
import Tags, { tagsActionHelper } from 'hew/Tags';
import { Title } from 'hew/Typography';
import React, { useCallback, useEffect, useMemo, useState } from 'react';

import ModelDownloadModal from 'components/ModelDownloadModal';
Expand Down Expand Up @@ -155,14 +156,14 @@ const ModelVersionHeader: React.FC<Props> = ({
return (
<header className={css.base}>
<div className={css.headerContent}>
<div className={css.mainRow}>
<div className={css.title}>
<Row justifyContent="space-between" wrap>
<div className={css.mainRow}>
<div className={css.versionBox}>V{modelVersion.version}</div>
<h1 className={css.versionName}>
{modelVersion.name ? modelVersion.name : `Version ${modelVersion.version}`}
</h1>
<Title truncate={{ tooltip: true }}>
EmilyBonar marked this conversation as resolved.
Show resolved Hide resolved
{modelVersion.name || `Version ${modelVersion.version}`}
</Title>
</div>
<div className={css.buttons}>
<Row wrap>
{menu.slice(0, 2).map((item) => (
<Button
danger={item.danger}
Expand All @@ -178,8 +179,8 @@ const ModelVersionHeader: React.FC<Props> = ({
type="text"
/>
</Dropdown>
</div>
</div>
</Row>
</Row>
<Glossary content={infoRows} />
</div>
<modelDownloadModal.Component modelVersion={modelVersion} />
Expand Down
Loading