1
0
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:
olav 2022-04-21 11:01:42 +02:00 committed by GitHub
parent e5e8349593
commit fd8e1c196c
7 changed files with 25 additions and 38 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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',
},
})); }));

View File

@ -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>
} }

View File

@ -49,17 +49,19 @@ const ProjectInfo = ({
[styles.permissionButtonShortDesc]: isShortDescription, [styles.permissionButtonShortDesc]: isShortDescription,
}); });
const permissionButton = ( const permissionButton = (
<PermissionIconButton <div>
permission={UPDATE_PROJECT} <PermissionIconButton
projectId={id} permission={UPDATE_PROJECT}
component={Link} projectId={id}
className={permissionButtonClass} component={Link}
data-loading className={permissionButtonClass}
to={`/projects/${id}/edit`} data-loading
tooltip="Edit description" to={`/projects/${id}/edit`}
> tooltip="Edit description"
<Edit /> >
</PermissionIconButton> <Edit />
</PermissionIconButton>
</div>
); );
return ( return (

View File

@ -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>