From 3704a917a9fb63737d7394ae9516b6a7279c98e7 Mon Sep 17 00:00:00 2001 From: Osama Sayegh Date: Wed, 14 Aug 2024 10:34:34 +0300 Subject: [PATCH] FIX: Don't show blank space when there's no banner image (#28366) This commit fixes a bug in the redesigned about page where if there's no banner image configured for the page, the top of the page where the banner goes is occupied with large white space. Additionally, this commit also fixes a related bug in the admin config area for the /about page where it's not possible to remove the uploaded banner image. --- .../about/general-settings.gjs | 2 +- .../discourse/app/components/about-page.gjs | 4 +++- spec/system/about_page_spec.rb | 7 +++++++ spec/system/admin_about_config_area_spec.rb | 14 ++++++++++++++ .../page_objects/components/uppy_image_uploader.rb | 4 ++++ spec/system/page_objects/pages/about.rb | 4 ++++ 6 files changed, 33 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/admin/addon/components/admin-config-area-cards/about/general-settings.gjs b/app/assets/javascripts/admin/addon/components/admin-config-area-cards/about/general-settings.gjs index bb5f57d50c6..67f036a9bf6 100644 --- a/app/assets/javascripts/admin/addon/components/admin-config-area-cards/about/general-settings.gjs +++ b/app/assets/javascripts/admin/addon/components/admin-config-area-cards/about/general-settings.gjs @@ -59,7 +59,7 @@ export default class AdminConfigAreasAboutGeneralSettings extends Component { @action setImage(upload, { set }) { - set("aboutBannerImage", upload.url); + set("aboutBannerImage", upload?.url); }