Skip to content

TagSpaces is an offline, open source, document manager with tagging support

fix: issue with wrapping folder in the folder path area

Ilian Sapundshievb39f102e44fa
diff --git a/app/components/EntryContainerTabs.tsx b/app/components/EntryContainerTabs.tsx
index 89ab367cb..1cbd3222a 100644
--- a/app/components/EntryContainerTabs.tsx
+++ b/app/components/EntryContainerTabs.tsx
@@ -85,8 +85,8 @@ const StyledTab = styled((props: StyledTabProps) => (
fontWeight: theme.typography.fontWeightRegular,
fontSize: theme.typography.pxToRem(15),
marginRight: theme.spacing(1),
- minHeight: 53,
- maxHeight: 53
+ minHeight: 50,
+ maxHeight: 50
}));
function a11yProps(index: number) {
diff --git a/app/components/FolderContainer.tsx b/app/components/FolderContainer.tsx
index 6a1e7e663..61e92cfc4 100644
--- a/app/components/FolderContainer.tsx
+++ b/app/components/FolderContainer.tsx
@@ -418,6 +418,8 @@ function FolderContainer(props: Props) {
: '';
// keyBindings['openSearch'].toUpperCase()
+ const isEntryOpened = openedEntries.length > 0;
+
return (
<div
style={{
@@ -488,7 +490,7 @@ function FolderContainer(props: Props) {
flexDirection: 'column'
}}
/>
- <MainSearchField
+ {/* <MainSearchField
fullWidth
data-tid="toggleSearch"
defaultValue=""
@@ -496,7 +498,7 @@ function FolderContainer(props: Props) {
size="small"
style={{
minWidth: 40,
- width: 220,
+ width: isEntryOpened ? 40 : 220,
marginRight: 10
}}
onKeyDown={toggleSearchMode}
@@ -512,7 +514,12 @@ function FolderContainer(props: Props) {
</InputAdornment>
)
}}
- />
+ /> */}
+ <Tooltip title={t('core:searchTitle') + openSearchKeyBinding}>
+ <IconButton data-tid="toggleSearch" onClick={toggleSearchMode}>
+ <SearchIcon />
+ </IconButton>
+ </Tooltip>
{props.progress && props.progress.length > 0 && (
<IconButton
id="progressButton"
@@ -528,7 +535,6 @@ function FolderContainer(props: Props) {
<CircularProgressWithLabel value={getProgressValue()} />
</IconButton>
)}
- {/* {isDesktopMode && <LocationMenu />} */}
<PathBreadcrumbs
switchPerspective={switchPerspective}
setSelectedEntries={setSelectedEntries}
diff --git a/app/components/PathBreadcrumbs.tsx b/app/components/PathBreadcrumbs.tsx
index 435b5d4c7..bbc491f41 100644
--- a/app/components/PathBreadcrumbs.tsx
+++ b/app/components/PathBreadcrumbs.tsx
@@ -57,13 +57,24 @@ const StyledBreadcrumb = styled(Chip)(({ theme }) => {
'&:active': {
boxShadow: theme.shadows[1],
backgroundColor: emphasize(backgroundColor, 0.12)
+ },
+ '& ol': {
+ flexWrap: 'nowrap'
}
};
}) as typeof Chip; // TypeScript only: need a type cast here because https://github.com/Microsoft/TypeScript/issues/26591
-const NoWrapBreadcrumb = styled(StyledBreadcrumb)(({ theme }) => {
- return { flexWrap: 'nowrap' };
-});
+// const NoWrapBreadcrumb = styled(StyledBreadcrumb)(({ theme }) => {
+// return { flexWrap: 'nowrap' };
+// });
+
+const StyledBreadcrumbs = styled(Breadcrumbs)(({ theme }) => {
+ return {
+ '& ol': {
+ flexWrap: 'nowrap'
+ }
+ };
+}) as typeof Breadcrumbs; // TypeScript only: need a type cast here because https://github.com/Microsoft/TypeScript/issues/26591
interface Props {
switchPerspective: (perspectiveId: string) => void;
@@ -212,12 +223,10 @@ function PathBreadcrumbs(props: Props) {
return (
<>
- <Breadcrumbs
+ <StyledBreadcrumbs
style={{
- maxWidth: '100%',
- display: 'flex',
- flexWrap: 'nowrap',
- flexDirection: 'row-reverse'
+ overflowX: 'scroll',
+ marginTop: 8
}}
maxItems={isDesktopMode ? 2 : 1}
itemsAfterCollapse={isDesktopMode ? 1 : 1}
@@ -235,7 +244,7 @@ function PathBreadcrumbs(props: Props) {
}
>
{getBreadcrumbs()}
- </Breadcrumbs>
+ </StyledBreadcrumbs>
<DirectoryMenu
open={Boolean(directoryContextMenuAnchorEl)}
onClose={closeDirectoryMenu}