Skip to content

Commit

Permalink
Merge pull request #1629 from SenseNet/fix/1548-too_long_path_glitche…
Browse files Browse the repository at this point in the history
…s_layout

Fix/1548 too long path glitches layout
  • Loading branch information
NoelKova authored Aug 5, 2024
2 parents 3dad028 + 31ee2a7 commit 173de69
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions apps/sensenet/src/components/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function Breadcrumbs<T extends GenericContent>(props: BreadcrumbProps<T>)
return (
<>
<MUIBreadcrumbs
maxItems={5}
maxItems={15}
aria-label="breadcrumb"
style={{ marginLeft: '8.5px' }}
classes={{ separator: 'bread-crumbs-separator' }}>
Expand All @@ -50,8 +50,8 @@ export function Breadcrumbs<T extends GenericContent>(props: BreadcrumbProps<T>)
</Tooltip>
</DropFileArea>
))}
<CopyPath copyText={props.items[props.items.length - 1].title} />
</MUIBreadcrumbs>
<CopyPath copyText={props.items[props.items.length - 1].title} />
{contextMenuItem ? (
<ContentContextMenu
isOpened={isContextMenuOpened}
Expand Down
11 changes: 8 additions & 3 deletions apps/sensenet/src/components/ContentBreadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ import { useDialog } from './dialogs'
const useStyles = makeStyles((theme: Theme) => {
return createStyles({
batchActionWrapper: {
marginRight: '7.5%',
' & .MuiIconButton-root': {
color: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white,
},
marginLeft: 'auto',
display: 'flex',
marginRight: '8px',
},
buttonsWrapper: {
display: 'flex',
alignItems: 'center',
},
})
})
Expand Down Expand Up @@ -55,7 +60,7 @@ export const ContentBreadcrumbs = <T extends GenericContent = GenericContent>(pr
}, [selectionService.selection])

return (
<>
<div className={classes.buttonsWrapper}>
<Breadcrumbs<T>
items={[
...ancestors.map((content) => ({
Expand Down Expand Up @@ -140,6 +145,6 @@ export const ContentBreadcrumbs = <T extends GenericContent = GenericContent>(pr
</Tooltip>
</div>
) : null}
</>
</div>
)
}
1 change: 0 additions & 1 deletion apps/sensenet/src/components/content/Explore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const useStyles = makeStyles((theme: Theme) => {
flexDirection: 'column',
},
breadcrumbsWrapper: {
height: globals.common.drawerItemHeight,
boxSizing: 'border-box',
borderBottom: theme.palette.type === 'light' ? '1px solid #DBDBDB' : '1px solid rgba(255, 255, 255, 0.11)',
justifyContent: 'start',
Expand Down
2 changes: 1 addition & 1 deletion apps/sensenet/src/services/content-context-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export function getPrimaryActionUrl({
return getUrlForContent({ content, uiSettings, location, action: 'image', snRoute, removePath })
}

if ((content.Type === 'File' || repository.schemas.isContentFromType<ContentType>(content, 'File'))) {
if (content.Type === 'File' || repository.schemas.isContentFromType<ContentType>(content, 'File')) {
return getUrlForContent({ content, uiSettings, location, action: 'browse', snRoute, removePath })
}

Expand Down

0 comments on commit 173de69

Please sign in to comment.