Skip to content

Commit

Permalink
feat(investigation-bias): Make button primary and change columns icon (
Browse files Browse the repository at this point in the history
  • Loading branch information
matejminar authored Oct 31, 2023
1 parent 8f67757 commit b5747b6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
8 changes: 6 additions & 2 deletions static/app/components/discover/transactionsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,13 @@ class _TransactionsList extends Component<Props> {
onChange={opt => handleDropdownChange(opt.value)}
/>
</div>
<div>
<InvestigationRuleWrapper>
<InvestigationRuleCreation
buttonProps={{size: 'xs'}}
eventView={eventView}
numSamples={totalNumSamples}
/>
</div>
</InvestigationRuleWrapper>
{!this.isTrend() &&
(handleOpenAllEventsClick ? (
<GuideAnchor target="release_transactions_open_in_transaction_events">
Expand Down Expand Up @@ -481,6 +481,10 @@ const StyledPagination = styled(Pagination)`
margin: 0 0 0 ${space(1)};
`;

const InvestigationRuleWrapper = styled('div')`
margin-right: ${space(1)};
`;

function TransactionsList(
props: Omit<Props, 'cursorName' | 'limit'> & {
cursorName?: Props['cursorName'];
Expand Down
9 changes: 7 additions & 2 deletions static/app/components/dynamicSampling/investigationRule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ function useCreateInvestigationRuleMutation(vars: CreateCustomRuleVariables) {
}

const InvestigationInProgressNotification = styled('span')`
margin: ${space(1.5)};
font-size: ${p => p.theme.fontSizeMedium};
color: ${p => p.theme.subText};
font-weight: 600;
Expand Down Expand Up @@ -236,7 +235,7 @@ function InvestigationRuleCreationInternal(props: PropsInternal) {
}
)}
>
<IconQuestion size="xs" color="subText" />
<StyledIconQuestion size="sm" color="subText" />
</Tooltip>
</InvestigationInProgressNotification>
);
Expand All @@ -255,6 +254,7 @@ function InvestigationRuleCreationInternal(props: PropsInternal) {
)}
>
<Button
priority="primary"
{...props.buttonProps}
onClick={() => createInvestigationRule({organization, period, projects, query})}
icon={<IconStack size="xs" />}
Expand All @@ -273,3 +273,8 @@ export function InvestigationRuleCreation(props: Props) {
</Feature>
);
}

const StyledIconQuestion = styled(IconQuestion)`
position: relative;
top: 2px;
`;
4 changes: 2 additions & 2 deletions static/app/views/discover/table/tableActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {Button} from 'sentry/components/button';
import DataExport, {ExportQueryType} from 'sentry/components/dataExport';
import {InvestigationRuleCreation} from 'sentry/components/dynamicSampling/investigationRule';
import {Hovercard} from 'sentry/components/hovercard';
import {IconDownload, IconStack, IconTag} from 'sentry/icons';
import {IconDownload, IconSliders, IconTag} from 'sentry/icons';
import {t} from 'sentry/locale';
import {OrganizationSummary} from 'sentry/types';
import {trackAnalytics} from 'sentry/utils/analytics';
Expand Down Expand Up @@ -102,7 +102,7 @@ function renderEditButton(canEdit: boolean, props: Props) {
disabled={!canEdit}
onClick={onClick}
data-test-id="grid-edit-enable"
icon={<IconStack size="xs" />}
icon={<IconSliders size="xs" />}
>
{t('Columns')}
</Button>
Expand Down

0 comments on commit b5747b6

Please sign in to comment.