Skip to content

✨ Changed comments to be enabled by default#27913

Merged
ErisDS merged 3 commits into
mainfrom
enable-comments-by-default
May 15, 2026
Merged

✨ Changed comments to be enabled by default#27913
ErisDS merged 3 commits into
mainfrom
enable-comments-by-default

Conversation

@ErisDS
Copy link
Copy Markdown
Member

@ErisDS ErisDS commented May 15, 2026

Summary

  • Flip comments_enabled default from off to all so new sites allow members to comment without staff having to find the setting first.
  • Hide the Admin sidebar Comments item when comments are explicitly disabled, so navigation reflects the disabled state.
  • Update fixture, integrity hash, and the snapshots that captured the old default (settings responses, pages/posts Content API, email previews, email card rendering, the two portal/stripe e2e tests that need to opt-out).

Carved out of #27653 to ship the default-flip independently of the pinning work.

Test plan

  • Backend unit + e2e suites green after snapshot regen (some byte-count drift expected from main moving since the original commit was authored — verify locally)
  • Fresh install: confirm new sites have comments_enabled = "all"
  • Existing install: confirm settings already persisted in DB are untouched
  • Admin: with comments off, Comments nav item is hidden; with comments on, visible

🤖 Generated with Claude Code

JohnONolan and others added 2 commits May 15, 2026 09:36
ref #27653

New sites should allow members to comment without requiring staff to find and enable the setting first. When comments are explicitly set to off, the Admin sidebar now hides the Comments section so the navigation reflects the disabled state.
Comments are now enabled by default for new sites, so default email
previews, email card rendering, settings responses, and Content API
responses changed. Updating these snapshots keeps CI aligned with the
new default.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ErisDS ErisDS requested a review from 9larsons as a code owner May 15, 2026 08:41
@github-actions github-actions Bot added the migration [pull request] Includes migration for review label May 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor

It looks like this PR contains a migration 👀
Here's the checklist for reviewing migrations:

General requirements

  • ⚠️ Tested performance on staging database servers, as performance on local machines is not comparable to a production environment
  • Satisfies idempotency requirement (both up() and down())
  • Does not reference models
  • Filename is in the correct format (and correctly ordered)
  • Targets the next minor version
  • All code paths have appropriate log messages
  • Uses the correct utils
  • Contains a minimal changeset
  • Does not mix DDL/DML operations
  • Tested in MySQL and SQLite

Schema changes

  • Both schema change and related migration have been implemented
  • For index changes: has been performance tested for large tables
  • For new tables/columns: fields use the appropriate predefined field lengths
  • For new tables/columns: field names follow the appropriate conventions
  • Does not drop a non-alpha table outside of a major version

Data changes

  • Mass updates/inserts are batched appropriately
  • Does not loop over large tables/datasets
  • Defends against missing or invalid data
  • For settings updates: follows the appropriate guidelines

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

Review Change Stack

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • ghost/core/test/e2e-api/admin/__snapshots__/email-previews.test.js.snap is excluded by !**/*.snap

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: aaddba85-b546-4f92-b6ee-878d4de46956

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

This PR changes the default value of the comments_enabled setting from "off" to "all", updates the admin sidebar navigation to fetch and conditionally display the Comments menu item based on this setting, and adjusts e2e tests to explicitly control comment settings during test execution. The admin UI now computes visibility by combining membership access, the commentModeration feature flag, and the comments_enabled setting value, replacing a simpler direct membership check.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: enabling comments by default, which is the primary objective of the PR.
Description check ✅ Passed The description is directly related to the changeset, providing clear details about the default change, UI updates, and test plan for the implementation.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch enable-comments-by-default

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

The snapshot was carried over from the original commit and drifted from
the live renderer (preheader-spacing class restored on main; some
filler whitespace removed). Regenerated against the current renderer.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ErisDS ErisDS merged commit 2160905 into main May 15, 2026
43 checks passed
@ErisDS ErisDS deleted the enable-comments-by-default branch May 15, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

migration [pull request] Includes migration for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants