mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
fix: remove tooltips
This commit is contained in:
parent
aae8c4d9d9
commit
b0ba4f3a9d
@ -44,7 +44,6 @@ export const AvailableAddons = ({
|
|||||||
onClick={() =>
|
onClick={() =>
|
||||||
history.push(`/addons/create/${provider.name}`)
|
history.push(`/addons/create/${provider.name}`)
|
||||||
}
|
}
|
||||||
tooltip={`Configure ${provider.name} Addon`}
|
|
||||||
>
|
>
|
||||||
Configure
|
Configure
|
||||||
</PermissionButton>
|
</PermissionButton>
|
||||||
|
@ -122,7 +122,6 @@ export const ConfiguredAddons = ({ getAddonIcon }: IConfigureAddonsProps) => {
|
|||||||
</PermissionIconButton>
|
</PermissionIconButton>
|
||||||
<PermissionIconButton
|
<PermissionIconButton
|
||||||
permission={UPDATE_ADDON}
|
permission={UPDATE_ADDON}
|
||||||
tooltip={'Edit Addon'}
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
history.push(`/addons/edit/${addon.id}`);
|
history.push(`/addons/edit/${addon.id}`);
|
||||||
}}
|
}}
|
||||||
@ -131,7 +130,6 @@ export const ConfiguredAddons = ({ getAddonIcon }: IConfigureAddonsProps) => {
|
|||||||
</PermissionIconButton>
|
</PermissionIconButton>
|
||||||
<PermissionIconButton
|
<PermissionIconButton
|
||||||
permission={DELETE_ADDON}
|
permission={DELETE_ADDON}
|
||||||
tooltip={'Remove Addon'}
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setDeletedAddon(addon);
|
setDeletedAddon(addon);
|
||||||
setShowDelete(true);
|
setShowDelete(true);
|
||||||
|
@ -50,7 +50,6 @@ const RoleListItem = ({
|
|||||||
<PermissionIconButton
|
<PermissionIconButton
|
||||||
data-loading
|
data-loading
|
||||||
aria-label="Edit"
|
aria-label="Edit"
|
||||||
tooltip="Edit"
|
|
||||||
disabled={type === BUILTIN_ROLE_TYPE}
|
disabled={type === BUILTIN_ROLE_TYPE}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
history.push(`/admin/roles/${id}/edit`);
|
history.push(`/admin/roles/${id}/edit`);
|
||||||
@ -62,7 +61,6 @@ const RoleListItem = ({
|
|||||||
<PermissionIconButton
|
<PermissionIconButton
|
||||||
data-loading
|
data-loading
|
||||||
aria-label="Remove role"
|
aria-label="Remove role"
|
||||||
tooltip="Remove role"
|
|
||||||
disabled={type === BUILTIN_ROLE_TYPE}
|
disabled={type === BUILTIN_ROLE_TYPE}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setCurrentRole({ id, name, description });
|
setCurrentRole({ id, name, description });
|
||||||
|
@ -52,7 +52,6 @@ const Constraint = ({
|
|||||||
<div className={styles.btnContainer}>
|
<div className={styles.btnContainer}>
|
||||||
<PermissionIconButton
|
<PermissionIconButton
|
||||||
onClick={editCallback}
|
onClick={editCallback}
|
||||||
tooltip="Edit strategy"
|
|
||||||
permission={UPDATE_FEATURE}
|
permission={UPDATE_FEATURE}
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
>
|
>
|
||||||
@ -61,7 +60,6 @@ const Constraint = ({
|
|||||||
|
|
||||||
<PermissionIconButton
|
<PermissionIconButton
|
||||||
onClick={deleteCallback}
|
onClick={deleteCallback}
|
||||||
tooltip="Delete strategy"
|
|
||||||
permission={UPDATE_FEATURE}
|
permission={UPDATE_FEATURE}
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
>
|
>
|
||||||
|
@ -16,7 +16,7 @@ export interface IPermissionIconButtonProps
|
|||||||
|
|
||||||
const PermissionButton: React.FC<IPermissionIconButtonProps> = ({
|
const PermissionButton: React.FC<IPermissionIconButtonProps> = ({
|
||||||
permission,
|
permission,
|
||||||
tooltip = 'Click to perform action',
|
tooltip,
|
||||||
onClick,
|
onClick,
|
||||||
children,
|
children,
|
||||||
disabled,
|
disabled,
|
||||||
@ -54,9 +54,9 @@ const PermissionButton: React.FC<IPermissionIconButtonProps> = ({
|
|||||||
|
|
||||||
access = handleAccess();
|
access = handleAccess();
|
||||||
|
|
||||||
const tooltipText = access
|
const tooltipText = !access
|
||||||
? tooltip
|
? "You don't have access to perform this operation"
|
||||||
: "You don't have access to perform this operation";
|
: '';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip title={tooltipText} arrow>
|
<Tooltip title={tooltipText} arrow>
|
||||||
|
@ -39,9 +39,9 @@ const PermissionIconButton: React.FC<IPermissionIconButtonProps> = ({
|
|||||||
access = hasAccess(permission);
|
access = hasAccess(permission);
|
||||||
}
|
}
|
||||||
|
|
||||||
const tooltipText = access
|
const tooltipText = !access
|
||||||
? tooltip || ''
|
? "You don't have access to perform this operation"
|
||||||
: "You don't have access to perform this operation";
|
: '';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip title={tooltipText} arrow>
|
<Tooltip title={tooltipText} arrow>
|
||||||
|
@ -19,7 +19,7 @@ const PermissionSwitch = React.forwardRef<
|
|||||||
>((props, ref) => {
|
>((props, ref) => {
|
||||||
const {
|
const {
|
||||||
permission,
|
permission,
|
||||||
tooltip = '',
|
tooltip,
|
||||||
disabled,
|
disabled,
|
||||||
projectId,
|
projectId,
|
||||||
environmentId,
|
environmentId,
|
||||||
@ -39,9 +39,9 @@ const PermissionSwitch = React.forwardRef<
|
|||||||
access = hasAccess(permission);
|
access = hasAccess(permission);
|
||||||
}
|
}
|
||||||
|
|
||||||
const tooltipText = access
|
const tooltipText = !access
|
||||||
? tooltip
|
? "You don't have access to perform this operation"
|
||||||
: "You don't have access to perform this operation";
|
: '';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip title={tooltipText} arrow>
|
<Tooltip title={tooltipText} arrow>
|
||||||
|
@ -172,7 +172,6 @@ const EnvironmentList = () => {
|
|||||||
<ResponsiveButton
|
<ResponsiveButton
|
||||||
onClick={navigateToCreateEnvironment}
|
onClick={navigateToCreateEnvironment}
|
||||||
maxWidth="700px"
|
maxWidth="700px"
|
||||||
tooltip="Add new environment"
|
|
||||||
Icon={Add}
|
Icon={Add}
|
||||||
>
|
>
|
||||||
New Environment
|
New Environment
|
||||||
|
@ -93,7 +93,6 @@ const FeatureOverviewEnvSwitch = ({
|
|||||||
checked={env.enabled}
|
checked={env.enabled}
|
||||||
onChange={toggleEnvironment}
|
onChange={toggleEnvironment}
|
||||||
environmentId={env.name}
|
environmentId={env.name}
|
||||||
tooltip={''}
|
|
||||||
/>
|
/>
|
||||||
{content}
|
{content}
|
||||||
</div>
|
</div>
|
||||||
|
@ -101,7 +101,6 @@ const FeatureSettingsProject = () => {
|
|||||||
show={
|
show={
|
||||||
<PermissionButton
|
<PermissionButton
|
||||||
permission={MOVE_FEATURE_TOGGLE}
|
permission={MOVE_FEATURE_TOGGLE}
|
||||||
tooltip="Update feature"
|
|
||||||
onClick={() => setShowConfirmDialog(true)}
|
onClick={() => setShowConfirmDialog(true)}
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
>
|
>
|
||||||
|
@ -125,7 +125,6 @@ const Project = () => {
|
|||||||
<div className={styles.titleText}>{project?.name}</div>
|
<div className={styles.titleText}>{project?.name}</div>
|
||||||
<PermissionIconButton
|
<PermissionIconButton
|
||||||
permission={UPDATE_PROJECT}
|
permission={UPDATE_PROJECT}
|
||||||
tooltip="Edit"
|
|
||||||
projectId={project?.id}
|
projectId={project?.id}
|
||||||
onClick={() => history.push(`/projects/${id}/edit`)}
|
onClick={() => history.push(`/projects/${id}/edit`)}
|
||||||
data-loading
|
data-loading
|
||||||
|
@ -66,7 +66,6 @@ const ProjectFeatureToggles = ({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
maxWidth="700px"
|
maxWidth="700px"
|
||||||
tooltip="New feature toggle"
|
|
||||||
Icon={Add}
|
Icon={Add}
|
||||||
projectId={id}
|
projectId={id}
|
||||||
permission={CREATE_FEATURE}
|
permission={CREATE_FEATURE}
|
||||||
|
@ -50,7 +50,6 @@ const ProjectInfo = ({
|
|||||||
const permissionButton = (
|
const permissionButton = (
|
||||||
<PermissionIconButton
|
<PermissionIconButton
|
||||||
permission={UPDATE_PROJECT}
|
permission={UPDATE_PROJECT}
|
||||||
tooltip={'Edit description'}
|
|
||||||
projectId={id}
|
projectId={id}
|
||||||
component={Link}
|
component={Link}
|
||||||
className={permissionButtonClass}
|
className={permissionButtonClass}
|
||||||
|
@ -67,7 +67,6 @@ export const StrategiesList = () => {
|
|||||||
data-test={ADD_NEW_STRATEGY_ID}
|
data-test={ADD_NEW_STRATEGY_ID}
|
||||||
onClick={() => history.push('/strategies/create')}
|
onClick={() => history.push('/strategies/create')}
|
||||||
permission={CREATE_STRATEGY}
|
permission={CREATE_STRATEGY}
|
||||||
tooltip={'Add new strategy'}
|
|
||||||
>
|
>
|
||||||
<Add />
|
<Add />
|
||||||
</PermissionIconButton>
|
</PermissionIconButton>
|
||||||
@ -78,7 +77,6 @@ export const StrategiesList = () => {
|
|||||||
color="primary"
|
color="primary"
|
||||||
permission={CREATE_STRATEGY}
|
permission={CREATE_STRATEGY}
|
||||||
data-test={ADD_NEW_STRATEGY_ID}
|
data-test={ADD_NEW_STRATEGY_ID}
|
||||||
tooltip={'Add new strategy'}
|
|
||||||
>
|
>
|
||||||
New strategy
|
New strategy
|
||||||
</PermissionButton>
|
</PermissionButton>
|
||||||
@ -163,7 +161,6 @@ export const StrategiesList = () => {
|
|||||||
<PermissionIconButton
|
<PermissionIconButton
|
||||||
onClick={() => onReactivateStrategy(strategy)}
|
onClick={() => onReactivateStrategy(strategy)}
|
||||||
permission={UPDATE_STRATEGY}
|
permission={UPDATE_STRATEGY}
|
||||||
tooltip={'Reactivate activation strategy'}
|
|
||||||
>
|
>
|
||||||
<VisibilityOff />
|
<VisibilityOff />
|
||||||
</PermissionIconButton>
|
</PermissionIconButton>
|
||||||
@ -203,7 +200,6 @@ export const StrategiesList = () => {
|
|||||||
<PermissionIconButton
|
<PermissionIconButton
|
||||||
onClick={() => onDeleteStrategy(strategy)}
|
onClick={() => onDeleteStrategy(strategy)}
|
||||||
permission={DELETE_STRATEGY}
|
permission={DELETE_STRATEGY}
|
||||||
tooltip={'Delete strategy'}
|
|
||||||
>
|
>
|
||||||
<Delete />
|
<Delete />
|
||||||
</PermissionIconButton>
|
</PermissionIconButton>
|
||||||
|
Loading…
Reference in New Issue
Block a user