🎨 Improved share modal to clamp long post previews#28966
Conversation
closes https://linear.app/ghost/issue/DES-1418/clamp-post-preview-from-share-modal - the share modal rendered the full post excerpt, which could run ~500 chars and overflowed the modal with a scrollbar on shorter viewports - only the auto post-publish path capped it (truncated text to 100 chars in usePostSuccessModal); the analytics-header Share button and Stats latest-post passed the raw excerpt uncapped, so behaviour was inconsistent - moved the bound into the shared PostShareModal component as a 2-line CSS clamp so every consumer behaves the same, and removed the now-redundant char truncation from the hook
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
WalkthroughThe local 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run @tryghost/admin-x-settings:test:acceptance |
✅ Succeeded | 10m 7s | View ↗ |
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | <1s | View ↗ |
nx run-many -t test:unit -p @tryghost/posts,@tr... |
✅ Succeeded | 7m 13s | View ↗ |
nx run @tryghost/admin:build |
✅ Succeeded | 4m 40s | View ↗ |
nx run ghost-admin:test |
✅ Succeeded | 3m 9s | View ↗ |
nx run-many -t lint -p @tryghost/posts,@tryghos... |
✅ Succeeded | 1m 7s | View ↗ |
nx run @tryghost/activitypub:test:acceptance |
✅ Succeeded | 58s | View ↗ |
nx run ghost:build:assets |
✅ Succeeded | 2s | View ↗ |
nx run ghost:build:tsc |
✅ Succeeded | 6s | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-07-01 08:58:27 UTC

Closes https://linear.app/ghost/issue/DES-1418/clamp-post-preview-from-share-modal
The share modal rendered the full post excerpt, which could run ~500 chars and overflow the modal with a scrollbar on shorter viewports. This PR fixes that at the source instead of patching it at each implementation.