From 80a1709965fa59da824b2e3392976fc6fc898f80 Mon Sep 17 00:00:00 2001
From: Isaac Janzen <50783505+janzenisaac@users.noreply.github.com>
Date: Mon, 17 Jul 2023 13:16:40 -0500
Subject: [PATCH] DEV: Convert history modal to component-based API (#22522)
This PR converts the `history` modal to make use of the new component-based API
---
.../app/components/modal/history.hbs | 63 +++
.../discourse/app/components/modal/history.js | 339 +++++++++++++++
.../app/components/modal/history/revision.hbs | 101 +++++
.../components/modal/history/revisions.hbs | 75 ++++
.../components/modal/history/topic-footer.hbs | 84 ++++
.../app/components/reviewable-post-edits.js | 18 +-
.../discourse/app/controllers/history.js | 392 ------------------
.../javascripts/discourse/app/routes/topic.js | 15 +-
.../discourse/app/templates/modal/history.hbs | 271 ------------
.../tests/acceptance/history-test.js | 90 ++++
.../tests/unit/controllers/history-test.js | 120 ------
11 files changed, 772 insertions(+), 796 deletions(-)
create mode 100644 app/assets/javascripts/discourse/app/components/modal/history.hbs
create mode 100644 app/assets/javascripts/discourse/app/components/modal/history.js
create mode 100644 app/assets/javascripts/discourse/app/components/modal/history/revision.hbs
create mode 100644 app/assets/javascripts/discourse/app/components/modal/history/revisions.hbs
create mode 100644 app/assets/javascripts/discourse/app/components/modal/history/topic-footer.hbs
delete mode 100644 app/assets/javascripts/discourse/app/controllers/history.js
delete mode 100644 app/assets/javascripts/discourse/app/templates/modal/history.hbs
create mode 100644 app/assets/javascripts/discourse/tests/acceptance/history-test.js
delete mode 100644 app/assets/javascripts/discourse/tests/unit/controllers/history-test.js
diff --git a/app/assets/javascripts/discourse/app/components/modal/history.hbs b/app/assets/javascripts/discourse/app/components/modal/history.hbs
new file mode 100644
index 00000000000..30ffa5425fa
--- /dev/null
+++ b/app/assets/javascripts/discourse/app/components/modal/history.hbs
@@ -0,0 +1,63 @@
+
Welcome to Discourse!
', + side_by_side: + 'Welcome to Discourse!
Welcome to Discourse!
', + side_by_side_markdown: + 'Welcome to Discourse! | Welcome to Discourse! |
" width="276" height="183">
Column | -Test | -
---|---|
Osama | -Testing | -
" width="276" height="183">
Column | -Test | -
---|---|
Osama | -Testing | -