From e9de9d86d469c88deeb8866735726670b288f8e5 Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Mon, 8 Apr 2024 15:41:14 +0800 Subject: [PATCH] DEV: Migrate `link_sections` and `links` to new objects setting type This commit migrates the `link_sections` and `links` setting to a `sections` objects typed settting. Since https://github.com/discourse/discourse/commit/a440e15291e98a866f80a6566d5ec0597ab77e2e, we have started to support objects typed theme setting so we are switching this theme component to use it instead as it provides a much better UX for configuring the settings required for the theme component. --- .discourse-compatibility | 1 + .../discourse/components/custom-footer.hbs | 16 +- .../discourse/components/custom-footer.js | 45 --- locales/en.yml | 27 ++ migrations/settings/0002-migrate-settings.js | 84 ++++++ settings.yml | 164 ++++++++++- spec/system/footer_spec.rb | 52 +++- .../settings/0002-migrate-settings-test.js | 263 ++++++++++++++++++ 8 files changed, 582 insertions(+), 70 deletions(-) create mode 100644 migrations/settings/0002-migrate-settings.js create mode 100644 test/unit/migrations/settings/0002-migrate-settings-test.js diff --git a/.discourse-compatibility b/.discourse-compatibility index d2a4544..86a4bce 100644 --- a/.discourse-compatibility +++ b/.discourse-compatibility @@ -1,3 +1,4 @@ +< 3.3.0.beta2-dev: e8cc46d2a87ec5a3c7e4ba3cfae80263f040e5a4 < 3.3.0.beta1-dev: a7663469b5704f37c2a2e61d669c0f1362f2d9c0 3.1.999: f87d03d930e2bf6e24027a62e5228e3deee1e8de 2.9.0.beta3: 6e2eee67633c09b24dbc3292c2c39251dab31c55 diff --git a/javascripts/discourse/components/custom-footer.hbs b/javascripts/discourse/components/custom-footer.hbs index dfbe2bc..8451be8 100644 --- a/javascripts/discourse/components/custom-footer.hbs +++ b/javascripts/discourse/components/custom-footer.hbs @@ -12,24 +12,27 @@