Skip to content

Commit bd0a28f

Browse files
evanpurkhiserandrewshie-sentry
authored andcommitted
fix(avatars): Move gravatar help text to radio description (#93507)
Looks like this now <img alt="clipboard.png" width="335" src="https://i.imgur.com/dHN85fh.png" /> Before was like this <img alt="clipboard.png" width="1404" src="https://i.imgur.com/5hRmDOf.png" /> Part of [RTC-1020: Avatar chooser is huge](https://linear.app/getsentry/issue/RTC-1020/avatar-chooser-is-huge)
1 parent ce9db0b commit bd0a28f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

static/app/components/avatarChooser.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ import {SentryAppAvatar} from 'sentry/components/core/avatar/sentryAppAvatar';
88
import {TeamAvatar} from 'sentry/components/core/avatar/teamAvatar';
99
import {UserAvatar} from 'sentry/components/core/avatar/userAvatar';
1010
import {Button} from 'sentry/components/core/button';
11+
import type {RadioOption} from 'sentry/components/forms/controls/radioGroup';
1112
import RadioGroup from 'sentry/components/forms/controls/radioGroup';
1213
import ExternalLink from 'sentry/components/links/externalLink';
1314
import LoadingError from 'sentry/components/loadingError';
1415
import LoadingIndicator from 'sentry/components/loadingIndicator';
1516
import Panel from 'sentry/components/panels/panel';
1617
import PanelBody from 'sentry/components/panels/panelBody';
1718
import PanelHeader from 'sentry/components/panels/panelHeader';
18-
import Well from 'sentry/components/well';
19-
import {t} from 'sentry/locale';
19+
import {t, tct} from 'sentry/locale';
2020
import {space} from 'sentry/styles/space';
2121
import type {SentryApp, SentryAppAvatarPhotoType} from 'sentry/types/integrations';
2222
import type {Organization, Team} from 'sentry/types/organization';
@@ -149,7 +149,7 @@ function AvatarChooser(props: AvatarChooserProps) {
149149
const isOrganization = type === 'organization';
150150
const isSentryApp = type?.startsWith('sentryApp');
151151

152-
const choices: Array<[AvatarType, string]> = [];
152+
const choices: Array<RadioOption<AvatarType>> = [];
153153

154154
if (allowDefault && preview) {
155155
choices.push(['default', defaultChoiceText ?? t('Use default avatar')]);
@@ -161,7 +161,13 @@ function AvatarChooser(props: AvatarChooserProps) {
161161
choices.push(['upload', t('Upload an image')]);
162162
}
163163
if (allowGravatar) {
164-
choices.push(['gravatar', t('Use Gravatar')]);
164+
choices.push([
165+
'gravatar',
166+
t('Use Gravatar'),
167+
tct('Manage your Gravatar on [gravatarLink:gravatar.com].', {
168+
gravatarLink: <ExternalLink href="https://gravatar.com" />,
169+
}),
170+
]);
165171
}
166172

167173
const sharedAvatarProps = {
@@ -205,12 +211,6 @@ function AvatarChooser(props: AvatarChooserProps) {
205211
{isDefault && preview}
206212
</AvatarGroup>
207213
<AvatarUploadSection>
208-
{allowGravatar && avatarType === 'gravatar' && (
209-
<Well>
210-
{t('Gravatars are managed through ')}
211-
<ExternalLink href="http://gravatar.com">Gravatar.com</ExternalLink>
212-
</Well>
213-
)}
214214
{model.avatar && avatarType === 'upload' && (
215215
<AvatarUploader
216216
{...props}

0 commit comments

Comments
 (0)