From 4c1c25027d89f934f0f01e90c1e283800417bae3 Mon Sep 17 00:00:00 2001 From: Osama Sayegh Date: Mon, 1 Jul 2024 05:40:37 +0300 Subject: [PATCH] DEV: Wiring for the admin about config page (#27492) This commit continues work laid out by https://github.com/discourse/discourse/commit/ffec8163b007ed5263f4f278809c870b99ef6d85 for the admin config page for the /about page. The last commit set up the user interface, and this one sets up all the wiring needed to make the input fields and save buttons actually work. Internal topic: t/128544. --- .../components/admin-config-area-card.gjs | 2 +- .../about/contact-information.gjs | 110 +++++++++++-- .../about/general-settings.gjs | 75 +++++++-- .../about/your-organization.gjs | 70 ++++++-- .../components/admin-config-areas/about.gjs | 58 ++++++- .../admin/addon/routes/admin-config-about.js | 25 +++ .../admin/addon/templates/config-about.hbs | 2 +- .../admin/config/about_controller.rb | 44 +++++ .../admin/site_settings_controller.rb | 8 + config/locales/client.en.yml | 5 + config/site_settings.yml | 16 ++ lib/site_setting_extension.rb | 13 +- spec/lib/site_setting_extension_spec.rb | 39 +++++ spec/system/admin_about_config_area_spec.rb | 150 ++++++++++++++++++ ...ut_config_area_contact_information_card.rb | 45 ++++++ ...about_config_area_general_settings_card.rb | 37 +++++ ...bout_config_area_your_organization_card.rb | 33 ++++ .../components/uppy_image_uploader.rb | 19 +++ .../pages/admin_about_config_area.rb | 23 +++ 19 files changed, 725 insertions(+), 49 deletions(-) create mode 100644 app/assets/javascripts/admin/addon/routes/admin-config-about.js create mode 100644 spec/system/admin_about_config_area_spec.rb create mode 100644 spec/system/page_objects/components/admin_about_config_area_contact_information_card.rb create mode 100644 spec/system/page_objects/components/admin_about_config_area_general_settings_card.rb create mode 100644 spec/system/page_objects/components/admin_about_config_area_your_organization_card.rb create mode 100644 spec/system/page_objects/components/uppy_image_uploader.rb create mode 100644 spec/system/page_objects/pages/admin_about_config_area.rb diff --git a/app/assets/javascripts/admin/addon/components/admin-config-area-card.gjs b/app/assets/javascripts/admin/addon/components/admin-config-area-card.gjs index 0157d579919..78ad09b7af8 100644 --- a/app/assets/javascripts/admin/addon/components/admin-config-area-card.gjs +++ b/app/assets/javascripts/admin/addon/components/admin-config-area-card.gjs @@ -6,7 +6,7 @@ export default class AdminConfigAreaCard extends Component { @tracked collapsed = false;