diff --git a/src/app/views/common/popups/DrawerWrapper.tsx b/src/app/views/common/popups/DrawerWrapper.tsx index 70ec7a2b5..3e826e242 100644 --- a/src/app/views/common/popups/DrawerWrapper.tsx +++ b/src/app/views/common/popups/DrawerWrapper.tsx @@ -8,6 +8,7 @@ import { Button, Spinner, makeStyles, + tokens, Tooltip } from '@fluentui/react-components'; import { ArrowLeft24Regular, Dismiss24Regular } from '@fluentui/react-icons'; @@ -21,6 +22,9 @@ const useDrawerStyles = makeStyles({ }, button: { marginInlineEnd: '20px' + }, + body: { + padding: 0 } }); @@ -94,7 +98,7 @@ export function DrawerWrapper(props: WrapperProps) { - + }> { items.length === 0 ? : diff --git a/src/app/views/sidebar/resource-explorer/collection/APICollection.tsx b/src/app/views/sidebar/resource-explorer/collection/APICollection.tsx index 3063dee27..c77c52dfc 100644 --- a/src/app/views/sidebar/resource-explorer/collection/APICollection.tsx +++ b/src/app/views/sidebar/resource-explorer/collection/APICollection.tsx @@ -10,7 +10,8 @@ import { DialogSurface, DialogTitle, Button, - makeStyles + makeStyles, + tokens } from '@fluentui/react-components'; import { Edit20Regular, Key20Regular, ArrowUpload20Regular, List20Regular } from '@fluentui/react-icons'; import { useAppDispatch, useAppSelector } from '../../../../../store'; @@ -39,6 +40,9 @@ const useStyles = makeStyles({ width: '100%', justifyContent: 'center', alignItems: 'center' + }, + paths: { + marginInlineStart: tokens.spacingHorizontalL } }); @@ -268,7 +272,7 @@ const APICollection: React.FC> = (props) => { /> {items && items.length > 0 ? - (
+ (
> = (props) => { groupedPermissions.get(groupKey)?.push(p); }); - const handleOpenChange = (_event: TreeOpenChangeEvent, data: TreeOpenChangeData) => { - setOpenItems(data.openItems); + const handleOpenChange = (_event: TreeOpenChangeEvent, data_: TreeOpenChangeData) => { + setOpenItems(data_.openItems); }; if (!isFetching && !permissions) { @@ -134,26 +136,29 @@ const CollectionPermissions: FC> = (props) => { > {[...groupedPermissions.entries()].map(([scopeType, perms]) => ( - }>{formatScopeLabel(scopeType as PERMS_SCOPE)} - {perms.map((permission) => { + {openItems.has(scopeType) && + perms.map((permission) => { return ( - p.value === permission.value) + 1} - aria-setsize={perms.length} - > - {permission.value} - + + p.value === permission.value) + 1} + aria-setsize={perms.length} + > + {permission.value} + + ); })} diff --git a/src/app/views/sidebar/resource-explorer/collection/CommonCollectionsPanel.tsx b/src/app/views/sidebar/resource-explorer/collection/CommonCollectionsPanel.tsx index 5decfc3f0..6170e9c80 100644 --- a/src/app/views/sidebar/resource-explorer/collection/CommonCollectionsPanel.tsx +++ b/src/app/views/sidebar/resource-explorer/collection/CommonCollectionsPanel.tsx @@ -1,9 +1,10 @@ import { Button, - DialogActions, makeStyles, MessageBar, - MessageBarBody + MessageBarBody, + DrawerFooter, + tokens } from '@fluentui/react-components'; import { ReactNode } from 'react'; import { translateMessage } from '../../../../utils/translate-messages'; @@ -19,17 +20,21 @@ interface CommonCollectionsPanelProps { } const useStyles = makeStyles({ - dialogFooter: { + drawerFooter: { display: 'flex', - justifyContent: 'start', + justifyContent: 'flex-start', position: 'sticky', bottom: 0, width: '100%', - marginBlockStart: '10px', - zIndex: 1 + gap: tokens.spacingHorizontalXXXL, + paddingInline: tokens.spacingHorizontalL, + paddingBlock: tokens.spacingVerticalL, + paddingLeft: 0, + backgroundColor: tokens.colorNeutralBackground1, + marginInlineStart: tokens.spacingHorizontalL }, messageBar: { - marginInlineStart: '15px', + marginInlineStart: tokens.spacingHorizontalM, width: '100%' } }); @@ -58,14 +63,14 @@ const CommonCollectionsPanel: React.FC = ({ : null} {children} - + - + ); }; diff --git a/src/app/views/sidebar/resource-explorer/collection/EditCollectionPanel.tsx b/src/app/views/sidebar/resource-explorer/collection/EditCollectionPanel.tsx index c9edbbebf..03a8ecc0c 100644 --- a/src/app/views/sidebar/resource-explorer/collection/EditCollectionPanel.tsx +++ b/src/app/views/sidebar/resource-explorer/collection/EditCollectionPanel.tsx @@ -1,4 +1,4 @@ -import { Label, makeStyles } from '@fluentui/react-components'; +import { Label, makeStyles, tokens } from '@fluentui/react-components'; import { translateMessage } from '../../../../utils/translate-messages'; import { useState } from 'react'; import { IResourceLink } from '../../../../../types/resources'; @@ -8,15 +8,15 @@ import { useAppDispatch, useAppSelector } from '../../../../../store'; import CommonCollectionsPanel from './CommonCollectionsPanel'; const useStyles = makeStyles({ - container: { - height: '80vh' - }, centeredLabel: { display: 'flex', width: '100%', justifyContent: 'center', alignItems: 'center', height: '80vh' + }, + paths: { + marginBlockStart: tokens.spacingVerticalL } }); @@ -52,7 +52,7 @@ const EditCollectionPanel: React.FC = ({ closePopup }) closePopup={closePopup} > {items && items.length > 0 ? ( -
+
= ({ closePopup }) />
) : ( -
+
diff --git a/src/app/views/sidebar/resource-explorer/collection/EditScopePanel.tsx b/src/app/views/sidebar/resource-explorer/collection/EditScopePanel.tsx index b058ca452..97d6dff8f 100644 --- a/src/app/views/sidebar/resource-explorer/collection/EditScopePanel.tsx +++ b/src/app/views/sidebar/resource-explorer/collection/EditScopePanel.tsx @@ -16,9 +16,6 @@ import { formatScopeLabel, scopeOptions } from './collection.util'; import CommonCollectionsPanel from './CommonCollectionsPanel'; const useStyles = makeStyles({ - container: { - height: '80vh' - }, dropdownContainer: { display: 'flex', justifyContent: 'flex-end', @@ -114,7 +111,7 @@ const EditScopePanel: React.FC = ({ closePopup }) => { ))}
-
+
pendingChanges.find(change => change.key === item.key) || item)} columns={columns}