mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
refactor: misc tooltip improvements (#895)
* refactor: improve tooltip text * refactor: fix project edit button tooltip position * refactor: fix header docs link tooltip position
This commit is contained in:
parent
e5e8349593
commit
fd8e1c196c
@ -69,7 +69,7 @@ export const FeatureStrategyRemove = ({
|
|||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
permission={DELETE_FEATURE_STRATEGY}
|
permission={DELETE_FEATURE_STRATEGY}
|
||||||
data-testid={STRATEGY_FORM_REMOVE_ID}
|
data-testid={STRATEGY_FORM_REMOVE_ID}
|
||||||
tooltip="Delete strategy"
|
tooltip="Remove strategy"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<Delete />
|
<Delete />
|
||||||
@ -87,20 +87,20 @@ export const FeatureStrategyRemove = ({
|
|||||||
variant="text"
|
variant="text"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
Delete strategy
|
Remove strategy
|
||||||
</PermissionButton>
|
</PermissionButton>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Dialogue
|
<Dialogue
|
||||||
title="Are you sure you want to delete this strategy?"
|
title="Are you sure you want to delete this strategy?"
|
||||||
open={openDialogue}
|
open={openDialogue}
|
||||||
primaryButtonText="Delete strategy"
|
primaryButtonText="Remove strategy"
|
||||||
secondaryButtonText="Cancel"
|
secondaryButtonText="Cancel"
|
||||||
onClick={onRemove}
|
onClick={onRemove}
|
||||||
onClose={() => setOpenDialogue(false)}
|
onClose={() => setOpenDialogue(false)}
|
||||||
>
|
>
|
||||||
<Alert severity="error">
|
<Alert severity="error">
|
||||||
Deleting the strategy will change which users receive access
|
Removing the strategy will change which users receive access
|
||||||
to the feature.
|
to the feature.
|
||||||
</Alert>
|
</Alert>
|
||||||
</Dialogue>
|
</Dialogue>
|
||||||
|
@ -53,7 +53,7 @@ const FeatureOverviewEnvironmentStrategy = ({
|
|||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
component={Link}
|
component={Link}
|
||||||
to={editStrategyPath}
|
to={editStrategyPath}
|
||||||
tooltip="Edit"
|
tooltip="Edit strategy"
|
||||||
>
|
>
|
||||||
<Edit />
|
<Edit />
|
||||||
</PermissionIconButton>
|
</PermissionIconButton>
|
||||||
|
@ -138,7 +138,7 @@ export const FeatureView = () => {
|
|||||||
data-loading
|
data-loading
|
||||||
component={Link}
|
component={Link}
|
||||||
to={`/projects/${projectId}/features/${featureId}/strategies/copy`}
|
to={`/projects/${projectId}/features/${featureId}/strategies/copy`}
|
||||||
tooltip="Copy feature"
|
tooltip="Copy feature toggle"
|
||||||
>
|
>
|
||||||
<FileCopy />
|
<FileCopy />
|
||||||
</PermissionIconButton>
|
</PermissionIconButton>
|
||||||
|
@ -81,16 +81,4 @@ export const useStyles = makeStyles(theme => ({
|
|||||||
display: 'flex',
|
display: 'flex',
|
||||||
color: '#000',
|
color: '#000',
|
||||||
},
|
},
|
||||||
docsLink: {
|
|
||||||
color: '#000',
|
|
||||||
textDecoration: 'none',
|
|
||||||
padding: '0.25rem 0.8rem',
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
},
|
|
||||||
docsIcon: {
|
|
||||||
color: '#6C6C6C',
|
|
||||||
height: '25px',
|
|
||||||
width: '25px',
|
|
||||||
},
|
|
||||||
}));
|
}));
|
||||||
|
@ -120,15 +120,14 @@ const Header = () => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.userContainer}>
|
<div className={styles.userContainer}>
|
||||||
<Tooltip title="Go to the documentation">
|
<Tooltip title="Documentation">
|
||||||
<a
|
<IconButton
|
||||||
href="https://docs.getunleash.io/"
|
href="https://docs.getunleash.io/"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className={styles.docsLink}
|
|
||||||
>
|
>
|
||||||
<MenuBookIcon className={styles.docsIcon} />
|
<MenuBookIcon />
|
||||||
</a>
|
</IconButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
condition={admin}
|
condition={admin}
|
||||||
@ -139,9 +138,7 @@ const Header = () => {
|
|||||||
setAnchorEl(e.currentTarget)
|
setAnchorEl(e.currentTarget)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<SettingsIcon
|
<SettingsIcon />
|
||||||
className={styles.docsIcon}
|
|
||||||
/>
|
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,7 @@ const ProjectInfo = ({
|
|||||||
[styles.permissionButtonShortDesc]: isShortDescription,
|
[styles.permissionButtonShortDesc]: isShortDescription,
|
||||||
});
|
});
|
||||||
const permissionButton = (
|
const permissionButton = (
|
||||||
|
<div>
|
||||||
<PermissionIconButton
|
<PermissionIconButton
|
||||||
permission={UPDATE_PROJECT}
|
permission={UPDATE_PROJECT}
|
||||||
projectId={id}
|
projectId={id}
|
||||||
@ -60,6 +61,7 @@ const ProjectInfo = ({
|
|||||||
>
|
>
|
||||||
<Edit />
|
<Edit />
|
||||||
</PermissionIconButton>
|
</PermissionIconButton>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -73,7 +73,7 @@ export const ProjectCard = ({
|
|||||||
className={styles.actionsBtn}
|
className={styles.actionsBtn}
|
||||||
data-loading
|
data-loading
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
tooltip="Menu"
|
tooltip="Options"
|
||||||
>
|
>
|
||||||
<MoreVertIcon />
|
<MoreVertIcon />
|
||||||
</PermissionIconButton>
|
</PermissionIconButton>
|
||||||
|
Loading…
Reference in New Issue
Block a user