The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Apply responsive spacing and typography to dashboard chart cards (#81906)
Anderson13e00d55b9aa
diff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Dark_Theme_Default.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Dark_Theme_Default.pngindex 1d98c175df8..487c166ac1b 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Dark_Theme_Default.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Dark_Theme_Default.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Dark_Theme_No_Background_Default.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Dark_Theme_No_Background_Default.pngindex 2e8d273d263..0ddfb9cbae7 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Dark_Theme_No_Background_Default.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Dark_Theme_No_Background_Default.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Dark_Theme_No_Background_Scroll.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Dark_Theme_No_Background_Scroll.pngindex 83138fd78d3..21b5ac8d142 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Dark_Theme_No_Background_Scroll.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Dark_Theme_No_Background_Scroll.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Dark_Theme_Scroll.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Dark_Theme_Scroll.pngindex 2c129ae88c8..e411cf942be 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Dark_Theme_Scroll.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Dark_Theme_Scroll.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_Default.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_Default.pngindex af135d0ed1b..85ea8469a60 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_Default.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_Default.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_No_Background_Default.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_No_Background_Default.pngindex a4fa85937be..e1a9aad95e6 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_No_Background_Default.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_No_Background_Default.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_No_Background_Scroll.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_No_Background_Scroll.pngindex fc283dfd478..0ca5175f583 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_No_Background_Scroll.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_No_Background_Scroll.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_Scroll.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_Scroll.pngindex 6e522c0b4f9..e89d6ec6834 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_Scroll.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_Scroll.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_Default.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_Default.pngindex 7c1e7b5f06f..eca4ad7fdb4 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_Default.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_Default.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_No_Background_Default.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_No_Background_Default.pngindex ccf2d951af8..1b0252700a3 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_No_Background_Default.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_No_Background_Default.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_No_Background_Scroll.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_No_Background_Scroll.pngindex dbfbaed96ea..fa3bbaabf09 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_No_Background_Scroll.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_No_Background_Scroll.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_Scroll.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_Scroll.pngindex b01ecf218b8..b1ed65abe0f 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_Scroll.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_Scroll.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Full_Width_Chart_Many_Filters.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Full_Width_Chart_Many_Filters.pngindex d31943d7e66..09794f9bb64 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Full_Width_Chart_Many_Filters.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Full_Width_Chart_Many_Filters.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Full_Width_Chart_One_Filter.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Full_Width_Chart_One_Filter.pngindex c5c6a28b63a..ffe80999b4a 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Full_Width_Chart_One_Filter.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Full_Width_Chart_One_Filter.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Full_Width_Heading_Many_Filters.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Full_Width_Heading_Many_Filters.pngindex ff3f97bf853..387dae7cfef 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Full_Width_Heading_Many_Filters.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Full_Width_Heading_Many_Filters.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Full_Width_Heading_One_Filter.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Full_Width_Heading_One_Filter.pngindex b11bba55faf..687a8287ab0 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Full_Width_Heading_One_Filter.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Full_Width_Heading_One_Filter.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Medium_Chart_Many_Filters.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Medium_Chart_Many_Filters.pngindex 93e93539f12..8fb1a8a9825 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Medium_Chart_Many_Filters.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Medium_Chart_Many_Filters.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Medium_Chart_One_Filter.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Medium_Chart_One_Filter.pngindex 1e4a590ca10..981b0eab543 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Medium_Chart_One_Filter.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Medium_Chart_One_Filter.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Chart_Many_Filters.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Chart_Many_Filters.pngindex 98e858ea420..c5096d983af 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Chart_Many_Filters.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Chart_Many_Filters.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Chart_Many_Filters_Expanded.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Chart_Many_Filters_Expanded.pngindex 56fbdd6dda4..57053d861c5 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Chart_Many_Filters_Expanded.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Chart_Many_Filters_Expanded.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Chart_One_Filter.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Chart_One_Filter.pngindex e1d5626ad16..d47c0b8bcd0 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Chart_One_Filter.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Chart_One_Filter.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Chart_One_Filter_Long_Card_Name.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Chart_One_Filter_Long_Card_Name.pngindex 1f2aedfcb10..285666ebb8a 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Chart_One_Filter_Long_Card_Name.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Chart_One_Filter_Long_Card_Name.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Heading_Many_Filters.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Heading_Many_Filters.pngindex 2c157313c0b..24dae86acb1 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Heading_Many_Filters.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Heading_Many_Filters.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Heading_Many_Filters_Expanded.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Heading_Many_Filters_Expanded.pngindex 931d6d2ea2c..a83bdb8c16c 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Heading_Many_Filters_Expanded.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Heading_Many_Filters_Expanded.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Heading_One_Filter.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Heading_One_Filter.pngindex 079338bf586..520b05e9698 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Heading_One_Filter.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Heading_One_Filter.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Heading_One_Filter_Long_Text.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Heading_One_Filter_Long_Text.pngindex 07bfc028473..86fdbab2ab8 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Heading_One_Filter_Long_Text.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_card_filters_Narrow_Heading_One_Filter_Long_Text.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_All_Options.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_All_Options.pngindex 54723172a35..0f5a4aca4b3 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_All_Options.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_All_Options.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Month_Year.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Month_Year.pngindex e5c74733439..4199b1de06e 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Month_Year.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Month_Year.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Quarter_Year.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Quarter_Year.pngindex 30c4627a666..ba0de3822ea 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Quarter_Year.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Quarter_Year.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Quarter_Year_Dropdown.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Quarter_Year_Dropdown.pngindex 9f5d1c2bc14..802a2637a9d 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Quarter_Year_Dropdown.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Quarter_Year_Dropdown.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Relative.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Relative.pngindex f8137a3d9cd..1bd3e3b1817 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Relative.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Relative.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Single.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Single.pngindex f0171440157..ba013baa08d 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Single.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Single.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Number.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Number.pngindex bebe8f86f61..d1696eb8cd2 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Number.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Number.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List.pngindex 71aac94d09a..e45e012181c 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List_Single_With_Value.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List_Single_With_Value.pngindex af5374101c6..9e7f816615c 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List_Single_With_Value.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List_Single_With_Value.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List_With_Value.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List_With_Value.pngindex 0bd03a11625..20d3dbe1238 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List_With_Value.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List_With_Value.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_Search.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_Search.pngindex 71aac94d09a..e45e012181c 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_Search.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_Search.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_Search_With_Value.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_Search_With_Value.pngindex 70455cff16b..0e82403db04 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_Search_With_Value.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_Search_With_Value.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Text.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Text.pngindex 13b2d84764f..21c7ec10022 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Text.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Text.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Text_With_Value.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Text_With_Value.pngindex 13b2d84764f..21c7ec10022 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Text_With_Value.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Text_With_Value.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Unit_Of_Time.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Unit_Of_Time.pngindex aae2928cf7e..b20e6dc61ec 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Unit_Of_Time.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Unit_Of_Time.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_All_Options.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_All_Options.pngindex 05512e4900b..00614e3ed94 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_All_Options.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_All_Options.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Month_Year.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Month_Year.pngindex 3334c23ceff..6e4e28230b5 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Month_Year.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Month_Year.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Quarter_Year.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Quarter_Year.pngindex d71d957bca2..d9fe62695d3 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Quarter_Year.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Quarter_Year.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Quarter_Year_Dropdown.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Quarter_Year_Dropdown.pngindex 8272feaf628..0be47e9cbce 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Quarter_Year_Dropdown.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Quarter_Year_Dropdown.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Relative.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Relative.pngindex e77a4275fdd..904b12bab1a 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Relative.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Relative.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Single.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Single.pngindex f0890c09666..e6633b42d7a 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Single.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Single.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Number.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Number.pngindex 91248ca3030..f63d767c44b 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Number.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Number.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_List.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_List.pngindex 5e0d8704052..8d5fe022093 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_List.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_List.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_List_Single_With_Value.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_List_Single_With_Value.pngindex d2fd2cff7a6..ac3c4f260f5 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_List_Single_With_Value.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_List_Single_With_Value.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_List_With_Value.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_List_With_Value.pngindex 6515f6aa391..7c34674d242 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_List_With_Value.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_List_With_Value.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_Search.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_Search.pngindex 40668d8af26..8d5fe022093 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_Search.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_Search.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_Search_With_Value.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_Search_With_Value.pngindex 84a70b774c3..8b0e7a7b9d4 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_Search_With_Value.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Parameter_Search_With_Value.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Text.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Text.pngindex fa7785490df..ed235a18b9d 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Text.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Text.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Text_With_Value.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Text_With_Value.pngindex fa7785490df..ed235a18b9d 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Text_With_Value.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Text_With_Value.png differdiff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Unit_Of_Time.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Unit_Of_Time.pngindex 954dfc13fa8..ac3c393959c 100644Binary files a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Unit_Of_Time.png and b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Unit_Of_Time.png differdiff --git a/.loki/reference/chrome_laptop_Components_Overlays_Popover_Default.png b/.loki/reference/chrome_laptop_Components_Overlays_Popover_Default.pngdeleted file mode 100644index 618125824a6..00000000000Binary files a/.loki/reference/chrome_laptop_Components_Overlays_Popover_Default.png and /dev/null differdiff --git a/.loki/reference/chrome_laptop_Components_Overlays_Popover_Interactive_content.png b/.loki/reference/chrome_laptop_Components_Overlays_Popover_Interactive_content.pngdeleted file mode 100644index 618125824a6..00000000000Binary files a/.loki/reference/chrome_laptop_Components_Overlays_Popover_Interactive_content.png and /dev/null differdiff --git a/e2e/test/scenarios/dashboard/visualizer/drillthrough.cy.spec.ts b/e2e/test/scenarios/dashboard/visualizer/drillthrough.cy.spec.tsindex d3537e7c10c..2889e7f6840 100644--- a/e2e/test/scenarios/dashboard/visualizer/drillthrough.cy.spec.ts+++ b/e2e/test/scenarios/dashboard/visualizer/drillthrough.cy.spec.ts@@ -230,7 +230,7 @@ describe("scenarios > dashboard > visualizer > drillthrough", () => {H.queryBuilderFiltersPanel().findByText(/Created At: Month is May 1/).should("exist");- H.assertQueryBuilderRowCount(10);+ H.assertQueryBuilderRowCount(11);H.queryBuilderMain().within(() => {cy.findByText("Count").should("exist"); // y-axiscy.findByText("Created At: Month").should("exist"); // x-axisdiff --git a/e2e/test/scenarios/visualizations-charts/legend.cy.spec.js b/e2e/test/scenarios/visualizations-charts/legend.cy.spec.jsindex 3da36d637cf..eeff0bc9c8d 100644--- a/e2e/test/scenarios/visualizations-charts/legend.cy.spec.js+++ b/e2e/test/scenarios/visualizations-charts/legend.cy.spec.js@@ -264,9 +264,12 @@ describe("scenarios > visualizations > legend", () => {H.getDashboardCard(1).within(() => {H.echartsContainer().findByText("500").should("exist"); // max y-axis value- cy.findByText("And 39 more").click();+ cy.findByText(/And \d+ more/).click();});- H.popover().within(() => hideSeries(29)); // TX (Texas);+ H.popover()+ .contains('[data-testid="legend-item"]', "TX")+ .findByLabelText("Hide series")+ .click();H.getDashboardCard(1).click(); // click outside of popover to close itH.getDashboardCard(1).within(() =>H.echartsContainer().findByText("500").should("not.exist"),diff --git a/frontend/src/metabase/visualizations/components/Visualization/Visualization.module.css b/frontend/src/metabase/visualizations/components/Visualization/Visualization.module.cssnew file mode 100644index 00000000000..9928a4ef552--- /dev/null+++ b/frontend/src/metabase/visualizations/components/Visualization/Visualization.module.css@@ -0,0 +1,9 @@+.root {+ display: flex;+ flex-direction: column;+ height: 100%;+}++.header {+ padding: 0.625rem 0.5rem 0.375rem 0.5rem;+}diff --git a/frontend/src/metabase/visualizations/components/Visualization/Visualization.styled.tsx b/frontend/src/metabase/visualizations/components/Visualization/Visualization.styled.tsxdeleted file mode 100644index 0ae4b6a527b..00000000000--- a/frontend/src/metabase/visualizations/components/Visualization/Visualization.styled.tsx+++ /dev/null@@ -1,18 +0,0 @@-// eslint-disable-next-line no-restricted-imports-import styled from "@emotion/styled";--export const VisualizationRoot = styled.div`- display: flex;- flex-direction: column;- height: 100%;-`;--export const VisualizationHeader = styled.div`- padding: 0.625rem 0.5rem 0.375rem 0.5rem;- flex-shrink: 0;-`;--export const VisualizationActionButtonsContainer = styled.span`- display: flex;- align-items: center;-`;diff --git a/frontend/src/metabase/visualizations/components/Visualization/Visualization.tsx b/frontend/src/metabase/visualizations/components/Visualization/Visualization.tsxindex 27bbccbd60e..621145cdb4b 100644--- a/frontend/src/metabase/visualizations/components/Visualization/Visualization.tsx+++ b/frontend/src/metabase/visualizations/components/Visualization/Visualization.tsx@@ -26,7 +26,7 @@ import type { Dispatch, State } from "metabase/redux/store";import type { Path } from "metabase/router";import { getTokenFeature } from "metabase/settings";import { getFont } from "metabase/styled-components/selectors";-import type { IconProps } from "metabase/ui";+import { Box, Flex, type IconProps } from "metabase/ui";import { isQuestionCard } from "metabase/utils/dashboard";import { formatNumber } from "metabase/utils/formatting";import { memoize } from "metabase/utils/memoize";@@ -82,11 +82,7 @@ import { ErrorView } from "./ErrorView";import LoadingView, { type LoadingViewProps } from "./LoadingView";import { DashCardLoadingView } from "./LoadingView/DashCardLoadingView";import NoResultsView from "./NoResultsView";-import {- VisualizationActionButtonsContainer,- VisualizationHeader,- VisualizationRoot,-} from "./Visualization.styled";+import S from "./Visualization.module.css";import { VisualizationRenderedWrapper } from "./VisualizationRenderedWrapper";import { VisualizationRunningState } from "./VisualizationRunningState";import { Watermark } from "./Watermark";@@ -795,9 +791,9 @@ class Visualization extends PureComponent<}const extra = (- <VisualizationActionButtonsContainer>+ <Flex component="span" align="center">{actionButtons}- </VisualizationActionButtonsContainer>+ </Flex>);let { gridSize, gridUnit } = this.props;@@ -845,8 +841,8 @@ class Visualization extends PureComponent<onError={this.onErrorBoundaryError}ref={this.props.forwardedRef}>- <VisualizationRoot- className={className}+ <Box+ className={cx(S.root, className)}style={style}data-testid="visualization-root"// `getUiName` should be defined (and is a required field on the TS type), but because we have javascript@@ -855,7 +851,7 @@ class Visualization extends PureComponent<ref={this.props.forwardedRef}>{!!hasHeader && (- <VisualizationHeader>+ <Box className={S.header} flex="0 0 auto"><ChartCaptionseries={series}visualizerRawSeries={visualizerRawSeries}@@ -870,7 +866,7 @@ class Visualization extends PureComponent<canSelectTitle ? this.handleOnChangeCardAndRun : null}/>- </VisualizationHeader>+ </Box>)}{replacementContent ? (replacementContent@@ -1030,7 +1026,7 @@ class Visualization extends PureComponent<onUpdateVisualizationSettings={onUpdateVisualizationSettings}/>)}- </VisualizationRoot>+ </Box></ErrorBoundary>);}diff --git a/frontend/src/metabase/visualizations/components/legend/LegendCaption/LegendCaption.module.css b/frontend/src/metabase/visualizations/components/legend/LegendCaption/LegendCaption.module.cssnew file mode 100644index 00000000000..f2ee808cecd--- /dev/null+++ b/frontend/src/metabase/visualizations/components/legend/LegendCaption/LegendCaption.module.css@@ -0,0 +1,54 @@+/* With an explicit title size the row is capped at the title line-height, so+ icons and action buttons overflow-center instead of stretching the caption. */+.rootSm {+ height: 0.875rem;+}++.rootMd {+ height: 1.0625rem;+}++.label {+ overflow: hidden;+ display: flex;+ flex-direction: row;+ align-items: center;+ font-size: 0.875rem;+}++/* Doubled selectors outrank the shared LegendLabel link line-height. */+.labelSm {+ && {+ font-size: 0.75rem;+ line-height: 0.875rem;+ }+}++.labelMd {+ && {+ line-height: 1.0625rem;+ }+}++.labelIcon {+ flex-shrink: 0;+ margin-right: 0.25rem;+}++.descriptionIcon {+ color: var(--mb-color-text-disabled);+ margin: 0 0.25rem;++ &:hover {+ color: var(--mb-color-text-secondary);+ }+}++/* In a capped row a zero-height box keeps the icon from stretching the+ caption past the title line-height; the icon still renders, centered on+ the row middle. */+.descriptionIconCapped {+ display: flex;+ align-items: center;+ height: 0;+}diff --git a/frontend/src/metabase/visualizations/components/legend/LegendCaption/LegendCaption.styled.tsx b/frontend/src/metabase/visualizations/components/legend/LegendCaption/LegendCaption.styled.tsxdeleted file mode 100644index 1b8d550fae6..00000000000--- a/frontend/src/metabase/visualizations/components/legend/LegendCaption/LegendCaption.styled.tsx+++ /dev/null@@ -1,59 +0,0 @@-// eslint-disable-next-line no-restricted-imports-import styled from "@emotion/styled";-import { forwardRef } from "react";--import { Box, type BoxProps, Icon, type IconProps } from "metabase/ui";--import { LegendLabel as BaseLegendLabel } from "../LegendLabel";--export const LegendCaptionRoot = styled.div`- display: flex;- align-items: center;- min-width: 0;-`;--export const LEGEND_LABEL_FONT_SIZE = "0.875rem";-export const LEGEND_LABEL_FONT_WEIGHT = 700;--export const LegendLabel = styled(BaseLegendLabel)`- overflow: hidden;- margin-top: 2px;- padding: 0.25rem 0 0;- display: flex;- flex-direction: row;- align-items: center;- font-size: ${LEGEND_LABEL_FONT_SIZE};- font-weight: ${LEGEND_LABEL_FONT_WEIGHT};-`;--export const LegendLabelIcon = styled(Icon)`- flex-shrink: 0;- margin-right: 0.25rem;-`;--export const LegendDescriptionIcon = styled(- forwardRef<- HTMLDivElement,- BoxProps & { name: IconProps["name"]; "data-testid"?: string }- >(function LegendDescriptionIcon({ name = "info", ...props }, ref) {- return (- <Box component="span" ref={ref} {...props}>- <Icon name={name} />- </Box>- );- }),-)`- color: var(--mb-color-text-disabled);- margin: 0 0.25rem;-- &:hover {- color: var(--mb-color-text-secondary);- }-`;--export const LegendRightContent = styled.div`- display: flex;- justify-content: flex-end;- margin-left: auto;- align-items: center;-`;diff --git a/frontend/src/metabase/visualizations/components/legend/LegendCaption/LegendCaption.tsx b/frontend/src/metabase/visualizations/components/legend/LegendCaption/LegendCaption.tsxindex 9639e3e8f9e..f0959df2819 100644--- a/frontend/src/metabase/visualizations/components/legend/LegendCaption/LegendCaption.tsx+++ b/frontend/src/metabase/visualizations/components/legend/LegendCaption/LegendCaption.tsx@@ -1,24 +1,75 @@import cx from "classnames";-import React, { useCallback, useState } from "react";+import React, {+ type ReactNode,+ forwardRef,+ useCallback,+ useState,+} from "react";import { t } from "ttag";import { Markdown } from "metabase/common/components/Markdown";import { useTranslateContent } from "metabase/content-translation/hooks";import CS from "metabase/css/core/index.css";import DashboardS from "metabase/css/dashboard.module.css";-import type { IconProps } from "metabase/ui";-import { Ellipsified, Icon, Menu, Tooltip } from "metabase/ui";+import {+ Box,+ type BoxProps,+ Ellipsified,+ Flex,+ Icon,+ type IconProps,+ Menu,+ Tooltip,+} from "metabase/ui";import { SAVING_DOM_IMAGE_OVERFLOW_VISIBLE_CLASS } from "metabase/viz-core";import { LegendActions } from "../LegendActions";+import { LegendLabel } from "../LegendLabel";-import {- LegendCaptionRoot,- LegendDescriptionIcon,- LegendLabel,- LegendLabelIcon,- LegendRightContent,-} from "./LegendCaption.styled";+import S from "./LegendCaption.module.css";++export const LEGEND_LABEL_FONT_SIZE = "0.875rem";+export const LEGEND_LABEL_FONT_WEIGHT = 700;++const TITLE_SIZE_CLASSES = {+ sm: { root: S.rootSm, label: S.labelSm },+ md: { root: S.rootMd, label: S.labelMd },+} as const;++export type LegendCaptionTitleSize = keyof typeof TITLE_SIZE_CLASSES;++export const LegendDescriptionIcon = forwardRef<+ HTMLDivElement,+ BoxProps & {+ name?: IconProps["name"];+ inCappedRow?: boolean;+ "data-testid"?: string;+ }+>(function LegendDescriptionIcon(+ { name = "info", inCappedRow, className, ...props },+ ref,+) {+ return (+ <Box+ component="span"+ ref={ref}+ className={cx(+ S.descriptionIcon,+ { [S.descriptionIconCapped]: inCappedRow },+ className,+ )}+ {...props}+ >+ <Icon name={name} />+ </Box>+ );+});++export const LegendRightContent = ({ children }: { children?: ReactNode }) => (+ <Flex justify="flex-end" ml="auto" align="center">+ {children}+ </Flex>+);function shouldHideDescription(width: number | undefined) {const HIDE_DESCRIPTION_THRESHOLD = 100;@@ -42,6 +93,7 @@ interface LegendCaptionProps {hasInfoTooltip?: boolean;onSelectTitle?: () => void;titleMenuItems?: React.ReactNode;+ titleSize?: LegendCaptionTitleSize;width?: number;}@@ -56,6 +108,7 @@ export const LegendCaption = ({onSelectTitle,width,titleMenuItems,+ titleSize,}: LegendCaptionProps) => {/** Optimization: lazy computing the href on title focus & mouseenter only.@@ -84,9 +137,13 @@ export const LegendCaption = ({const hasTitleMenuItems =titleMenuItems && React.Children.count(titleMenuItems) > 1;+ const sizeClasses = titleSize ? TITLE_SIZE_CLASSES[titleSize] : undefined;+const titleElement = (<LegendLabelclassName={cx(+ S.label,+ sizeClasses?.label,DashboardS.fullscreenNormalText,// html2canvas doesn't support `text-overflow: ellipsis` (#45499) https://github.com/niklasvh/html2canvas/issues/324@@ -115,8 +172,13 @@ export const LegendCaption = ({);return (- <LegendCaptionRoot className={className} data-testid="legend-caption">- {icon && <LegendLabelIcon {...icon} />}+ <Flex+ align="center"+ miw={0}+ className={cx(sizeClasses?.root, className)}+ data-testid="legend-caption"+ >+ {icon && <Icon {...icon} className={cx(S.labelIcon, icon.className)} />}{hasTitleMenuItems ? (<Menu><Menu.Target>{titleElement}</Menu.Target>@@ -140,7 +202,8 @@ export const LegendCaption = ({<LegendDescriptionIconname="info"className={cx(CS.hoverChild, CS.hoverChildSmooth)}- mt="3px"+ inCappedRow={titleSize != null}+ mt={titleSize != null ? undefined : "3px"}mr="lg"/></Tooltip>@@ -148,6 +211,6 @@ export const LegendCaption = ({<LegendRightContent>{actionButtons && <LegendActions>{actionButtons}</LegendActions>}</LegendRightContent>- </LegendCaptionRoot>+ </Flex>);};diff --git a/frontend/src/metabase/visualizations/components/legend/LegendCaption/index.ts b/frontend/src/metabase/visualizations/components/legend/LegendCaption/index.tsindex c0ddea9da71..5ed5312134d 100644--- a/frontend/src/metabase/visualizations/components/legend/LegendCaption/index.ts+++ b/frontend/src/metabase/visualizations/components/legend/LegendCaption/index.ts@@ -1,5 +1,8 @@-export { LegendCaption } from "./LegendCaption";export {LEGEND_LABEL_FONT_SIZE,LEGEND_LABEL_FONT_WEIGHT,-} from "./LegendCaption.styled";+ LegendCaption,+ type LegendCaptionTitleSize,+ LegendDescriptionIcon,+ LegendRightContent,+} from "./LegendCaption";diff --git a/frontend/src/metabase/visualizations/components/skeletons/SkeletonCaption/SkeletonCaption.tsx b/frontend/src/metabase/visualizations/components/skeletons/SkeletonCaption/SkeletonCaption.tsxindex f195bd41ca1..c098fadaed4 100644--- a/frontend/src/metabase/visualizations/components/skeletons/SkeletonCaption/SkeletonCaption.tsx+++ b/frontend/src/metabase/visualizations/components/skeletons/SkeletonCaption/SkeletonCaption.tsx@@ -5,7 +5,7 @@ import { Tooltip } from "metabase/ui";import {LegendDescriptionIcon,LegendRightContent,-} from "metabase/visualizations/components/legend/LegendCaption/LegendCaption.styled";+} from "metabase/visualizations/components/legend/LegendCaption";import type { VisualizationSkeletonProps } from "metabase/visualizations/components/skeletons/VisualizationSkeleton/VisualizationSkeleton";import {diff --git a/frontend/src/metabase/visualizations/components/skeletons/VisualizationSkeleton/VisualizationSkeleton.tsx b/frontend/src/metabase/visualizations/components/skeletons/VisualizationSkeleton/VisualizationSkeleton.tsxindex 152a78d10b4..c3444f6ebc6 100644--- a/frontend/src/metabase/visualizations/components/skeletons/VisualizationSkeleton/VisualizationSkeleton.tsx+++ b/frontend/src/metabase/visualizations/components/skeletons/VisualizationSkeleton/VisualizationSkeleton.tsx@@ -1,6 +1,8 @@+import cx from "classnames";import type { HTMLAttributes } from "react";-import { VisualizationRoot } from "metabase/visualizations/components/Visualization/Visualization.styled";+import { Box } from "metabase/ui";+import VisualizationS from "metabase/visualizations/components/Visualization/Visualization.module.css";import { VisualizationSkeletonCaption } from "metabase/visualizations/components/skeletons/VisualizationSkeleton/VisualizationSkeleton.styled";export type VisualizationSkeletonProps = HTMLAttributes<HTMLDivElement> & {@@ -17,13 +19,13 @@ export const VisualizationSkeleton = ({className,}: VisualizationSkeletonProps) => {return (- <VisualizationRoot className={className}>+ <Box className={cx(VisualizationS.root, className)}><VisualizationSkeletonCaptionname={name}description={description}actionMenu={actionMenu}/>{children}- </VisualizationRoot>+ </Box>);};diff --git a/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.tsx b/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.tsxindex a4e29d244dc..eeeaad3216b 100644--- a/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.tsx+++ b/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.tsx@@ -11,7 +11,7 @@ import type { VisualizationProps } from "metabase/visualizations/types";import {CartesianChartLegendLayout,CartesianChartRoot,-} from "metabase/visualizations/visualizations/CartesianChart/CartesianChart.styled";+} from "metabase/visualizations/visualizations/CartesianChart/CartesianChartLayout";import { useTooltipMouseLeave } from "metabase/visualizations/visualizations/CartesianChart/use-tooltip-mouse-leave";import {extractRemappings,diff --git a/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.module.css b/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.module.cssnew file mode 100644index 00000000000..8a9b675028f--- /dev/null+++ b/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.module.css@@ -0,0 +1,10 @@+.root {+ height: 100%;+ display: flex;+ flex-direction: column;+ overflow: hidden;+}++.legendLayout {+ flex: 1 1 auto;+}diff --git a/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.styled.tsx b/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.styled.tsxdeleted file mode 100644index 2cfefba14db..00000000000--- a/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.styled.tsx+++ /dev/null@@ -1,23 +0,0 @@-// eslint-disable-next-line no-restricted-imports-import styled from "@emotion/styled";--import { LegendLayout } from "metabase/visualizations/components/legend/LegendLayout";--import { getChartPadding } from "./padding";--type CartesianChartRootProps = {- isQueryBuilder?: boolean;-};--export const CartesianChartRoot = styled.div<CartesianChartRootProps>`- padding: ${getChartPadding};- height: 100%;- display: flex;- flex-direction: column;- gap: ${({ isQueryBuilder }) => (isQueryBuilder ? "0" : "0.325rem")};- overflow: hidden;-`;--export const CartesianChartLegendLayout = styled(LegendLayout)`- flex: 1 1 auto;-`;diff --git a/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.tsx b/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.tsxindex 3feadad441a..f52293796f4 100644--- a/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.tsx+++ b/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.tsx@@ -13,7 +13,7 @@ import type { VisualizationProps } from "metabase/visualizations/types";import {CartesianChartLegendLayout,CartesianChartRoot,-} from "metabase/visualizations/visualizations/CartesianChart/CartesianChart.styled";+} from "metabase/visualizations/visualizations/CartesianChart/CartesianChartLayout";import type { CartesianHoveredObject } from "metabase/visualizations/visualizations/CartesianChart/types";import { useChartEvents } from "metabase/visualizations/visualizations/CartesianChart/use-chart-events";import {@@ -24,6 +24,7 @@ import {} from "metabase/viz-core";import { TimelineEventsBand } from "./TimelineEventsBand";+import { useCartesianSizeTier } from "./use-cartesian-size-tier";import { useChartDebug } from "./use-chart-debug";import { useModelsAndOption } from "./use-models-and-option";import { useTimelineEventsHover } from "./use-timeline-events-hover";@@ -55,6 +56,7 @@ function CartesianChartInner(props: VisualizationProps) {showTitle,headerIcon,actionButtons,+ dashcard,isDashboard,isEditing,isVisualizer,@@ -210,9 +212,18 @@ function CartesianChartInner(props: VisualizationProps) {useCloseTooltipOnScroll(chartRef);+ const sizeTier = useCartesianSizeTier({+ width: outerWidth,+ height: outerHeight,+ isDashboard,+ isQueryBuilder,+ dashcard,+ });+return (<CartesianChartRootisQueryBuilder={isQueryBuilder}+ sizeTier={sizeTier}className="CardVisualization">{showTitle && (@@ -228,6 +239,7 @@ function CartesianChartInner(props: VisualizationProps) {}width={outerWidth}titleMenuItems={titleMenuItems}+ titleSize={sizeTier?.titleFontSize}/>)}<CartesianChartLegendLayoutdiff --git a/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChartLayout.tsx b/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChartLayout.tsxnew file mode 100644index 00000000000..f42eb59a0cc--- /dev/null+++ b/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChartLayout.tsx@@ -0,0 +1,44 @@+import cx from "classnames";+import type { ComponentProps, ReactNode } from "react";++import { Box, useMantineTheme } from "metabase/ui";+import { LegendLayout } from "metabase/visualizations/components/legend/LegendLayout";++import S from "./CartesianChart.module.css";+import { getChartGap, getChartPadding } from "./padding";+import type { CartesianCardSizeTier } from "./sizing";++interface CartesianChartRootProps {+ isQueryBuilder?: boolean;+ sizeTier?: CartesianCardSizeTier;+ className?: string;+ children: ReactNode;+}++export function CartesianChartRoot({+ isQueryBuilder,+ sizeTier,+ className,+ children,+}: CartesianChartRootProps) {+ const theme = useMantineTheme();++ return (+ <Box+ className={cx(S.root, className)}+ style={{+ padding: getChartPadding({ theme, isQueryBuilder, sizeTier }),+ gap: getChartGap({ isQueryBuilder, sizeTier }),+ }}+ >+ {children}+ </Box>+ );+}++export function CartesianChartLegendLayout({+ className,+ ...props+}: ComponentProps<typeof LegendLayout>) {+ return <LegendLayout {...props} className={cx(S.legendLayout, className)} />;+}diff --git a/frontend/src/metabase/visualizations/visualizations/CartesianChart/padding.ts b/frontend/src/metabase/visualizations/visualizations/CartesianChart/padding.tsindex 212cdff0feb..ec3beb00315 100644--- a/frontend/src/metabase/visualizations/visualizations/CartesianChart/padding.ts+++ b/frontend/src/metabase/visualizations/visualizations/CartesianChart/padding.ts@@ -1,12 +1,18 @@-import type { MantineTheme } from "metabase/ui";+import type { CartesianCardSizeTier } from "./sizing";++interface ChartLayoutProps {+ isQueryBuilder?: boolean;+ sizeTier?: CartesianCardSizeTier;+ theme: { other: { cartesian: { padding?: string } } };+}++const pxToRem = (px: number) => `${px / 16}rem`;export const getChartPadding = ({theme,isQueryBuilder,-}: {- isQueryBuilder?: boolean;- theme: MantineTheme;-}) => {+ sizeTier,+}: ChartLayoutProps) => {const { padding } = theme.other.cartesian;if (padding) {@@ -19,5 +25,24 @@ export const getChartPadding = ({return "1rem 1rem 1rem 2rem";}+ if (sizeTier) {+ return `${pxToRem(sizeTier.yPadding)} ${pxToRem(sizeTier.xPadding)}`;+ }+return "0.5rem 1rem";};++export const getChartGap = ({+ isQueryBuilder,+ sizeTier,+}: Pick<ChartLayoutProps, "isQueryBuilder" | "sizeTier">) => {+ if (isQueryBuilder) {+ return "0";+ }++ if (sizeTier) {+ return pxToRem(sizeTier.titleGap);+ }++ return "0.325rem";+};diff --git a/frontend/src/metabase/visualizations/visualizations/CartesianChart/padding.unit.spec.ts b/frontend/src/metabase/visualizations/visualizations/CartesianChart/padding.unit.spec.tsnew file mode 100644index 00000000000..b85d3ddcf30--- /dev/null+++ b/frontend/src/metabase/visualizations/visualizations/CartesianChart/padding.unit.spec.ts@@ -0,0 +1,59 @@+import { getChartGap, getChartPadding } from "./padding";+import { getCartesianCardSizeTier } from "./sizing";++const THEME = { other: { cartesian: {} } };+const THEME_WITH_PADDING = { other: { cartesian: { padding: "3rem" } } };++const SMALL_TIER = getCartesianCardSizeTier(0, 0);+const MEDIUM_TIER = getCartesianCardSizeTier(300, 200);+const LARGE_TIER = getCartesianCardSizeTier(640, 360);++describe("getChartPadding", () => {+ it("prefers the theme padding override over any other option", () => {+ expect(getChartPadding({ theme: THEME_WITH_PADDING })).toBe("3rem");+ expect(+ getChartPadding({ theme: THEME_WITH_PADDING, isQueryBuilder: true }),+ ).toBe("3rem");+ expect(+ getChartPadding({ theme: THEME_WITH_PADDING, sizeTier: LARGE_TIER }),+ ).toBe("3rem");+ });++ it("keeps the query builder padding", () => {+ expect(getChartPadding({ theme: THEME, isQueryBuilder: true })).toBe(+ "1rem 1rem 1rem 2rem",+ );+ });++ it("returns the size tier padding for dashboard cards", () => {+ expect(getChartPadding({ theme: THEME, sizeTier: SMALL_TIER })).toBe(+ "0.75rem 1rem",+ );+ expect(getChartPadding({ theme: THEME, sizeTier: MEDIUM_TIER })).toBe(+ "1.375rem 1.5rem",+ );+ expect(getChartPadding({ theme: THEME, sizeTier: LARGE_TIER })).toBe(+ "2.375rem 2.5rem",+ );+ });++ it("falls back to the default padding without a size tier", () => {+ expect(getChartPadding({ theme: THEME })).toBe("0.5rem 1rem");+ });+});++describe("getChartGap", () => {+ it("keeps the query builder layout without a gap", () => {+ expect(getChartGap({ isQueryBuilder: true })).toBe("0");+ });++ it("returns the size tier title gap for dashboard cards", () => {+ expect(getChartGap({ sizeTier: SMALL_TIER })).toBe("0.75rem");+ expect(getChartGap({ sizeTier: MEDIUM_TIER })).toBe("1.375rem");+ expect(getChartGap({ sizeTier: LARGE_TIER })).toBe("2rem");+ });++ it("falls back to the default gap without a size tier", () => {+ expect(getChartGap({})).toBe("0.325rem");+ });+});diff --git a/frontend/src/metabase/visualizations/visualizations/CartesianChart/sizing.ts b/frontend/src/metabase/visualizations/visualizations/CartesianChart/sizing.tsnew file mode 100644index 00000000000..cac4fbc4dd6--- /dev/null+++ b/frontend/src/metabase/visualizations/visualizations/CartesianChart/sizing.ts@@ -0,0 +1,50 @@+import type { LegendCaptionTitleSize } from "metabase/visualizations/components/legend/LegendCaption";++export interface CartesianCardSizeTier {+ minWidth: number;+ minHeight: number;+ xPadding: number;+ yPadding: number;+ titleGap: number;+ titleFontSize: LegendCaptionTitleSize;+}++// Largest tier first; a card gets the first tier it fits both dimensions of.+export const CARTESIAN_CARD_SIZE_TIERS: readonly CartesianCardSizeTier[] = [+ {+ minWidth: 640,+ minHeight: 360,+ xPadding: 40,+ yPadding: 38,+ titleGap: 32,+ titleFontSize: "md",+ },+ {+ minWidth: 300,+ minHeight: 200,+ xPadding: 24,+ yPadding: 22,+ titleGap: 22,+ titleFontSize: "md",+ },+ {+ minWidth: 0,+ minHeight: 0,+ xPadding: 16,+ yPadding: 12,+ titleGap: 12,+ titleFontSize: "sm",+ },+];++export const getCartesianCardSizeTier = (+ width: number,+ height: number,+): CartesianCardSizeTier => {+ const tier = CARTESIAN_CARD_SIZE_TIERS.find(+ (tier) => width >= tier.minWidth && height >= tier.minHeight,+ );+ return (+ tier ?? CARTESIAN_CARD_SIZE_TIERS[CARTESIAN_CARD_SIZE_TIERS.length - 1]+ );+};diff --git a/frontend/src/metabase/visualizations/visualizations/CartesianChart/sizing.unit.spec.ts b/frontend/src/metabase/visualizations/visualizations/CartesianChart/sizing.unit.spec.tsnew file mode 100644index 00000000000..b66d5354078--- /dev/null+++ b/frontend/src/metabase/visualizations/visualizations/CartesianChart/sizing.unit.spec.ts@@ -0,0 +1,33 @@+import { CARTESIAN_CARD_SIZE_TIERS, getCartesianCardSizeTier } from "./sizing";++const [LARGE_TIER, MEDIUM_TIER, SMALL_TIER] = CARTESIAN_CARD_SIZE_TIERS;++describe("getCartesianCardSizeTier", () => {+ it("returns the smallest tier for tiny cards", () => {+ expect(getCartesianCardSizeTier(0, 0)).toBe(SMALL_TIER);+ expect(getCartesianCardSizeTier(120, 80)).toBe(SMALL_TIER);+ });++ it("picks tiers by the spec thresholds", () => {+ expect(getCartesianCardSizeTier(299, 199)).toBe(SMALL_TIER);+ expect(getCartesianCardSizeTier(300, 200)).toBe(MEDIUM_TIER);+ expect(getCartesianCardSizeTier(639, 359)).toBe(MEDIUM_TIER);+ expect(getCartesianCardSizeTier(640, 360)).toBe(LARGE_TIER);+ expect(getCartesianCardSizeTier(1200, 800)).toBe(LARGE_TIER);+ });++ it("requires both dimensions to fit before upgrading the tier", () => {+ // wide but short cards stay on the tier their height allows+ expect(getCartesianCardSizeTier(800, 199)).toBe(SMALL_TIER);+ expect(getCartesianCardSizeTier(800, 359)).toBe(MEDIUM_TIER);+ // tall but narrow cards stay on the tier their width allows+ expect(getCartesianCardSizeTier(299, 800)).toBe(SMALL_TIER);+ expect(getCartesianCardSizeTier(639, 800)).toBe(MEDIUM_TIER);+ });++ it("uses the small title size only on the smallest tier", () => {+ expect(SMALL_TIER.titleFontSize).toBe("sm");+ expect(MEDIUM_TIER.titleFontSize).toBe("md");+ expect(LARGE_TIER.titleFontSize).toBe("md");+ });+});diff --git a/frontend/src/metabase/visualizations/visualizations/CartesianChart/use-cartesian-size-tier.ts b/frontend/src/metabase/visualizations/visualizations/CartesianChart/use-cartesian-size-tier.tsnew file mode 100644index 00000000000..bf080fceada--- /dev/null+++ b/frontend/src/metabase/visualizations/visualizations/CartesianChart/use-cartesian-size-tier.ts@@ -0,0 +1,30 @@+import { useMantineTheme } from "metabase/ui";+import type { VisualizationProps } from "metabase/visualizations/types";++import { type CartesianCardSizeTier, getCartesianCardSizeTier } from "./sizing";++type UseCartesianSizeTierProps = Pick<+ VisualizationProps,+ "width" | "height" | "isDashboard" | "isQueryBuilder" | "dashcard"+>;++/**+ * Size tiers apply to actual dashboard cards only. Themes that customize the+ * cartesian chart padding keep their own layout.+ */+export function useCartesianSizeTier({+ width,+ height,+ isDashboard,+ isQueryBuilder,+ dashcard,+}: UseCartesianSizeTierProps): CartesianCardSizeTier | undefined {+ const theme = useMantineTheme();+ const isDashboardCard = isDashboard && dashcard != null;++ if (!isDashboardCard || isQueryBuilder || theme.other.cartesian.padding) {+ return undefined;+ }++ return getCartesianCardSizeTier(width, height);+}