mirror of
https://github.com/discourse/discourse.git
synced 2026-03-03 23:54:20 +08:00
Following PR #36711 which enabled the refreshed review UI for all users, this commit removes the old feature flag infrastructure and cleans up legacy code that is no longer needed. Backend Changes: - Removed ReviewableActionLog model and its spec entirely - Removed CalculateFinalStatusFromLogs service and spec - Removed site settings: force_old_reviewable_ui, reviewable_old_moderator_actions - Simplified ReviewableActionBuilder — stripped out legacy action-building methods (build_user_actions_bundle, build_post_actions_bundle, build_new_separated_actions) - Cleaned up reviewable models (ReviewableFlaggedPost, ReviewablePost, ReviewableQueuedPost, ReviewableUser, Chat::ReviewableMessage, ReviewablePostVotingComment) — removed unused/legacy action definitions - Removed legacy specs for action builder, action logs, flagged post actions, post actions, user actions, and status-from-logs - Updated system tests and page objects to reflect the new UI structure Frontend Changes: - Deleted legacy components: reviewable-item.gjs, reviewable-user.gjs, review-index-legacy.gjs - Renamed reviewable-refresh/ → reviewable/ — moved all sub-components (created-by, flagged-post, item, post, queued-post, topic-link, user, etc.) out of the refresh directory into the canonical reviewable/ namespace - Simplified reviewable/item.gjs — removed feature flag conditionals and legacy code paths - Cleaned up review/index.gjs and review/show.gjs templates — removed branching between old/new UI - Updated plugin components (chat, AI, post-voting) to import from reviewable/ instead of reviewable-refresh/ - Removed acceptance tests (review-test.js) replaced by system tests - Renamed and updated integration tests from reviewable-refresh/* to reviewable/* Plan for next PRs: - Move plugins from Pages::RefreshedReview to Pages::Review - Move plugins to import from `reviewable/` and not `refreshed-reviewable/` - Move reviewable-user.js import in plugin to use `reviewable/user.js` - Remove unused settings like `reviewable_old_moderator_actions` from plugins - Delete `Pages::RefreshedReview` - Delete `reviewable-refresh/` directory - Delete `reviewable-user.js` component - Delete `reviewable_old_moderator_actions` site setting Plugins PRs: - https://github.com/discourse/discourse-akismet/pull/203 - https://github.com/discourse/discourse-antivirus/pull/98 - https://github.com/discourse/discourse-category-experts/pull/223
22 lines
631 B
Ruby
22 lines
631 B
Ruby
# frozen_string_literal: true
|
|
class DropReviewableActionLogs < ActiveRecord::Migration[8.0]
|
|
def up
|
|
drop_table :reviewable_action_logs
|
|
end
|
|
|
|
def down
|
|
create_table :reviewable_action_logs do |t|
|
|
t.bigint :reviewable_id, null: false
|
|
t.string :action_key, null: false
|
|
t.integer :status, null: false
|
|
t.integer :performed_by_id, null: false
|
|
t.string :bundle, default: "legacy-actions", null: false
|
|
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :reviewable_action_logs, :reviewable_id
|
|
add_index :reviewable_action_logs, :performed_by_id
|
|
add_index :reviewable_action_logs, :bundle
|
|
end
|
|
end
|