mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
Fix/strategy sidepanel (#479)
* make addButton color white when hover on strategy card * fix: change arrow in side panel * make sidepanel button responsive * add ellipse to icons in sidepanel * remove important property from css * remove ellipse from disabled icons * fix navigation with tab for features list in project view Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
This commit is contained in:
parent
d5c0ec2628
commit
e839155f48
@ -44,6 +44,10 @@ export const useStyles = makeStyles(theme => ({
|
|||||||
display: 'none',
|
display: 'none',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
link:{
|
||||||
|
textDecoration: 'none',
|
||||||
|
color: 'inherit'
|
||||||
|
},
|
||||||
envName: {
|
envName: {
|
||||||
display: 'inline-block',
|
display: 'inline-block',
|
||||||
width: '90px',
|
width: '90px',
|
||||||
|
@ -16,6 +16,7 @@ import CreatedAt from './CreatedAt';
|
|||||||
import useProject from '../../../../hooks/api/getters/useProject/useProject';
|
import useProject from '../../../../hooks/api/getters/useProject/useProject';
|
||||||
import { UPDATE_FEATURE } from '../../../providers/AccessProvider/permissions';
|
import { UPDATE_FEATURE } from '../../../providers/AccessProvider/permissions';
|
||||||
import PermissionSwitch from '../../../common/PermissionSwitch/PermissionSwitch';
|
import PermissionSwitch from '../../../common/PermissionSwitch/PermissionSwitch';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
interface IFeatureToggleListNewItemProps {
|
interface IFeatureToggleListNewItemProps {
|
||||||
name: string;
|
name: string;
|
||||||
@ -102,7 +103,12 @@ const FeatureToggleListNewItem = ({
|
|||||||
align="left"
|
align="left"
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
<span data-loading>{name}</span>
|
<Link
|
||||||
|
to={getTogglePath(projectId, name, uiConfig.flags.E)}
|
||||||
|
className={styles.link}
|
||||||
|
>
|
||||||
|
<span data-loading>{name}</span>
|
||||||
|
</Link>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell
|
<TableCell
|
||||||
className={classNames(
|
className={classNames(
|
||||||
|
@ -23,22 +23,34 @@ export const useStyles = makeStyles(theme => ({
|
|||||||
width: '10%',
|
width: '10%',
|
||||||
[theme.breakpoints.down(700)]: {
|
[theme.breakpoints.down(700)]: {
|
||||||
width: '15%',
|
width: '15%',
|
||||||
|
paddingRight: '45px',
|
||||||
|
paddingLeft: '40px',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
iconButtonWrapper: {
|
iconButtonWrapper: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
top: '300px',
|
top: '300px',
|
||||||
right: '-25px',
|
right: '-25px',
|
||||||
|
[theme.breakpoints.down(700)]: {
|
||||||
|
right: '-15px',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
iconButton: {
|
iconButton: {
|
||||||
backgroundColor: `${theme.palette.grey[300]}!important`,
|
|
||||||
[theme.breakpoints.down(700)]: {
|
[theme.breakpoints.down(700)]: {
|
||||||
right: '-10px',
|
right: '-10px',
|
||||||
|
background: `conic-gradient(rgba(255, 0, 0, 0), 50%, rgb(196, 196, 196) 50%)`,
|
||||||
|
},
|
||||||
|
background: `conic-gradient(rgb(255, 255, 255), 50%, rgb(196, 196, 196) 50%)`,
|
||||||
|
color: '#fff',
|
||||||
|
'&:hover': {
|
||||||
|
background: `conic-gradient(rgba(255, 0, 0, 0), 50%, rgb(196, 196, 196) 50%)`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
icon: {
|
icon: {
|
||||||
transition: 'transform 0.4s ease',
|
transition: 'transform 0.4s ease',
|
||||||
transitionDelay: '0.4s',
|
transitionDelay: '0.4s',
|
||||||
|
position: 'relative',
|
||||||
|
left: '-8px',
|
||||||
},
|
},
|
||||||
expandedIcon: {
|
expandedIcon: {
|
||||||
transform: 'rotate(180deg)',
|
transform: 'rotate(180deg)',
|
||||||
|
@ -6,7 +6,7 @@ import { useContext } from 'react';
|
|||||||
import FeatureStrategiesUIContext from '../../../../../contexts/FeatureStrategiesUIContext';
|
import FeatureStrategiesUIContext from '../../../../../contexts/FeatureStrategiesUIContext';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import { Button, useMediaQuery } from '@material-ui/core';
|
import { Button, useMediaQuery } from '@material-ui/core';
|
||||||
import { DoubleArrow } from '@material-ui/icons';
|
import { NavigateNext } from '@material-ui/icons';
|
||||||
import ConditionallyRender from '../../../../common/ConditionallyRender';
|
import ConditionallyRender from '../../../../common/ConditionallyRender';
|
||||||
import { UPDATE_FEATURE } from '../../../../providers/AccessProvider/permissions';
|
import { UPDATE_FEATURE } from '../../../../providers/AccessProvider/permissions';
|
||||||
import PermissionIconButton from '../../../../common/PermissionIconButton/PermissionIconButton';
|
import PermissionIconButton from '../../../../common/PermissionIconButton/PermissionIconButton';
|
||||||
@ -74,7 +74,7 @@ const FeatureStrategiesList = () => {
|
|||||||
permission={UPDATE_FEATURE}
|
permission={UPDATE_FEATURE}
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
>
|
>
|
||||||
<DoubleArrow className={iconClasses} />
|
<NavigateNext className={iconClasses} />
|
||||||
</PermissionIconButton>
|
</PermissionIconButton>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
@ -43,6 +43,13 @@ export const useStyles = makeStyles(theme => ({
|
|||||||
icon: {
|
icon: {
|
||||||
fill: theme.palette.primary.main,
|
fill: theme.palette.primary.main,
|
||||||
},
|
},
|
||||||
|
disabledButton: {
|
||||||
|
'&:disabled': {
|
||||||
|
color: '#000',
|
||||||
|
opacity: 0.4,
|
||||||
|
marginBottom: '5px',
|
||||||
|
},
|
||||||
|
},
|
||||||
description: {
|
description: {
|
||||||
marginTop: '0.5rem',
|
marginTop: '0.5rem',
|
||||||
fontSize: theme.fontSizes.smallerBody,
|
fontSize: theme.fontSizes.smallerBody,
|
||||||
|
@ -98,7 +98,7 @@ const FeatureStrategyCard = ({
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
elseShow={
|
elseShow={
|
||||||
<IconButton disabled>
|
<IconButton disabled className={styles.disabledButton}>
|
||||||
<Icon />
|
<Icon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user