Skip to content

Commit 8deae8f

Browse files
committed
maintain ellipsis trigger type for logs
1 parent 406cdee commit 8deae8f

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

static/app/views/discover/table/cellAction.tsx

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,15 +282,29 @@ function makeCellActions({
282282
return actions;
283283
}
284284

285-
type Props = React.PropsWithoutRef<CellActionsOpts>;
285+
/**
286+
* Potentially temporary as design and product need more time to determine how logs table should trigger the dropdown.
287+
* Currently, the agreed default for every table should be bold hover. Logs is the only table to use the ellipsis trigger.
288+
*/
289+
export enum ActionTriggerType {
290+
ELLIPSIS = 'ellipsis',
291+
BOLD_HOVER = 'bold_hover',
292+
}
286293

287-
function CellAction(props: Props) {
294+
type Props = React.PropsWithoutRef<CellActionsOpts> & {
295+
triggerType?: ActionTriggerType;
296+
};
297+
298+
function CellAction({triggerType = ActionTriggerType.BOLD_HOVER, ...props}: Props) {
288299
const organization = useOrganization();
289300
const {children, column} = props;
290301
const cellActions = makeCellActions(props);
291302
const align = fieldAlignment(column.key as string, column.type);
292303

293-
if (organization.features.includes('discover-cell-actions-v2'))
304+
if (
305+
organization.features.includes('discover-cell-actions-v2') &&
306+
triggerType === ActionTriggerType.BOLD_HOVER
307+
)
294308
return (
295309
<Container
296310
data-test-id={cellActions === null ? undefined : 'cell-action-container'}

static/app/views/explore/logs/tables/logsTableRow.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import useOrganization from 'sentry/utils/useOrganization';
1717
import useProjectFromId from 'sentry/utils/useProjectFromId';
1818
import CellAction, {
1919
Actions,
20+
ActionTriggerType,
2021
copyToClipboard,
2122
openExternalLink,
2223
} from 'sentry/views/discover/table/cellAction';
@@ -320,6 +321,7 @@ export const LogRowContent = memo(function LogRowContent({
320321
? []
321322
: ALLOWED_CELL_ACTIONS
322323
}
324+
triggerType={ActionTriggerType.ELLIPSIS}
323325
>
324326
{renderedField}
325327
</CellAction>

0 commit comments

Comments
 (0)