Skip to content

Add number formatting with thousands separators across apps#26306

Open
JohnONolan wants to merge 1 commit intomainfrom
claude/slack-fix-unformatted-numbers-qU672
Open

Add number formatting with thousands separators across apps#26306
JohnONolan wants to merge 1 commit intomainfrom
claude/slack-fix-unformatted-numbers-qU672

Conversation

@JohnONolan
Copy link
Copy Markdown
Member

Why are you making it?

Numbers throughout the Ghost admin and comment UI should be formatted with thousands separators (e.g., "1,234" instead of "1234") for improved readability, especially when displaying large counts like member imports, engagement metrics, and pagination totals.

What does it do?

This change adds consistent number formatting with thousands separators across multiple applications:

  • ActivityPub feed: Formats like and repost counts in animated number components
  • Show replies button: Formats reply count in button text
  • Admin pagination: Formats page indices and total counts
  • History modal: Formats action occurrence counts
  • Comments UI: Formats like counts using a shared helper
  • Admin members: Formats member count and import error counts in Handlebars templates

The implementation uses native toLocaleString() for JavaScript and a format-number helper for Handlebars templates, ensuring locale-appropriate formatting.

Why is this something Ghost users or developers need?

Large numbers are difficult to parse at a glance. Adding thousands separators significantly improves the user experience when viewing statistics, pagination controls, and import results. This is a common UX best practice that makes the interface more professional and easier to use.

Checklist

  • I've explained my change
  • Change follows existing code patterns and conventions

https://claude.ai/code/session_01V1QqK2JgvNe5oQHt8st99e

- Added locale-aware number formatting to ActivityPub feed stats (likes, reposts, replies)
- Added number formatting to comments UI like count
- Added number formatting to pagination component
- Added number formatting to history modal action counts
- Added format-number helper to members filter count and import error counts

https://claude.ai/code/session_01V1QqK2JgvNe5oQHt8st99e
@JohnONolan JohnONolan requested a review from peterzimon February 9, 2026 15:39
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 9, 2026

Walkthrough

This pull request implements number formatting enhancements across multiple applications. Changes include adding locale-aware formatting to numeric displays in the ActivityPub feed components, pagination component, settings history modal, comments UI, and Ghost admin components. The modifications introduce formatting helpers and apply them to counts, statistics, and pagination indicators. These changes affect only the display presentation of numbers while preserving underlying logic and component functionality. Approximately seven files are modified with minimal line changes each.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding number formatting with thousands separators across multiple Ghost applications.
Description check ✅ Passed The description provides clear context explaining the rationale, implementation details across multiple apps, and the UX benefits of the changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/slack-fix-unformatted-numbers-qU672

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
apps/admin-x-design-system/src/global/pagination.tsx (1)

7-7: Consider exporting this helper for reuse across admin-x packages.

A near-identical formatNumber helper is used in multiple places (comments-ui helpers, shade's formatNumber). Since admin-x-design-system is a shared package, exporting this could reduce duplication. Low priority given the trivial implementation.


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 and usage tips.

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.

2 participants