[arvados] updated: 2.7.0-6280-gcb2ffbec73
git repository hosting
git at public.arvados.org
Wed Apr 3 13:46:28 UTC 2024
Summary of changes:
.../multiselect-toolbar/MultiselectToolbar.tsx | 25 ++++++++++++++++------
.../ms-toolbar-overflow-menu.tsx | 2 +-
.../ms-toolbar-overflow-wrapper.tsx | 2 +-
3 files changed, 21 insertions(+), 8 deletions(-)
via cb2ffbec735d31a376157e79ad4eaf54798e74e4 (commit)
from 62e557a3314a607b5701db7e64f7609a5af00adc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit cb2ffbec735d31a376157e79ad4eaf54798e74e4
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Wed Apr 3 09:46:24 2024 -0400
21448: fixed dividers in toolbar menuArvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/services/workbench2/src/components/multiselect-toolbar/MultiselectToolbar.tsx b/services/workbench2/src/components/multiselect-toolbar/MultiselectToolbar.tsx
index 41d25bb6f8..69f5d036d6 100644
--- a/services/workbench2/src/components/multiselect-toolbar/MultiselectToolbar.tsx
+++ b/services/workbench2/src/components/multiselect-toolbar/MultiselectToolbar.tsx
@@ -39,7 +39,7 @@ import { sortByProperty } from "common/array-utils";
const WIDTH_TRANSITION = 150
-type CssRules = "root" | "transition" | "button" | "iconContainer" | "icon";
+type CssRules = "root" | "transition" | "button" | "iconContainer" | "icon" | "divider";
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
root: {
@@ -72,7 +72,11 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
},
icon: {
marginLeft: '-0.5rem',
- }
+ },
+ divider: {
+ display: "flex",
+ alignItems: "center",
+ },
});
export type MultiselectToolbarProps = {
@@ -133,15 +137,24 @@ export const MultiselectToolbar = connect(
<IntersectionObserverWrapper menuLength={actions.length}>
{actions.map((action, i) =>{
const { hasAlts, useAlts, name, altName, icon, altIcon } = action;
- return action.name === ContextMenuActionNames.DIVIDER ? (action.component && <action.component data-targetid={name} key={i} />)
- : hasAlts ? (
+ return action.name === ContextMenuActionNames.DIVIDER ? (
+ action.component && (
+ <div
+ className={classes.divider}
+ data-targetid={`${name}${i}`}
+ key={i}
+ >
+ <action.component />
+ </div>
+ )
+ ) : hasAlts ? (
<Tooltip
className={classes.button}
data-targetid={name}
title={currentPathIsTrash || (useAlts && useAlts(singleSelectedUuid, iconProps)) ? altName : name}
key={i}
disableFocusListener
- >
+ >
<span className={classes.iconContainer}>
<IconButton
data-cy='multiselect-button'
@@ -160,7 +173,7 @@ export const MultiselectToolbar = connect(
title={action.name}
key={i}
disableFocusListener
- >
+ >
<span className={classes.iconContainer}>
<IconButton
data-cy='multiselect-button'
diff --git a/services/workbench2/src/components/multiselect-toolbar/ms-toolbar-overflow-menu.tsx b/services/workbench2/src/components/multiselect-toolbar/ms-toolbar-overflow-menu.tsx
index fd62b20439..28b8227159 100644
--- a/services/workbench2/src/components/multiselect-toolbar/ms-toolbar-overflow-menu.tsx
+++ b/services/workbench2/src/components/multiselect-toolbar/ms-toolbar-overflow-menu.tsx
@@ -83,7 +83,7 @@ export const OverflowMenu = withStyles(styles)((props: OverflowMenuProps & WithS
className={classes.menu}
>
{React.Children.map(children, (child: any) => {
- if (!visibilityMap[child.props['data-targetid']] && child.props['data-targetid'] !== 'Divider') {
+ if (!visibilityMap[child.props['data-targetid']]) {
return <MenuItem
key={child}
onClick={handleClose}
diff --git a/services/workbench2/src/components/multiselect-toolbar/ms-toolbar-overflow-wrapper.tsx b/services/workbench2/src/components/multiselect-toolbar/ms-toolbar-overflow-wrapper.tsx
index 32f977e1a4..e0f32f1fa6 100644
--- a/services/workbench2/src/components/multiselect-toolbar/ms-toolbar-overflow-wrapper.tsx
+++ b/services/workbench2/src/components/multiselect-toolbar/ms-toolbar-overflow-wrapper.tsx
@@ -127,7 +127,7 @@ export const IntersectionObserverWrapper = withStyles(styles)((props: WrapperPro
visibilityMap={visibilityMap}
className={classes.overflowStyle}
>
- {children}
+ {children.filter((child) => !child.props['data-targetid'].includes("Divider"))}
</OverflowMenu>
)}
</div>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list