Skip to content

Removed legacy settings typography and link components - #29538

Merged
9larsons merged 1 commit into
mainfrom
codex/admin-settings-shade-typography-links
Jul 22, 2026
Merged

9larsons merged 1 commit into
mainfrom
codex/admin-settings-shade-typography-links

Conversation

@9larsons

Copy link
Copy Markdown
Contributor

What changed

  • Replaced every admin settings use of the legacy Heading, Link, and IconLabel components with Shade primitives or semantic elements.
  • Updated legacy design-system internals and shared form labels to render through Shade while the package is being retired.
  • Removed the legacy components, their stories, and their exports.
  • Aligned Mailgun controls and shared TextField, HtmlField, and CodeEditor labels with current Settings field styling.
  • Permitted the one-way admin-x-design-system to Shade migration dependency while continuing to forbid dependencies on admin-x-framework.

Why

This is Group 7 of the admin-x-settings to Shade rip-out. Removing the legacy exports makes incomplete migrations fail at the type level and prevents old typography styling from surviving inside shared modal and form internals.

Validation

  • admin-x-design-system lint, build, and 19 unit tests
  • admin-x-settings lint and 206 unit tests
  • Admin Settings acceptance tier: 51 files and 372 browser tests
  • Dependency Cruiser: 504 modules and 1,552 dependencies with no violations
  • Manual checks: Mailgun edit fields, Design theme fields, Portal signup/account labels, tiers, code modal, and settings navigation

How to validate

  1. Open Settings and compare section headings, modal titles, links, and field labels across General, Membership, Growth, and Advanced.
  2. Edit Mailgun and confirm its region, domain, and private key controls match other Settings fields.
  3. Open Design, then Portal Signup options and Account page; confirm text-field and rich-text labels use the same primary label styling.
  4. Open a tier and Code injection; confirm headings and editor chrome remain aligned and functional.

no ref

Settings typography and links should use Shade primitives consistently so legacy presentation does not survive through shared form and modal internals.
@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The design system removes the Heading, IconLabel, and Link exports and migrates internal rendering to Shade primitives and components. Settings screens replace heading, label, link, and form-control usages, with selected numeric displays switched to formatNumber. The dependency rule now permits shade dependencies while prohibiting dependencies on admin-x-framework.

Suggested reviewers: cmraible

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: removing legacy typography and link components.
Description check ✅ Passed The description accurately matches the changeset and migration goals across settings and design system internals.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/admin-settings-shade-typography-links

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@9larsons
9larsons marked this pull request as ready for review July 22, 2026 17:20
@nx-cloud

nx-cloud Bot commented Jul 22, 2026 •

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit fd6d0c4

Command Status Duration Result
nx run @tryghost/admin:test:acceptance ✅ Succeeded 6m 27s View ↗
nx run-many -t test:unit -p @tryghost/admin-x-d... ✅ Succeeded 2m 19s View ↗
nx run ghost-monorepo:lint:boundaries ✅ Succeeded 22s View ↗
nx run-many -t lint -p ghost-monorepo,@tryghost... ✅ Succeeded 1m 12s View ↗
nx run @tryghost/admin:build ✅ Succeeded 26s View ↗
nx run-many --target=build --projects=tag:publi... ✅ Succeeded <1s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-07-22 17:28:24 UTC

