Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 7 additions & 19 deletions static/gsApp/components/ai/AiSetupDataConsent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {addSuccessMessage} from 'sentry/actionCreators/indicator';
import {AiPrivacyNotice} from 'sentry/components/aiPrivacyTooltip';
import {Alert} from 'sentry/components/core/alert';
import {Button} from 'sentry/components/core/button';
import {Flex} from 'sentry/components/core/layout';
import {Flex, Stack} from 'sentry/components/core/layout';
import {ExternalLink} from 'sentry/components/core/link';
import {useAutofixSetup} from 'sentry/components/events/autofix/useAutofixSetup';
import {useOrganizationSeerSetup} from 'sentry/components/events/autofix/useOrganizationSeerSetup';
Expand Down Expand Up @@ -103,7 +103,7 @@ function AiSetupDataConsent({groupId}: AiSetupDataConsentProps) {
}

return (
<ConsentItemsContainer>
<Stack gap="xl">
<Flex align="center" gap="md">
<SayHelloHeader>{t('Say Hello to a Smarter Sentry')}</SayHelloHeader>
</Flex>
Expand Down Expand Up @@ -146,7 +146,7 @@ function AiSetupDataConsent({groupId}: AiSetupDataConsentProps) {
</TouchCustomerMessage>
) : (
<Fragment>
<ButtonWrapper>
<Flex align="center" gap="md">
{canStartTrial ? (
<StartTrialButton
organization={organization}
Expand Down Expand Up @@ -245,7 +245,7 @@ function AiSetupDataConsent({groupId}: AiSetupDataConsentProps) {
{autofixAcknowledgeMutation.isError && (
<ErrorText>{t('Something went wrong.')}</ErrorText>
)}
</ButtonWrapper>
</Flex>
{canStartTrial && (
<LegalText>
{t(
Expand All @@ -257,7 +257,7 @@ function AiSetupDataConsent({groupId}: AiSetupDataConsentProps) {
)
) : (
<Fragment>
<ButtonWrapper>
<Flex align="center" gap="md">
<Button
priority="primary"
onClick={() => autofixAcknowledgeMutation.mutate()}
Expand All @@ -280,7 +280,7 @@ function AiSetupDataConsent({groupId}: AiSetupDataConsentProps) {
{autofixAcknowledgeMutation.isError && (
<ErrorText>{t('Something went wrong.')}</ErrorText>
)}
</ButtonWrapper>
</Flex>
</Fragment>
)}
<LegalText>
Expand All @@ -294,18 +294,12 @@ function AiSetupDataConsent({groupId}: AiSetupDataConsentProps) {
)}
</Alert>
)}
</ConsentItemsContainer>
</Stack>
);
}

export default AiSetupDataConsent;

const ConsentItemsContainer = styled('div')`
display: flex;
flex-direction: column;
gap: ${space(2)};
`;

const SayHelloHeader = styled('h3')`
margin: 0;
`;
Expand Down Expand Up @@ -348,12 +342,6 @@ const LegalText = styled('div')`
margin-top: ${space(1)};
`;

const ButtonWrapper = styled('div')`
display: flex;
gap: ${space(1)};
align-items: center;
`;

const StyledLoadingIndicator = styled(LoadingIndicator)`
&& {
/* margin: 0 ${space(0.5)} 0 ${space(1)}; */
Expand Down
19 changes: 6 additions & 13 deletions static/gsApp/components/codecovPromotionModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import {useEffect} from 'react';
import {css} from '@emotion/react';
import styled from '@emotion/styled';

import {Flex, Stack} from '@sentry/scraps/layout';

import type {ModalRenderProps} from 'sentry/actionCreators/modal';
import {Button} from 'sentry/components/core/button';
import {ButtonBar} from 'sentry/components/core/button/buttonBar';
Expand Down Expand Up @@ -49,19 +51,19 @@ function CodecovPromotionModal(props: Props) {
'Find untested code causing errors and avoid similar errors in the future with Sentry and Codecov.*'
)}
</p>
<PromotionPriceComparison>
<Flex gap="xl">
<PromotionPriceDisplay price={60} title="Current Price" showDecimals={false} />
<OffsetIconArrow direction="right" size="lg" />
<PriceWrapper>
<Stack>
<PromotionPriceDisplay
price={29}
title="Starts At*"
promo
showDecimals={false}
/>
<SeatText>{t('Includes 5 seats')}</SeatText>
</PriceWrapper>
</PromotionPriceComparison>
</Stack>
</Flex>

<StyledButtonBar>
<Button
Expand Down Expand Up @@ -124,10 +126,6 @@ const DisclaimerText = styled('div')`
margin-top: ${space(1)};
`;

const PromotionPriceComparison = styled('div')`
display: flex;
gap: ${space(2)};
`;
const StyledButtonBar = styled(ButtonBar)`
max-width: 150px;
margin-top: ${space(2)};
Expand All @@ -138,11 +136,6 @@ const InnerContent = styled('div')`
font-size: ${p => p.theme.fontSize.lg};
`;

const PriceWrapper = styled('div')`
display: flex;
flex-direction: column;
`;

const SeatText = styled('div')`
font-size: ${p => p.theme.fontSize.sm};
color: ${p => p.theme.tokens.content.secondary};
Expand Down
60 changes: 18 additions & 42 deletions static/gsApp/components/dataConsentModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import {Fragment} from 'react';
import styled from '@emotion/styled';
import missionControl from 'getsentry-images/missionControl.jpg';

import {Flex, Stack} from '@sentry/scraps/layout';

import {addErrorMessage, addSuccessMessage} from 'sentry/actionCreators/indicator';
import type {ModalRenderProps} from 'sentry/actionCreators/modal';
import {updateOrganization} from 'sentry/actionCreators/organizations';
Expand Down Expand Up @@ -59,7 +61,7 @@ export default function DataConsentModal({closeModal}: ModalRenderProps) {
"We're working to improve grouping, alert relevance, issue prioritization, and more, and we need your help."
)}
</Body>
<InfoHeader>
<Flex justify="between">
<ConsentHeader>{t('Data Consent')}</ConsentHeader>
<LearnMore
href="https://docs.sentry.io/product/security/ai-ml-policy/"
Expand All @@ -69,53 +71,53 @@ export default function DataConsentModal({closeModal}: ModalRenderProps) {
>
{t('Learn More')}
</LearnMore>
</InfoHeader>
</Flex>

<ConsentInfo>
<ConsentRow>
<Flex align="center" gap="2xl">
<StyledIconWrapper>
<IconGraphBar size="lg" />
</StyledIconWrapper>
<ConsentLabel>
<Stack>
<ConsentLabelHeader>{t('What data do we access?')}</ConsentLabelHeader>
<ConsentLabelBody>
{t(
'Sentry will access error messages, stack traces, spans, and DOM interactions.'
)}
</ConsentLabelBody>
</ConsentLabel>
</ConsentRow>
</Stack>
</Flex>
<Divider />
<ConsentRow>
<Flex align="center" gap="2xl">
<StyledIconWrapper>
<IconFix size="lg" />
</StyledIconWrapper>
<ConsentLabel>
<Stack>
<ConsentLabelHeader>{t('How do we use it?')}</ConsentLabelHeader>
<ConsentLabelBody>
{t(
'The data will be used to train and validate models to improve our product.'
)}
</ConsentLabelBody>
</ConsentLabel>
</ConsentRow>
</Stack>
</Flex>
<Divider />
<ConsentRow>
<Flex align="center" gap="2xl">
<StyledIconWrapper>
<IconLock locked size="lg" />
</StyledIconWrapper>
<ConsentLabel>
<Stack>
<ConsentLabelHeader>{t('Where does it go?')}</ConsentLabelHeader>
<ConsentLabelBody>
{t(
"We store data within Sentry's standard infrastructure. We will not share it with other customers or AI sub-processors without additional consent."
)}
</ConsentLabelBody>
</ConsentLabel>
</ConsentRow>
</Stack>
</Flex>
</ConsentInfo>
</div>
<Footer>
<Flex justify="right" marginTop="2xl" gap="md">
<Button
analyticsEventKey="data_consent_modal.maybe_later"
analyticsEventName="Data Consent Modal: Maybe Later"
Expand Down Expand Up @@ -145,7 +147,7 @@ export default function DataConsentModal({closeModal}: ModalRenderProps) {
>
{t('I agree')}
</Button>
</Footer>
</Flex>
</Fragment>
);
}
Expand All @@ -167,12 +169,6 @@ const Body = styled('div')`
margin-bottom: ${space(2)};
`;

const InfoHeader = styled('div')`
display: flex;
flex-direction: row;
justify-content: space-between;
`;

const ConsentHeader = styled('p')`
font-weight: bold;
color: ${p => p.theme.tokens.content.secondary};
Expand All @@ -187,18 +183,6 @@ const ConsentInfo = styled('div')`
padding-bottom: ${space(1.5)};
`;

const ConsentRow = styled('div')`
display: flex;
flex-direction: row;
align-items: center;
gap: ${space(3)};
`;

const ConsentLabel = styled('div')`
display: flex;
flex-direction: column;
`;

const ConsentLabelHeader = styled('div')`
font-weight: 600;
font-size: ${p => p.theme.fontSize.lg};
Expand All @@ -214,14 +198,6 @@ const StyledIconWrapper = styled('span')`
color: ${p => p.theme.tokens.content.secondary};
`;

const Footer = styled('div')`
display: flex;
flex-direction: row;
justify-content: right;
gap: ${space(1)};
margin-top: ${space(3)};
`;

const LearnMore = styled(ExternalLink)`
font-weight: bold;
text-transform: uppercase;
Expand Down
23 changes: 6 additions & 17 deletions static/gsApp/components/features/dateRangeQueryLimitFooter.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import styled from '@emotion/styled';

import {Flex, Stack} from '@sentry/scraps/layout';

import {Button, type ButtonProps} from 'sentry/components/core/button';
import {LinkButton} from 'sentry/components/core/button/linkButton';
import {t} from 'sentry/locale';
import {space} from 'sentry/styles/space';
import type {Organization} from 'sentry/types/organization';
import normalizeUrl from 'sentry/utils/url/normalizeUrl';
import withOrganization from 'sentry/utils/withOrganization';
Expand Down Expand Up @@ -35,9 +36,9 @@ function DateRangeQueryLimitFooter({
const canTrial = subscription.canTrial;

return (
<Container>
<Stack padding="xs" gap="md">
<DescriptionContainer>{description}</DescriptionContainer>
<ButtonContainer>
<Flex gap="md">
<UpgradeOrTrialButton
subscription={subscription}
priority="primary"
Expand Down Expand Up @@ -66,27 +67,15 @@ function DateRangeQueryLimitFooter({
{t('Learn More')}
</Button>
)}
</ButtonContainer>
</Container>
</Flex>
</Stack>
);
}

export default withOrganization(
withSubscription(DateRangeQueryLimitFooter, {noLoader: true})
);

const ButtonContainer = styled('div')`
display: flex;
gap: ${space(1)};
`;

const Container = styled('div')`
display: flex;
flex-direction: column;
gap: ${space(1)};
padding: ${space(0.5)};
`;

const DescriptionContainer = styled('div')`
font-size: 12px;
`;
13 changes: 4 additions & 9 deletions static/gsApp/components/features/disabledAlertWizard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import styled from '@emotion/styled';

import {Flex} from '@sentry/scraps/layout';

import {Button} from 'sentry/components/core/button';
import {ButtonBar} from 'sentry/components/core/button/buttonBar';
import {t} from 'sentry/locale';
Expand All @@ -14,7 +16,7 @@ type Props = React.PropsWithChildren<{

function DisabledAlertWizard({organization}: Props) {
return (
<Wrapper>
<Flex justify="between" align="center" wrap="wrap">
<Description>{t('Upgrade your plan to create this type of alert')}</Description>
<ButtonBar>
<Button
Expand All @@ -31,19 +33,12 @@ function DisabledAlertWizard({organization}: Props) {
{t('Set Conditions')}
</Button>
</ButtonBar>
</Wrapper>
</Flex>
);
}

export default DisabledAlertWizard;

const Wrapper = styled('div')`
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
`;

const Description = styled('div')`
margin: ${space(1)} ${space(1)} ${space(1)} 0;
`;
Loading
Loading