Added hide comments checkbox to disable commenting dialog#25907
Added hide comments checkbox to disable commenting dialog#25907
Conversation
📝 WalkthroughWalkthroughThis pull request adds functionality to hide all previous comments when disabling a member's commenting ability. It introduces a new lab feature flag to gate the "Hide all previous comments" UI option, updates the member API with related mutations, and adds corresponding test coverage. Changes
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 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 |
React E2E Tests FailedTo view the Playwright test report locally, run: REPORT_DIR=$(mktemp -d) && gh run download 21171924876 -n playwright-report-react -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR" |
bb7993d to
5226956
Compare
6d7c27c to
21807f7
Compare
d0f2f02 to
3821507
Compare
E2E Tests FailedTo view the Playwright test report locally, run: REPORT_DIR=$(mktemp -d) && gh run download 21593990831 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR" |
1 similar comment
E2E Tests FailedTo view the Playwright test report locally, run: REPORT_DIR=$(mktemp -d) && gh run download 21593990831 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR" |
3821507 to
95683a5
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@e2e/tests/admin/comments/disable-commenting.test.ts`:
- Around line 98-165: Update the three test titles in disable-commenting.test.ts
to follow the required "what is tested - expected outcome" lowercase format with
a " - " separator by changing the first argument strings passed to test():
rename 'hide comments checkbox appears in modal' to e.g. 'disable commenting
modal - shows hide comments checkbox', 'disabling with hide comments checked
marks comments as hidden' to 'disable commenting action - marks comments hidden
when hide checked', and 'disabling without hide comments checked keeps comments
visible' to 'disable commenting action - keeps comments visible when hide
unchecked'; leave test bodies and references to CommentsPage methods
(getCommentRowByText, openMoreMenu, clickDisableCommenting,
confirmDisableCommenting, hideCommentsCheckbox, commentingDisabledIndicator)
unchanged.
weylandswart
left a comment
There was a problem hiding this comment.
Looks good to me and works.
I thought the checkbox should probably use the same checkbox styles we use elsewhere (I found an example under Portal settings) but it looks like that comes from the old Admin X design system. Shade doesn't seem to have a checkbox for now. I'll make a note for design to add it.
95683a5 to
a1df70a
Compare
a1df70a to
c7ddace
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
c7ddace to
9966028
Compare
ref https://linear.app/ghost/issue/BER-3184 Adds a checkbox to the disable commenting dialog that allows hiding all previous comments from a member when disabling their commenting.
9966028 to
b091c8b
Compare
Summary
When disabling a member from commenting, staff may also want to hide all the member's previous comments. This adds an optional "Hide all previous comments" checkbox to the disable commenting confirmation dialog.
The checkbox is gated behind a separate
disableMemberCommentingHideCommentslabs flag since the backend support for thehide_commentsAPI parameter will be deployed separately from the frontend.ref https://linear.app/ghost/issue/BER-3184
Requires #25906
Note
Medium Risk
Moderate risk because it changes comment-moderation behavior and request payloads (new
hide_commentsparameter) behind a feature flag; failures could incorrectly hide or not hide comments when disabling members.Overview
Adds a labs-gated “Hide all previous comments” checkbox to the disable-commenting confirmation dialog in Comments; when enabled it passes a new
hide_commentsparameter when callingPOST /members/:id/commenting/disable.Introduces the new
disableMemberCommentingHideCommentslabs flag (surfaced in Labs settings), threadshideCommentsEnabledthrough the comments UI, and extends the members API hook/types to support the optionalhideCommentsfield. Updates Playwright page objects and adds e2e coverage for checkbox visibility and hide-vs-keep behavior.Written by Cursor Bugbot for commit b091c8b. This will update automatically on new commits. Configure here.
Summary by CodeRabbit
Release Notes