From cff39476f37ca655440fcbc7b7d33935b1c4d283 Mon Sep 17 00:00:00 2001 From: Collin Fingar Date: Mon, 11 Aug 2025 15:58:00 -0400 Subject: [PATCH] QueryLibrary: Updated Entrypoint Discoverability (#108413) * Updated query library discoverability * Reverted to plus * Fixed coloring issue --- .../QueryOperationAction.tsx | 20 ++++++++++++++++-- .../query/components/QueryEditorRow.tsx | 21 +++++++++++-------- 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/public/app/core/components/QueryOperationRow/QueryOperationAction.tsx b/public/app/core/components/QueryOperationRow/QueryOperationAction.tsx index f61344fd947..a747d9dbcdf 100644 --- a/public/app/core/components/QueryOperationRow/QueryOperationAction.tsx +++ b/public/app/core/components/QueryOperationRow/QueryOperationAction.tsx @@ -11,17 +11,25 @@ interface BaseQueryOperationActionProps { onClick: (e: React.MouseEvent) => void; disabled?: boolean; dataTestId?: string; + isGroupEnd?: boolean; + isHighlighted?: boolean; } function BaseQueryOperationAction(props: QueryOperationActionProps | QueryOperationToggleActionProps) { const styles = useStyles2(getStyles); return ( -
+
{ position: 'relative', color: theme.colors.text.secondary, }), + highlighted: css({ + color: theme.colors.primary.main, + }), + + iconGroupEnd: css({ + borderRight: `1px solid ${theme.colors.border.medium}`, + paddingRight: theme.spacing(0.5), + }), active: css({ '&:before': { display: 'block', diff --git a/public/app/features/query/components/QueryEditorRow.tsx b/public/app/features/query/components/QueryEditorRow.tsx index b711b76d8c8..4a2e1511ae2 100644 --- a/public/app/features/query/components/QueryEditorRow.tsx +++ b/public/app/features/query/components/QueryEditorRow.tsx @@ -371,6 +371,16 @@ export class QueryEditorRow extends PureComponent + + { + onQueryReplacedFromLibrary?.(); + onReplace?.(query); + }} + app={this.props.app} + /> + {hasEditorHelp && ( extends PureComponent )} {this.renderExtraActions()} - - { - onQueryReplacedFromLibrary?.(); - onReplace?.(query); - }} - app={this.props.app} - /> {!hideHideQueryButton ? ( ({ title={t('query-operation.header.replace-query-from-library', 'Replace with query from library')} icon="book" onClick={onReplaceQueryFromLibrary} + isGroupEnd + isHighlighted /> ) : null; }