Comments CTA has no gap between "Already a member?" and "Sign in" in right-to-left locales

Open Beginner friendly
#32,931 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
92/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
react, tailwindcss, typescript
Domain
frontend

Research direction

Open apps/comments-ui/src/components/content/cta-box.tsx and look at line 71, where the "Already a member?" span uses the physical mr-1 class. Replace it with the logical inline-end margin me-1, which Tailwind 3.4 supports, so the gap follows the writing direction. To verify, run comments-ui with an RTL locale such as ar and confirm a gap appears in the rendered comments frame; check an LTR locale still looks unchanged.

Written by the indexing model from the issue text.

Description

needs:triage
Issue Summary

In a right-to-left locale (seen with ar), the comments call-to-action box renders "Already a member?" and the "Sign in" button with no space between them. The text runs together, e.g. «هل انت مسجل بالفعل؟تسجيل الدخول».

The cause is in apps/comments-ui/src/components/content/cta-box.tsx, line 71:

<span className="mr-1 inline-block text-[15px]">{t('Already a member?')}</span>

mr-1 is a physical right margin. In left-to-right layout it sits between the span and the button. In right-to-left layout the button is on the span's left, so the 4px margin lands on the outer side and the gap is 0.

Measured in the rendered comments frame (dir="rtl"): the span has margin-right 4px and margin-left 0px, and its left edge touches the button's right edge (gap 0px).

A likely fix is the logical margin me-1 (margin-inline-end), which Tailwind 3.3+ supports. comments-ui uses Tailwind 3.4. I have not built or tested that change.

Steps to Reproduce
  1. Set the site's publication language to ar (or any right-to-left locale) and enable comments for all members.
  2. Open any post while signed out.
  3. Look at the line under the "Sign up now" button in the comments box.
  4. Expected: a space between «هل أنت مسجل بالفعل؟» and «تسجيل الدخول», as in left-to-right locales. Actual: no space; the two run together.
rtl-signin-gap
Ghost Version

Current main (cta-box.tsx unchanged at e98ceb9); seen live with comments-ui 1.6 from the CDN.

Node.js Version

Not relevant (frontend; comments-ui is loaded from the CDN)

How did you install Ghost?

Self-hosted, Docker

Database type

MySQL 8

Browser & OS version

Chromium-based browser on Linux.

Relevant log / error output

Code of Conduct
  • I agree to be friendly and polite to people in this repository
Dominant language
TypeScript
Stars
55.8k
Forks
12.1k
Avg merge
1d 5h
Merged PRs (30d)
617

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TryGhost/Ghost

All issues in TryGhost/Ghost

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.