@9larsons
9larsons enabled auto-merge (squash) July 22, 2026 17:20

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/admin-x-design-system/src/global/form/code-editor-view.tsx`:
- Line 108: Update the CodeMirror setup in the component containing the
title/FieldLabel rendering to apply the generated id through the
library-supported EditorView.contentAttributes mechanism as aria-labelledby on
the editable content element, while keeping FieldLabel.htmlFor pointing to that
id. Add a DOM-level regression test that verifies the label is associated with
the rendered editor content.

In `@apps/admin-x-design-system/src/global/form/html-field.tsx`:
- Line 46: Update HtmlField to create a stable editor identifier with useId(),
pass it as htmlFor on FieldLabel, and apply the same id to the edit/preview
toggle control wherever it is rendered. Preserve the existing hideTitle sr-only
behavior while ensuring the label is associated with the widget.

In `@apps/admin-x-settings/src/components/settings/email/mailgun.tsx`:
- Around line 67-74: Associate each migrated FieldLabel with its corresponding
control: in apps/admin-x-settings/src/components/settings/email/mailgun.tsx
lines 67-74, add a matching id to SelectTrigger and htmlFor to FieldLabel; in
apps/admin-x-settings/src/components/settings/site/design-and-branding/theme-setting.tsx
lines 89-93, set FieldLabel’s htmlFor to custom-${setting.key}.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9af16995-c25e-4e10-baba-2725a42aba4e

📥 Commits

Reviewing files that changed from the base of the PR and between f332921 and fd6d0c4.

📒 Files selected for processing (43)
  • .dependency-cruiser.cjs
  • apps/admin-x-design-system/src/global/form/code-editor-view.tsx
  • apps/admin-x-design-system/src/global/form/color-indicator.tsx
  • apps/admin-x-design-system/src/global/form/form.tsx
  • apps/admin-x-design-system/src/global/form/html-field.tsx
  • apps/admin-x-design-system/src/global/form/text-field.tsx
  • apps/admin-x-design-system/src/global/heading.stories.tsx
  • apps/admin-x-design-system/src/global/heading.tsx
  • apps/admin-x-design-system/src/global/icon-label.stories.tsx
  • apps/admin-x-design-system/src/global/icon-label.tsx
  • apps/admin-x-design-system/src/global/layout/page.stories.tsx
  • apps/admin-x-design-system/src/global/layout/view-container.tsx
  • apps/admin-x-design-system/src/global/link.stories.tsx
  • apps/admin-x-design-system/src/global/link.tsx
  • apps/admin-x-design-system/src/global/modal/modal-page.tsx
  • apps/admin-x-design-system/src/global/modal/modal.tsx
  • apps/admin-x-design-system/src/global/modal/preview-modal.stories.tsx
  • apps/admin-x-design-system/src/global/modal/preview-modal.tsx
  • apps/admin-x-design-system/src/global/sortable-list.tsx
  • apps/admin-x-design-system/src/index.ts
  • apps/admin-x-design-system/src/settings/setting-group-header.stories.tsx
  • apps/admin-x-design-system/src/settings/setting-group-header.tsx
  • apps/admin-x-design-system/src/settings/setting-value.tsx
  • apps/admin-x-settings/src/components/settings/advanced/code/code-modal.tsx
  • apps/admin-x-settings/src/components/settings/advanced/labs/yaml-file-editor-modal.tsx
  • apps/admin-x-settings/src/components/settings/advanced/migration-tools/universal-import-modal.tsx
  • apps/admin-x-settings/src/components/settings/email/mailgun.tsx
  • apps/admin-x-settings/src/components/settings/email/newsletters/newsletter-detail-modal.tsx
  • apps/admin-x-settings/src/components/settings/general/user-detail-modal.tsx
  • apps/admin-x-settings/src/components/settings/general/users/custom-header.tsx
  • apps/admin-x-settings/src/components/settings/general/users/staff-token.tsx
  • apps/admin-x-settings/src/components/settings/growth/embed-signup/embed-signup-sidebar.tsx
  • apps/admin-x-settings/src/components/settings/growth/recommendations/recommendation-description-form.tsx
  • apps/admin-x-settings/src/components/settings/growth/recommendations/recommendation-list.tsx
  • apps/admin-x-settings/src/components/settings/membership/portal/look-and-feel.tsx
  • apps/admin-x-settings/src/components/settings/membership/portal/transistor-settings.tsx
  • apps/admin-x-settings/src/components/settings/membership/stripe/stripe-connect-modal.tsx
  • apps/admin-x-settings/src/components/settings/membership/tiers/tier-detail-modal.tsx
  • apps/admin-x-settings/src/components/settings/membership/tiers/tier-detail-preview.tsx
  • apps/admin-x-settings/src/components/settings/site/change-theme.tsx
  • apps/admin-x-settings/src/components/settings/site/design-and-branding/theme-setting.tsx
  • apps/admin-x-settings/src/components/settings/site/theme/official-themes.tsx
  • apps/admin-x-settings/src/main-content.tsx
💤 Files with no reviewable changes (7)
  • apps/admin-x-design-system/src/global/link.tsx
  • apps/admin-x-design-system/src/global/icon-label.stories.tsx
  • apps/admin-x-design-system/src/global/icon-label.tsx
  • apps/admin-x-design-system/src/global/link.stories.tsx
  • apps/admin-x-design-system/src/global/heading.stories.tsx
  • apps/admin-x-design-system/src/index.ts
  • apps/admin-x-design-system/src/global/heading.tsx

{...props}
/>
{title && <Heading className={'order-1 text-grey-700! peer-focus:text-black!'} htmlFor={id} useLabelTag={true}>{title}</Heading>}
{title && <FieldLabel className='order-1' htmlFor={id}>{title}</FieldLabel>}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== locate file =="
fd -a 'code-editor-view\.tsx$' . || true

echo "== file stats =="
if [ -f apps/admin-x-design-system/src/global/form/code-editor-view.tsx ]; then
  wc -l apps/admin-x-design-system/src/global/form/code-editor-view.tsx
fi

echo "== outline =="
ast-grep outline apps/admin-x-design-system/src/global/form/code-editor-view.tsx --view compact 2>/dev/null || true

echo "== relevant content =="
cat -n apps/admin-x-design-system/src/global/form/code-editor-view.tsx | sed -n '1,200p'

echo "== search for CodeEditorView usages and component definition signatures =="
rg -n "CodeEditor|code-editor-view|FieldLabel|aria-labelledby|htmlFor" apps/admin-x-design-system/src apps/admin-x-design-system --glob '!**/dist/**' --glob '!**/build/**' | sed -n '1,240p'

Repository: TryGhost/Ghost

Length of output: 11450


🌐 Web query:

@uiw/react-codemirror ReactCodeMirrorProps id aria-labelledby support

💡 Result:

As of July 2026, the @uiw/react-codemirror component does not natively support passing standard HTML attributes like id or aria-labelledby directly as component props to the editor wrapper [1]. While the component accepts various props to configure the editor's behavior and appearance, it does not expose an interface to attach these specific accessibility attributes to the underlying DOM container [2][1]. Users attempting to use standard techniques—such as placing an id on the component and referencing it with a —will find that it does not function as expected, as the id is not automatically applied to the rendered editor container [3]. To address accessibility requirements (such as "ARIA input fields do not have accessible names" warnings), the recommended approach is to leverage the underlying CodeMirror 6 API, which allows you to inject attributes directly into the editor's DOM [4][5]. You can use the contentAttributes extension from the @codemirror/view package to set an aria-label: import { EditorView } from '@codemirror/view'; // Add to your extensions array extensions={[ EditorView.contentAttributes.of({ 'aria-label': 'Code editor' }) ]} This approach is the standard, library-supported way to satisfy accessibility audits for CodeMirror 6 instances [5].

Citations:


🌐 Web query:

CodeMirror 6 EditorView.contentAttributes.set aria-labelledby supported

💡 Result:

Yes, CodeMirror 6 supports the use of aria-labelledby via the EditorView.contentAttributes facet [1]. You can apply this attribute to the editor's editable DOM element (the element with the cm-content class) by providing it as an extension [2][3]. Because CodeMirror's contentAttributes facet merges the provided object with the default attributes assigned to the editor, this is the recommended approach for adding accessibility labels [2][3]. Example usage: import { EditorView } from "@codemirror/view"; const myExtensions = [ EditorView.contentAttributes.of({ "aria-labelledby": "your-label-id-here" }) ]; This will result in the aria-labelledby attribute being applied directly to the internal content element, allowing you to associate a label (or multiple labels) with the editor for assistive technology [1][4]. Note that you must ensure the target element with that ID exists in your document [4].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== package versions =="
if [ -f package.json ]; then jq '.packageManager // empty, .engines // empty' package.json; fi
rg -n '"(`@uiw/react-codemirror`|`@codemirror/view`|`@codemirror/state`|`@tryghost/shade`|`@uiw/codemirror-themes-all`)"' pnpm-lock.yaml package.json apps/admin-x-design-system/package.json package.json 2>/dev/null | sed -n '1,120p'

echo "== FieldLabel source/usage =="
rg -n "FieldLabel|component:.*label|function FieldLabel|const FieldLabel" apps/admin-x-design-system/src . --glob '!node_modules/**' --glob '!dist/**' | sed -n '1,200p'

echo "== focused test files/content =="
fd -a 'code-editor.*\.(test|spec|stories)\.(ts|tsx|js|jsx)$|code-editor-view.*\.(test|spec|stories)\.(ts|tsx|js|jsx)$' . | sed -n '1,80p'
for f in $(fd -a 'code-editor.*\.(test|spec|stories)\.(ts|tsx|js|jsx)$|code-editor-view.*\。(test|spec|stories)\.(ts|tsx|js|jsx)$' .); do
  echo "--- $f ---"
  wc -l "$f"
  cat -n "$f" | sed -n '1,240p'
done

Repository: TryGhost/Ghost

Length of output: 34957


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== FieldLabel implementation =="
cat -n apps/shade/src/components/ui/field.tsx | sed -n '90,125p'

echo "== code-editor stories =="
cat -n apps/admin-x-design-system/src/global/form/code-editor.stories.tsx | sed -n '1,120p'

echo "== repository test files mentioning CodeEditor/code-editor =="
rg -n "CodeEditor|code-editor" --glob '*.{ts,tsx,js,jsx}' apps/admin-x-design-system tests .github --glob '!**/dist/**' --glob '!**/build/**' | sed -n '1,160p'

echo "== inspect package versions from lock with package manager context =="
if [ -f pnpm-lock.yaml ]; then
  jq -r '
    "importers:", (.importers["."].dependencies // {}).["`@codemirror/state`"]?, (.importers["."].devDependencies // {}).["`@codemirror/state`"]?;
      "apps/admin-x-design-system:", (.importers["apps/admin-x-design-system"].dependencies // {}).["`@codemirror/state`"]?, (.importers["apps/admin-x-design-system"].devDependencies // {}).["`@codemirror/state`"]?;
      "deps `@codemirror/state`:", (.packages["/@codemirror/state"|"`@codemirror/state`@6.4.1"|"`@codemirror/state`@6.4.0"] // {}).version?;
      "deps `@codemirror/view`:", (.packages["/@codemirror/view"] // {}).version?;
      "deps `@uiw/react-codemirror`:", (.packages["/@uiw/react-codemirror"] // {}).version?
    ' pnpm-lock.yaml 2>/dev/null || true
fi

Repository: TryGhost/Ghost

Length of output: 5502


Associate the label with the CodeMirror editable content.

id is only generated for FieldLabel, but it is not attached to the CodeMirror wrapper and CodeMirror does not support standard id/aria-labelledby props directly. Use a library-supported mechanism such as EditorView.contentAttributes.of({ 'aria-labelledby': id }), and keep the FieldLabel association pointing at that element instead of a non-existent control. Add a DOM-level regression test that checks the label is associated with the editor content.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/admin-x-design-system/src/global/form/code-editor-view.tsx` at line 108,
Update the CodeMirror setup in the component containing the title/FieldLabel
rendering to apply the generated id through the library-supported
EditorView.contentAttributes mechanism as aria-labelledby on the editable
content element, while keeping FieldLabel.htmlFor pointing to that id. Add a
DOM-level regression test that verifies the label is associated with the
rendered editor content.

