Skip to content

Commit 120bae2

Browse files
fix(settings): Restore TextareaField for permissions preview
Keep the original TextareaField display for the permissions preview instead of a plain div, preserving the existing UI during the form migration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 75a6781 commit 120bae2

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

static/app/views/settings/account/apiNewToken.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
addLoadingMessage,
1212
addSuccessMessage,
1313
} from 'sentry/actionCreators/indicator';
14-
import {FieldGroup} from 'sentry/components/forms/fieldGroup';
14+
import {TextareaField} from 'sentry/components/forms/fields/textareaField';
1515
import {Panel} from 'sentry/components/panels/panel';
1616
import {PanelBody} from 'sentry/components/panels/panelBody';
1717
import {PanelHeader} from 'sentry/components/panels/panelHeader';
@@ -65,7 +65,7 @@ function getPermissionsPreview(permissions: Permissions): string {
6565
return Object.entries(permissions)
6666
.filter(([, access]) => access !== 'no-access')
6767
.map(([resource, access]) => `${resource.toLowerCase()}:${access}`)
68-
.join(', ');
68+
.join('\n');
6969
}
7070

7171
export default function ApiNewToken() {
@@ -156,12 +156,15 @@ export default function ApiNewToken() {
156156
displayedPermissions={DISPLAYED_PERMISSIONS}
157157
/>
158158
</PanelBody>
159-
<FieldGroup
159+
<TextareaField
160+
name="permissions-preview"
160161
label={t('Permissions Preview')}
161162
help={t('Your token will have the following scopes.')}
162-
>
163-
<div>{permissionsPreview || '—'}</div>
164-
</FieldGroup>
163+
rows={3}
164+
autosize
165+
placeholder={permissionsPreview}
166+
disabled
167+
/>
165168
</Panel>
166169
<Flex justify="end" gap="md" padding="md">
167170
<Button onClick={handleGoBack}>{t('Cancel')}</Button>

0 commit comments

Comments
 (0)