Reworked comment moderation filters on the shared filter core#26829
Reworked comment moderation filters on the shared filter core#26829jonatansberg wants to merge 4 commits intomainfrom
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
E2E Tests FailedTo view the Playwright test report locally, run: REPORT_DIR=$(mktemp -d) && gh run download 23148752181 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR" |
02ae53b to
75a96b6
Compare
1c9e96e to
c0f30a5
Compare
e3e5e1f to
48ebfcf
Compare
5fd16e2 to
e40a95d
Compare
8017c07 to
929e525
Compare
e40a95d to
588e8f7
Compare
E2E Tests FailedTo view the Playwright test report locally, run: REPORT_DIR=$(mktemp -d) && gh run download 23249176988 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR" |
ref https://linear.app/ghost/issue/BER-3414 Reapplied the comments filter/query/hydration rewrite on top of the cleaned members-first base branch so the shared filter core can be reviewed once and the comments rollout can land separately.
ref https://linear.app/ghost/issue/BER-3414 Applied the CI-flagged class-order fixes for the newsletter analytics and comments moderation files on the stacked comments branch.
ref https://linear.app/ghost/issue/BER-3414 Backported the shared date and operator helpers needed by the restored comment filter UI and aligned the comment state hook with the router import pattern used elsewhere in Posts.
588e8f7 to
ace7495
Compare
E2E Tests FailedTo view the Playwright test report locally, run: REPORT_DIR=$(mktemp -d) && gh run download 23480774642 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR" |
ref https://linear.app/ghost/issue/BER-3414 The comments moderation rewrite now reads canonical filter params, but existing id=is: deep links still need to load the single-comment moderation view used by the E2E suite.
Summary
Why this change
The comments moderation screen was still carrying its own filter wiring after the members rewrite established the shared filter core. This follow-up adopts the same core for comments so both surfaces use the same abstractions for field resolution, codecs, and NQL compilation.
Dependency
What changed
Test plan
yarn --cwd apps/posts tsc --noEmityarn --cwd apps/posts lintyarn --cwd apps/posts vitest run src/views/filters/filter-query-core.test.ts src/views/filters/filter-ast.test.ts src/views/filters/filter-codecs.test.ts src/views/filters/filter-operator-options.test.ts src/views/filters/filter-normalization.test.ts src/views/filters/filter-types.test.ts src/views/filters/resolve-field.test.ts src/views/comments/comment-fields.test.ts src/views/comments/comment-filter-query.test.ts src/views/comments/use-comment-filter-fields.test.ts src/views/comments/hooks/use-filter-state.test.tsx