Skip to content

Improved custom field type icons and fixed type picker alignment - #29407

Merged
renatoworks merged 1 commit into
mainfrom
feat/custom-field-type-icons
Jul 16, 2026
Merged

renatoworks merged 1 commit into
mainfrom
feat/custom-field-type-icons

Conversation

@renatoworks

Copy link
Copy Markdown
Contributor

Describe the problem you are solving

The custom field type catalog (Settings → Membership → Custom fields) rendered its type indicators as literal text glyphs: "Aa", a pilcrow, and "St". The pilcrow and "St" read poorly, and because glyph text is variable-width, the labels in the type dropdown drifted out of alignment. Behind the membersCustomFields flag.

Changelog for devs

  • Changed the type catalog's iconText glyph property to icon, an icon name rendered through the design system's icon set (the catalog stays render-free)
  • Added three icons to the design system set: aa (the familiar text glyph packaged as an SVG), long-text (two full lines and a short one), and map-pin (drawn to the set's 1.5px-stroke conventions)
  • Fixed dropdown alignment: the type tile is now a fixed-width slot around a uniform-size icon, so option labels align in a column regardless of icon shape

Changelog for customers

  • Improved the custom field type icons in Settings (behind the membersCustomFields flag)

Notes

  • New SVG assets require a design-system rebuild to appear in dev (pnpm nx build @tryghost/admin-x-design-system); the icon glob is resolved at build time
  • Lands independently of the member-details value editing PR (Added custom field editing to member details #29405); both touch the catalog file in different hunks and merge cleanly in either order

Technical debt

  • None introduced

PR Scope (mark all that apply)

  • Improves the user experience
  • Enhances the readability of our code
  • Simplifies the maintenance of our software
  • Fixes a bug
  • Provide a core layer to allow one of the points above

Checklist before requesting a review (mark all that apply)

  • I have performed a self-review of my code
  • It's simple enough
  • The PR is not extensive
  • It includes documentation
  • I have added thorough tests.
  • Do we need to implement analytics?
  • Will this be part of a product update? If yes, please write one phrase about this update.

ref https://linear.app/ghost/issue/BER-3805/improve-the-custom-field-type-icons-and-picker-alignment

- the type catalog carried literal text glyphs (Aa, pilcrow, "St"), which
  read poorly for long text and address and, being variable-width text,
  made the labels drift out of alignment in the type dropdown
- the catalog now carries an icon name per type, rendered through the
  design system's icon set: aa (the familiar text glyph packaged as an
  SVG), long-text (two full lines and a short one), and map-pin (new
  asset, drawn to the set's stroke conventions)
- the dropdown's type tile is a fixed-width slot around a uniform-size
  icon, so option labels align in a column regardless of icon shape
@coderabbitai

coderabbitai Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a5372ac7-ee93-47af-9565-a8a339dcbfab

📥 Commits

Reviewing files that changed from the base of the PR and between 17397db and 180c555.

⛔ Files ignored due to path filters (3)
  • apps/admin-x-design-system/src/assets/icons/aa.svg is excluded by !**/*.svg
  • apps/admin-x-design-system/src/assets/icons/long-text.svg is excluded by !**/*.svg
  • apps/admin-x-design-system/src/assets/icons/map-pin.svg is excluded by !**/*.svg
📒 Files selected for processing (3)
  • apps/admin-x-framework/src/api/member-custom-fields.ts
  • apps/admin-x-settings/src/components/settings/membership/custom-fields.tsx
  • apps/admin-x-settings/src/components/settings/membership/custom-fields/custom-field-modal.tsx

Walkthrough

Custom field presentation metadata now uses named icon identifiers instead of iconText. The membership custom field list and type-selection modal render these identifiers with the design-system Icon component.

Suggested reviewers: rob-ghost

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: improved custom field icons and better picker alignment.
Description check ✅ Passed The description is directly related to the changeset and accurately explains the icon and alignment updates.
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 feat/custom-field-type-icons

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.

@nx-cloud

nx-cloud Bot commented Jul 16, 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 180c555

Command Status Duration Result
nx run @tryghost/admin:test:acceptance ✅ Succeeded 5m 25s View ↗
nx run-many -t test:unit -p @tryghost/admin-x-d... ✅ Succeeded 4m 38s View ↗
nx run ghost-admin:test ✅ Succeeded 2m 52s View ↗
nx run ghost-monorepo:lint:boundaries ✅ Succeeded 19s View ↗
nx run @tryghost/admin:build ✅ Succeeded 1m 58s View ↗
nx run-many -t lint -p @tryghost/admin-x-design... ✅ Succeeded 1m 36s View ↗
nx run @tryghost/activitypub:test:acceptance ✅ Succeeded 39s 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-16 19:31:11 UTC

@renatoworks
renatoworks enabled auto-merge (squash) July 16, 2026 19:28
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.17%. Comparing base (17397db) to head (180c555).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #29407   +/-   ##
=======================================
  Coverage   74.17%   74.17%           
=======================================
  Files        1592     1592           
  Lines      139000   139000           
  Branches    16863    16863           
=======================================
  Hits       103103   103103           
  Misses      34846    34846           
  Partials     1051     1051           
Flag Coverage Δ
admin-tests 55.43% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@renatoworks
renatoworks merged commit c98b499 into main Jul 16, 2026
45 checks passed
@renatoworks
renatoworks deleted the feat/custom-field-type-icons branch July 16, 2026 19:37
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