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

fixed some text wrapping issues in side nav and file download component #1783

Merged
merged 4 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 4 additions & 2 deletions frontend/src/entry/model/releases/FileDownload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,12 @@ export default function FileDownload({ modelId, file }: FileDownloadProps) {
<>
{isFileInterface(file) && (
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={2} alignItems='center' justifyContent='space-between'>
<Stack sx={{ minWidth: 0 }}>
<Stack sx={{ minWidth: 0, width: '100%' }}>
<Tooltip title={file.name}>
<Link href={`/api/v2/model/${modelId}/file/${file._id}/download`} data-test={`fileLink-${file.name}`}>
<Typography noWrap>{file.name}</Typography>
<Typography noWrap textOverflow='ellipsis' overflow='hidden'>
{file.name}
</Typography>
</Link>
</Tooltip>
</Stack>
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/wrapper/SideNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import MessageAlert from 'src/MessageAlert'
import { NavMenuItem } from 'src/wrapper/NavMenuItem'
import { User } from 'types/types'

import { DRAWER_WIDTH } from '../../utils/constants'

const StyledList = styled(List)(({ theme }) => ({
paddingTop: 0,
paddingBottom: 0,
Expand All @@ -35,7 +33,7 @@ const Drawer = styled(MuiDrawer, { shouldForwardProp: (prop) => prop !== 'open'
'& .MuiDrawer-paper': {
position: 'relative',
whiteSpace: 'nowrap',
width: DRAWER_WIDTH,
width: 'fit-content',
transition: theme.transitions.create('width', {
easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.enteringScreen,
Expand Down
3 changes: 0 additions & 3 deletions frontend/src/wrapper/TopNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import EntrySearch from 'src/wrapper/EntrySearch'

import bailoLogo from '../../public/logo-horizontal-light.png'
import { User } from '../../types/types'
import { DRAWER_WIDTH } from '../../utils/constants'
import ExpandableButton from '../common/ExpandableButton'
import ThemeModeContext from '../contexts/themeModeContext'
import Link from '../Link'
Expand All @@ -57,8 +56,6 @@ const AppBar = styled(MuiAppBar, {
{
props: ({ open }) => open,
style: {
marginLeft: DRAWER_WIDTH,
width: `calc(100% - ${DRAWER_WIDTH}px)`,
transition: theme.transitions.create(['width', 'margin-left'], {
easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.enteringScreen,
Expand Down
2 changes: 0 additions & 2 deletions frontend/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export const DRAWER_WIDTH = 240

export const HIDDEN_TOKEN_ACCESS_KEY = 'xxxxxxxxxx'

export const HIDDEN_TOKEN_SECRET_KEY = 'xxxxxxxxxxxxxxxxxxxxx'
Expand Down
2 changes: 1 addition & 1 deletion lib/landing/src/Wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const AppBar = styled(MuiAppBar, {
}),
...(open && {
marginLeft: drawerWidth,
width: `calc(100% - ${drawerWidth}px)`,
width: 'fit-content',
transition: theme.transitions.create(['width', 'margin-left'], {
easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.enteringScreen,
Expand Down
Loading