mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-27 18:07:57 +00:00
fix(ui): Add tooltips to Icons in Ingestion page (#14385)
This commit is contained in:
parent
05d34574df
commit
8143ceff62
@ -1,3 +1,4 @@
|
||||
import { Tooltip } from '@components';
|
||||
import React from 'react';
|
||||
|
||||
import { IconWrapper } from '@components/components/Icon/components';
|
||||
@ -11,6 +12,7 @@ export const iconDefaults: IconPropsDefaults = {
|
||||
size: '4xl',
|
||||
color: 'inherit',
|
||||
rotate: '0',
|
||||
tooltipText: '',
|
||||
};
|
||||
|
||||
export const Icon = ({
|
||||
@ -22,6 +24,7 @@ export const Icon = ({
|
||||
colorLevel,
|
||||
rotate = iconDefaults.rotate,
|
||||
weight,
|
||||
tooltipText,
|
||||
...props
|
||||
}: IconProps) => {
|
||||
const { filled, outlined } = getIconNames();
|
||||
@ -53,14 +56,16 @@ export const Icon = ({
|
||||
|
||||
return (
|
||||
<IconWrapper size={getFontSize(size)} rotate={getRotationTransform(rotate)} {...props}>
|
||||
<IconComponent
|
||||
sx={{
|
||||
fontSize: getFontSize(size),
|
||||
color: getColor(color, colorLevel),
|
||||
}}
|
||||
style={{ color: getColor(color, colorLevel) }}
|
||||
weight={source === 'phosphor' ? weight : undefined} // Phosphor icons use 'weight' prop
|
||||
/>
|
||||
<Tooltip title={tooltipText}>
|
||||
<IconComponent
|
||||
sx={{
|
||||
fontSize: getFontSize(size),
|
||||
color: getColor(color, colorLevel),
|
||||
}}
|
||||
style={{ color: getColor(color, colorLevel) }}
|
||||
weight={source === 'phosphor' ? weight : undefined} // Phosphor icons use 'weight' prop
|
||||
/>
|
||||
</Tooltip>
|
||||
</IconWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
@ -31,6 +31,7 @@ export interface IconPropsDefaults {
|
||||
color: FontColorOptions;
|
||||
colorLevel?: FontColorLevelOptions;
|
||||
rotate: RotationOptions;
|
||||
tooltipText?: string;
|
||||
}
|
||||
|
||||
export interface IconProps extends Partial<IconPropsDefaults>, Omit<HTMLAttributes<HTMLElement>, 'color'> {
|
||||
|
||||
@ -53,7 +53,12 @@ export function ActionsColumn({ record, setFocusExecutionUrn, handleRollback, ha
|
||||
dropdownItems={items}
|
||||
extraActions={
|
||||
record.status === EXECUTION_REQUEST_STATUS_SUCCESS && record.showRollback ? (
|
||||
<Icon icon="ArrowUUpLeft" source="phosphor" onClick={() => handleRollback(record.id)} />
|
||||
<Icon
|
||||
icon="ArrowUUpLeft"
|
||||
source="phosphor"
|
||||
onClick={() => handleRollback(record.id)}
|
||||
tooltipText="Rollback"
|
||||
/>
|
||||
) : null
|
||||
}
|
||||
/>
|
||||
|
||||
@ -13,9 +13,20 @@ export default function RollbackExecutionConfirmation({ isOpen, onConfirm, onCan
|
||||
<ConfirmationModal
|
||||
isOpen={isOpen}
|
||||
modalTitle="Confirm Rollback"
|
||||
modalText="Are you sure you want to continue?
|
||||
Rolling back this ingestion run will remove any new data ingested during the run. This may
|
||||
exclude data that was previously extracted, but did not change during this run."
|
||||
modalText={
|
||||
<>
|
||||
Are you sure you want to continue? Rolling back this ingestion run will remove any new data ingested
|
||||
during the run. This may exclude data that was previously extracted, but did not change during this
|
||||
run.{' '}
|
||||
<a
|
||||
href="https://docs.datahub.com/docs/how/delete-metadata#rollback-ingestion-run"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Learn more
|
||||
</a>
|
||||
</>
|
||||
}
|
||||
handleConfirm={onConfirm}
|
||||
handleClose={onCancel}
|
||||
/>
|
||||
|
||||
@ -337,6 +337,7 @@ export function ActionsColumn({
|
||||
e.stopPropagation();
|
||||
onCancel(record.lastExecUrn, record.urn);
|
||||
}}
|
||||
tooltipText="Stop Execution"
|
||||
/>
|
||||
);
|
||||
}
|
||||
@ -350,6 +351,7 @@ export function ActionsColumn({
|
||||
e.stopPropagation();
|
||||
onExecute(record.urn);
|
||||
}}
|
||||
tooltipText="Execute"
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user