Skip to content

Improved newsletter messaging when access is set to nobody#27646

Merged
weylandswart merged 2 commits intomainfrom
weyland-des-1166-support-escalation-re-email-needs-verification
May 5, 2026
Merged

Improved newsletter messaging when access is set to nobody#27646
weylandswart merged 2 commits intomainfrom
weyland-des-1166-support-escalation-re-email-needs-verification

Conversation

@weylandswart
Copy link
Copy Markdown
Contributor

Closes https://linear.app/ghost/issue/DES-1166/support-escalation-re-email-needs-verification

Previously we would imply that newsletter sending was still possible when access was set to Nobody. Access = Nobody disables newsletter sending. The messaging has been updated to reflect that. The disabled state has also been improved.

Before After
Screenshot 2026-05-01 at 12 53 36 Screenshot 2026-05-01 at 12 53 09

Closes https://linear.app/ghost/issue/DES-1166/support-escalation-re-email-needs-verification

Previously we would imply that newsletter sending was still possible when access was set to Nobody. Access = Nobody disables newsletter sending. The messaging has been updated to reflect that. The disabled state has also been improved.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 1, 2026

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: d5dd7e10-1d91-4108-888a-e0ffd2e58c2f

📥 Commits

Reviewing files that changed from the base of the PR and between 8d827ab and c385867.

📒 Files selected for processing (1)
  • apps/admin-x-settings/test/acceptance/membership/access.test.ts
✅ Files skipped from review due to trivial changes (1)
  • apps/admin-x-settings/test/acceptance/membership/access.test.ts

Walkthrough

The enable-newsletters component was changed so the toggle becomes non-interactive when members_signup_access is set to none (disabled={isDisabled). The toggle's checked state now reflects newsletters being enabled only when newsletters are not disabled and isDisabled is false. Conditional rendering was updated: the "Enabled" view shows only when newslettersEnabled !== 'disabled' && !isDisabled and no longer includes the "Nobody" banner. The "Disabled" view always shows the disabled label and, when isDisabled is true, displays a banner instructing to change subscription access to "Invite-only".

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change—improved newsletter messaging when access is set to nobody—and directly aligns with the changeset modifications.
Description check ✅ Passed The description is related to the changeset and explains the context, rationale, and visual changes clearly with before/after screenshots.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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

✨ 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 weyland-des-1166-support-escalation-re-email-needs-verification

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
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
apps/admin-x-settings/src/components/settings/email/enable-newsletters.tsx (1)

38-40: ⚡ Quick win

Extract the effective enabled-state predicate into a single constant

Line 38 and Line 59 duplicate the same condition. Pull this into one const to keep toggle state and status rendering from drifting.

Proposed refactor
     const isDisabled = membersSignupAccess === 'none';
+    const isNewsletterSendingEnabled = newslettersEnabled !== 'disabled' && !isDisabled;
@@
             <Toggle
-                checked={newslettersEnabled !== 'disabled' && !isDisabled}
+                checked={isNewsletterSendingEnabled}
                 direction='rtl'
                 disabled={isDisabled}
                 onChange={handleToggleChange}
             />
@@
-                    value: (newslettersEnabled !== 'disabled' && !isDisabled) ? (<div className='w-full'>
+                    value: isNewsletterSendingEnabled ? (<div className='w-full'>

Also applies to: 59-59

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/admin-x-settings/src/components/settings/email/enable-newsletters.tsx`
around lines 38 - 40, Extract the duplicated predicate newslettersEnabled !==
'disabled' && !isDisabled into a single constant (e.g., const
isNewslettersEnabled = newslettersEnabled !== 'disabled' && !isDisabled) at the
top of the EnableNewsletters component or function so both the Checkbox checked
prop and the status rendering use this single symbol instead of repeating the
expression; update references where the condition is used (checked, any status
text/indicator rendering) to use isNewslettersEnabled.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@apps/admin-x-settings/src/components/settings/email/enable-newsletters.tsx`:
- Around line 38-40: Extract the duplicated predicate newslettersEnabled !==
'disabled' && !isDisabled into a single constant (e.g., const
isNewslettersEnabled = newslettersEnabled !== 'disabled' && !isDisabled) at the
top of the EnableNewsletters component or function so both the Checkbox checked
prop and the status rendering use this single symbol instead of repeating the
expression; update references where the condition is used (checked, any status
text/indicator rendering) to use isNewslettersEnabled.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f086aa8a-725c-4e8c-89d5-577923ce9b3c

📥 Commits

Reviewing files that changed from the base of the PR and between c63d340 and 8d827ab.

📒 Files selected for processing (1)
  • apps/admin-x-settings/src/components/settings/email/enable-newsletters.tsx

@weylandswart weylandswart merged commit f85002b into main May 5, 2026
41 checks passed
@weylandswart weylandswart deleted the weyland-des-1166-support-escalation-re-email-needs-verification branch May 5, 2026 11:57
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