From 81dd656f30a42d7400f421ab35bd6b9e904daf80 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/components/custom-footer.hbs | 16 +- .../discourse/components/custom-footer.js | 45 ---- locales/en.yml | 27 ++ migrations/settings/0002-migrate-settings.js | 82 +++++++ settings.yml | 164 ++++++++++++- spec/system/footer_spec.rb | 52 +++- .../settings/0002-migrate-settings-test.js | 230 ++++++++++++++++++ 7 files changed, 546 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/javascripts/discourse/components/custom-footer.hbs b/javascripts/discourse/components/custom-footer.hbs index fc26a0b..922facf 100644 --- a/javascripts/discourse/components/custom-footer.hbs +++ b/javascripts/discourse/components/custom-footer.hbs @@ -11,24 +11,27 @@