return (
<div className={`flex flex-col ${containerClassName}`}>
{title && <Heading className={hideTitle ? 'sr-only' : ''} grey={true} useLabelTag={true}>{title}</Heading>}
{title && <FieldLabel className={hideTitle ? 'sr-only' : undefined}>{title}</FieldLabel>}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
rg -n -C 5 --glob '*.{ts,tsx}' \
  'HtmlEditorProps|const HtmlEditor|function HtmlEditor|<HtmlEditor|aria-labelledby' \
  apps/admin-x-design-system apps

Repository: TryGhost/Ghost

Length of output: 19095


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '--- html-field ---\n'
cat -n apps/admin-x-design-system/src/global/form/html-field.tsx

printf '\n--- html-editor ---\n'
cat -n apps/admin-x-design-system/src/global/form/html-editor.tsx

printf '\n--- koenig-editor-base (props/label refs) ---\n'
rg -n -C 6 'interface .*Props|HTMLProps|input\(|textarea\(|id\(|aria-label|aria-labelledby|placeholder|const Koenig|function Koenig' apps/admin-x-design-system/src/global/form/koenig-editor-base.tsx

printf '\n--- FieldLabel definition/usages ---\n'
rg -n -C 4 'FieldLabel|export .*Label|id=|htmlFor|aria-labelledby' -g '*.tsx' node_modules apps/admin-x-design-system/src/global/form apps/admin-x-design-system/src | sed -n '1,220p'

Repository: TryGhost/Ghost

Length of output: 243


🏁 Script executed:

#!/bin/bash
set -euo pipefail

cat -n apps/admin-x-design-system/src/global/form/html-field.tsx
printf '\n--- html-editor ---\n'
cat -n apps/admin-x-design-system/src/global/form/html-editor.tsx
printf '\n--- koenig-editor-base id/aria props ---\n'
rg -n -C 6 'interface .*Props|HTMLProps|input\(|textarea\(|id\(|aria-label|aria-labelledby|placeholder|const Koenig|function Koenig' apps/admin-x-design-system/src/global/form/koenig-editor-base.tsx
printf '\n--- FieldLabel definition/usages ---\n'
rg -n -C 4 'FieldLabel|export .*Label|id=|htmlFor|aria-labelledby' -g '*.tsx' node_modules apps/admin-x-design-system/src/global/form apps/admin-x-design-system/src | sed -n '1,220p'

Repository: TryGhost/Ghost

Length of output: 32198


🏁 Script executed:

#!/bin/bash
set -euo pipefail

cat -n apps/admin-x-design-system/src/global/form/koenig-editor-base.tsx | sed -n '1,250p'
printf '\n--- FieldLabel package references ---\n'
rg -n -C 3 '`@tryghost/shade`|FieldLabel' -g 'package.json' -g 'pnpm-lock.yaml' -g './*.json' -g '*.tsx' . | sed -n '1,220p'

printf '\n--- HtmlField usages ---\n'
rg -n -C 4 '<HtmlField|from \.\/html-field|HtmlField\(React\.useId|hideTitle' apps/admin apps/admin-x-design-system | sed -n '1,260p'

printf '\n--- KoenigComposableEditor aria/id label ref check ---\n'
rg -n -C 3 'KoenigComposableEditor|labelRef|aria-label|aria-labelledby|id=|placeholderText' -g '*.ts' -g '*.tsx' . | sed -n '1,240p'

Repository: TryGhost/Ghost

Length of output: 50370


🌐 Web query:

tryghost shade FieldLabel component htmlFor

💡 Result:

In the Ghost CMS "Shade" design system (found at apps/shade/src/components/ui/field.tsx), form-related labeling is typically handled through a composed Field component rather than a standalone, generic FieldLabel component with an exposed htmlFor prop [1][2]. In modern Ghost UI implementations using Shade, you generally use the Field, FieldLabel, and associated sub-components as follows: Label Text The Shade Field system is designed to handle accessibility associations automatically or via internal composition, rather than requiring you to manually pass an htmlFor prop to a label component [1][2]. If you are working within the Ghost codebase, you should check the implementation in apps/shade/src/components/ui/field.tsx to see how the Field components are composed [1]. Please note that many common React design systems (such as Backstage, Braid, or Servicetitan) feature a standalone FieldLabel component that explicitly accepts an htmlFor prop [3][4][5], but this is distinct from Ghost's internal Shade architecture [1].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

cat -n apps/shade/src/components/ui/field.tsx | sed -n '1,180p'
printf '\n--- nearby shade form components labeling refs ---\n'
rg -n -C 5 'FieldLabel|IdContext|useId|htmlFor|aria-labelledby|<Field>' apps/shade/src/components/ui apps/shade/src/components | sed -n '1,220p'

Repository: TryGhost/Ghost

Length of output: 25313


🏁 Script executed:

#!/bin/bash
set -euo pipefail

cat -n apps/shade/src/components/ui/label.tsx | sed -n '1,160p'
printf '\n--- Field exports ---\n'
rg -n -C 2 'FieldLabel|Field|components' apps/shade/src | sed -n '1,220p'
printf '\n--- FieldLabel id prop usage ---\n'
rg -n '<FieldLabel' -g '*.tsx' apps/shade apps/admin-x-design-system | sed -n '1,220p'
printf '\n--- placeholderText / Koenig aria-label refs ---\n'
rg -n -C 4 'placeholderText|aria-label|placeholder|contenteditable|tabIndex|rostering|labelRef' -g '*.ts' -g '*.tsx' ghost apps/admin-x-design-system/src/apps packages koenig | sed -n '1,260p'

Repository: TryGhost/Ghost

Length of output: 50370


Associate the HtmlField label with the Koenig editor.

Use useId() for a label/control pair: pass htmlFor={editorId} to FieldLabel and apply id={editorId} wherever HtmlField renders the edit/preview toggle, so the label actually describes the widget and the sr-only mode is still accessible.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/admin-x-design-system/src/global/form/html-field.tsx` at line 46, Update
HtmlField to create a stable editor identifier with useId(), pass it as htmlFor
on FieldLabel, and apply the same id to the edit/preview toggle control wherever
it is rendered. Preserve the existing hideTitle sr-only behavior while ensuring
the label is associated with the widget.

Comment on lines 67 to 74
<Field>
<FieldLabel>Mailgun region</FieldLabel>
<Select value={mailgunRegion ?? ''} onValueChange={value => updateSetting('mailgun_base_url', value)}>
<SelectTrigger aria-label='Mailgun region'><SelectValue /></SelectTrigger>
<SelectTrigger aria-label='Mailgun region' className='border-transparent bg-muted hover:bg-muted'><SelectValue /></SelectTrigger>
<SelectContent>
{MAILGUN_REGIONS.map(option => <SelectItem key={option.value} value={option.value}>{option.label}</SelectItem>)}
</SelectContent>
</Select>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Associate migrated FieldLabel elements with their controls.

Both migrations create labels without an explicit control target:

  • apps/admin-x-settings/src/components/settings/email/mailgun.tsx#L67-L74: add a matching id to SelectTrigger and htmlFor to FieldLabel.
  • apps/admin-x-settings/src/components/settings/site/design-and-branding/theme-setting.tsx#L89-L93: set htmlFor={custom-${setting.key}} on FieldLabel.
Suggested wiring
-<FieldLabel>Mailgun region</FieldLabel>
+<FieldLabel htmlFor='mailgun-region'>Mailgun region</FieldLabel>
 <Select ...>
-    <SelectTrigger aria-label='Mailgun region' ...>
+    <SelectTrigger id='mailgun-region' aria-label='Mailgun region' ...>

-<FieldLabel>{humanizeSettingKey(setting.key)}</FieldLabel>
+<FieldLabel htmlFor={`custom-${setting.key}`}>{humanizeSettingKey(setting.key)}</FieldLabel>
📍 Affects 2 files
  • apps/admin-x-settings/src/components/settings/email/mailgun.tsx#L67-L74 (this comment)
  • apps/admin-x-settings/src/components/settings/site/design-and-branding/theme-setting.tsx#L89-L93
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/admin-x-settings/src/components/settings/email/mailgun.tsx` around lines
67 - 74, Associate each migrated FieldLabel with its corresponding control: in
apps/admin-x-settings/src/components/settings/email/mailgun.tsx lines 67-74, add
a matching id to SelectTrigger and htmlFor to FieldLabel; in
apps/admin-x-settings/src/components/settings/site/design-and-branding/theme-setting.tsx
lines 89-93, set FieldLabel’s htmlFor to custom-${setting.key}.

@9larsons
9larsons merged commit bb14227 into main Jul 22, 2026
45 checks passed
@9larsons
9larsons deleted the codex/admin-settings-shade-typography-links branch July 22, 2026 17:32
9larsons added a commit that referenced this pull request Jul 22, 2026
- main's offers table rework (#29534) fixed sorting to apply across signup
  and retention rows together and added acceptance coverage; ported the
  unified sort (name tiebreak, null dates last) and the offers-table-body
  testid into the native offers index dialog
- main's color picker migration (#29538/#29542) renamed the hex input's
  accessible name to "Hex color" and the design suite now targets it;
  matched the native color picker field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant