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/1548 too long path glitches layout #1629

Merged
merged 2 commits into from
Aug 5, 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
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
Loading