From 5c7257da8d943890dd0fbaeb7122a87113daa951 Mon Sep 17 00:00:00 2001 From: lianahus Date: Thu, 27 Jun 2024 17:45:44 +0200 Subject: [PATCH] ttoltips and internal element layout fix for FE bottom menu --- .../src/lib/components/custom-dropdown.tsx | 2 +- .../src/lib/components/homeTabFeatured.tsx | 2 +- .../src/lib/css/remix-ui-workspace.css | 4 + .../workspace/src/lib/remix-ui-workspace.tsx | 175 +++++++++--------- 4 files changed, 97 insertions(+), 86 deletions(-) diff --git a/libs/remix-ui/helper/src/lib/components/custom-dropdown.tsx b/libs/remix-ui/helper/src/lib/components/custom-dropdown.tsx index f429cd0d04..14c7838a89 100644 --- a/libs/remix-ui/helper/src/lib/components/custom-dropdown.tsx +++ b/libs/remix-ui/helper/src/lib/components/custom-dropdown.tsx @@ -29,7 +29,7 @@ export const CustomToggle = React.forwardRef( className={className.replace('dropdown-toggle', '')} >
-
{children}
+
{children}
{icon && (
diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx index bc5fb49f62..7f1eb98d59 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx @@ -12,7 +12,7 @@ function HomeTabFeatured() { const themeFilter = useContext(ThemeContext) return ( -
+
diff --git a/libs/remix-ui/workspace/src/lib/css/remix-ui-workspace.css b/libs/remix-ui/workspace/src/lib/css/remix-ui-workspace.css index 24c7d462c6..7d8aa0c276 100644 --- a/libs/remix-ui/workspace/src/lib/css/remix-ui-workspace.css +++ b/libs/remix-ui/workspace/src/lib/css/remix-ui-workspace.css @@ -77,6 +77,10 @@ background: var(--custom-select); } + .branches-dropdown { + max-width: 16rem; + } + .custom-dropdown-items a { border-radius: .25rem; text-transform: none; diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index 450df30360..6099599695 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -1364,93 +1364,100 @@ export function Workspace() { }
- : null} -
- - - {global.fs.browser.isRequestingCloning ? : currentBranch || '-none-'} - - - -
-
- - - -
{ - toggleBranches(false) - }} - > - + : null + } + +
+ + + {global.fs.browser.isRequestingCloning ? : currentBranch || '-none-'} + + +
+
+ + + +
{ + toggleBranches(false) + }} + > + +
-
-
- -
-
- {filteredBranches.length > 0 ? ( - filteredBranches.map((branch, index) => { - return ( - { - switchToBranch(branch) - }} - title={intl.formatMessage({ id: `filePanel.switchToBranch${branch.remote ? 'Title1' : 'Title2'}` })} - > -
- {currentBranch === branch.name && !branch.remote ? ( - - ✓ - {branch.name} - - ) : ( - - - {branch.remote ? `${branch.remote}/${branch.name}` : branch.name} - - )} -
-
- ) - }) - ) : ( - -
- - - : {branchFilter} from '{currentBranch}' - -
-
+
+ +
+
+ {filteredBranches.length > 0 ? ( + filteredBranches.map((branch, index) => { + return ( + { + switchToBranch(branch) + }} + title={intl.formatMessage({ id: `filePanel.switchToBranch${branch.remote ? 'Title1' : 'Title2'}` })} + > +
+ {currentBranch === branch.name && !branch.remote ? ( + + ✓ + {branch.name} + + ) : ( + + + {branch.remote ? `${branch.remote}/${branch.name}` : branch.name} + + )} +
+
+ ) + }) + ) : ( + +
+ + + : {branchFilter} from '{currentBranch}' + +
+
+ )} +
+ {(selectedWorkspace.branches || []).length > 4 && ( +
+ +
)}
- {(selectedWorkspace.branches || []).length > 4 && ( -
- -
- )} -
- - -
+ + +
+
)}