Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Revert "Apply responsive spacing and typography to dashboard chart cards" (#82346)

Anderson1a8883d60404
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.png
index 487c166ac1b..1d98c175df8 100644
Binary 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 differ
diff --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.png
index 0ddfb9cbae7..2e8d273d263 100644
Binary 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 differ
diff --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.png
index 21b5ac8d142..83138fd78d3 100644
Binary 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 differ
diff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Dark_Theme_Scroll.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Dark_Theme_Scroll.png
index e411cf942be..2c129ae88c8 100644
Binary 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 differ
diff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_Default.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_Default.png
index 85ea8469a60..af135d0ed1b 100644
Binary 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 differ
diff --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.png
index e1a9aad95e6..a4fa85937be 100644
Binary 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 differ
diff --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.png
index 0ca5175f583..fc283dfd478 100644
Binary 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 differ
diff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_Scroll.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Light_Theme_Scroll.png
index e89d6ec6834..6e522c0b4f9 100644
Binary 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 differ
diff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_Default.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_Default.png
index eca4ad7fdb4..7c1e7b5f06f 100644
Binary 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 differ
diff --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.png
index 1b0252700a3..ccf2d951af8 100644
Binary 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 differ
diff --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.png
index fa3bbaabf09..dbfbaed96ea 100644
Binary 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 differ
diff --git a/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_Scroll.png b/.loki/reference/chrome_laptop_App_Embed_PublicOrEmbeddedDashboardView_Transparent_Theme_Scroll.png
index b1ed65abe0f..b01ecf218b8 100644
Binary 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 differ
diff --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.png
index 09794f9bb64..d31943d7e66 100644
Binary 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 differ
diff --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.png
index ffe80999b4a..c5c6a28b63a 100644
Binary 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 differ
diff --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.png
index 387dae7cfef..ff3f97bf853 100644
Binary 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 differ
diff --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.png
index 687a8287ab0..b11bba55faf 100644
Binary 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 differ
diff --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.png
index 8fb1a8a9825..93e93539f12 100644
Binary 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 differ
diff --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.png
index 981b0eab543..1e4a590ca10 100644
Binary 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 differ
diff --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.png
index c5096d983af..98e858ea420 100644
Binary 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 differ
diff --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.png
index 57053d861c5..56fbdd6dda4 100644
Binary 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 differ
diff --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.png
index d47c0b8bcd0..e1d5626ad16 100644
Binary 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 differ
diff --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.png
index 285666ebb8a..1f2aedfcb10 100644
Binary 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 differ
diff --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.png
index 24dae86acb1..2c157313c0b 100644
Binary 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 differ
diff --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.png
index a83bdb8c16c..931d6d2ea2c 100644
Binary 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 differ
diff --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.png
index 520b05e9698..079338bf586 100644
Binary 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 differ
diff --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.png
index 86fdbab2ab8..07bfc028473 100644
Binary 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 differ
diff --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.png
index 0f5a4aca4b3..54723172a35 100644
Binary 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 differ
diff --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.png
index 4199b1de06e..e5c74733439 100644
Binary 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 differ
diff --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.png
index ba0de3822ea..30c4627a666 100644
Binary 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 differ
diff --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.png
index 802a2637a9d..9f5d1c2bc14 100644
Binary 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 differ
diff --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.png
index 1bd3e3b1817..f8137a3d9cd 100644
Binary 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 differ
diff --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.png
index ba013baa08d..f0171440157 100644
Binary 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 differ
diff --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.png
index d1696eb8cd2..bebe8f86f61 100644
Binary 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 differ
diff --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.png
index e45e012181c..71aac94d09a 100644
Binary 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 differ
diff --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.png
index 9e7f816615c..af5374101c6 100644
Binary 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 differ
diff --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.png
index 20d3dbe1238..0bd03a11625 100644
Binary 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 differ
diff --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.png
index e45e012181c..71aac94d09a 100644
Binary 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 differ
diff --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.png
index 0e82403db04..70455cff16b 100644
Binary 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 differ
diff --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.png
index 21c7ec10022..13b2d84764f 100644
Binary 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 differ
diff --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.png
index 21c7ec10022..13b2d84764f 100644
Binary 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 differ
diff --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.png
index b20e6dc61ec..aae2928cf7e 100644
Binary 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 differ
diff --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.png
index 00614e3ed94..05512e4900b 100644
Binary 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 differ
diff --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.png
index 6e4e28230b5..3334c23ceff 100644
Binary 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 differ
diff --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.png
index d9fe62695d3..d71d957bca2 100644
Binary 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 differ
diff --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.png
index 0be47e9cbce..8272feaf628 100644
Binary 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 differ
diff --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.png
index 904b12bab1a..e77a4275fdd 100644
Binary 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 differ
diff --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.png
index e6633b42d7a..f0890c09666 100644
Binary 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 differ
diff --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.png
index f63d767c44b..91248ca3030 100644
Binary 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 differ
diff --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.png
index 8d5fe022093..5e0d8704052 100644
Binary 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 differ
diff --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.png
index ac3c4f260f5..d2fd2cff7a6 100644
Binary 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 differ
diff --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.png
index 7c34674d242..6515f6aa391 100644
Binary 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 differ
diff --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.png
index 8d5fe022093..40668d8af26 100644
Binary 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 differ
diff --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.png
index 8b0e7a7b9d4..84a70b774c3 100644
Binary 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 differ
diff --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.png
index ed235a18b9d..fa7785490df 100644
Binary 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 differ
diff --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.png
index ed235a18b9d..fa7785490df 100644
Binary 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 differ
diff --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.png
index ac3c393959c..954dfc13fa8 100644
Binary 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 differ
diff --git a/e2e/test/scenarios/dashboard/visualizer/drillthrough.cy.spec.ts b/e2e/test/scenarios/dashboard/visualizer/drillthrough.cy.spec.ts
index 2889e7f6840..d3537e7c10c 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(11);
+ H.assertQueryBuilderRowCount(10);
H.queryBuilderMain().within(() => {
cy.findByText("Count").should("exist"); // y-axis
cy.findByText("Created At: Month").should("exist"); // x-axis
diff --git a/e2e/test/scenarios/visualizations-charts/legend.cy.spec.js b/e2e/test/scenarios/visualizations-charts/legend.cy.spec.js
index eeff0bc9c8d..3da36d637cf 100644
--- a/e2e/test/scenarios/visualizations-charts/legend.cy.spec.js
+++ b/e2e/test/scenarios/visualizations-charts/legend.cy.spec.js
@@ -264,12 +264,9 @@ describe("scenarios > visualizations > legend", () => {
H.getDashboardCard(1).within(() => {
H.echartsContainer().findByText("500").should("exist"); // max y-axis value
- cy.findByText(/And \d+ more/).click();
+ cy.findByText("And 39 more").click();
});
- H.popover()
- .contains('[data-testid="legend-item"]', "TX")
- .findByLabelText("Hide series")
- .click();
+ H.popover().within(() => hideSeries(29)); // TX (Texas);
H.getDashboardCard(1).click(); // click outside of popover to close it
H.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.css
deleted file mode 100644
index 9928a4ef552..00000000000
--- a/frontend/src/metabase/visualizations/components/Visualization/Visualization.module.css
+++ /dev/null
@@ -1,9 +0,0 @@
-.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.tsx
new file mode 100644
index 00000000000..0ae4b6a527b
--- /dev/null
+++ b/frontend/src/metabase/visualizations/components/Visualization/Visualization.styled.tsx
@@ -0,0 +1,18 @@
+// 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.tsx
index 19fed931ac6..0f7e1dee4af 100644
--- a/frontend/src/metabase/visualizations/components/Visualization/Visualization.tsx
+++ b/frontend/src/metabase/visualizations/components/Visualization/Visualization.tsx
@@ -28,7 +28,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 { Box, Flex, type IconProps } from "metabase/ui";
+import type { IconProps } from "metabase/ui";
import { isQuestionCard } from "metabase/utils/dashboard";
import { formatNumber } from "metabase/utils/formatting";
import { memoize } from "metabase/utils/memoize";
@@ -83,7 +83,11 @@ import { ErrorView } from "./ErrorView";
import LoadingView, { type LoadingViewProps } from "./LoadingView";
import { DashCardLoadingView } from "./LoadingView/DashCardLoadingView";
import NoResultsView from "./NoResultsView";
-import S from "./Visualization.module.css";
+import {
+ VisualizationActionButtonsContainer,
+ VisualizationHeader,
+ VisualizationRoot,
+} from "./Visualization.styled";
import { VisualizationRenderedWrapper } from "./VisualizationRenderedWrapper";
import { VisualizationRunningState } from "./VisualizationRunningState";
import { Watermark } from "./Watermark";
@@ -785,9 +789,9 @@ class Visualization extends PureComponent<
}
const extra = (
- <Flex component="span" align="center">
+ <VisualizationActionButtonsContainer>
{actionButtons}
- </Flex>
+ </VisualizationActionButtonsContainer>
);
let { gridSize, gridUnit } = this.props;
@@ -835,8 +839,8 @@ class Visualization extends PureComponent<
onError={this.onErrorBoundaryError}
ref={this.props.forwardedRef}
>
- <Box
- className={cx(S.root, className)}
+ <VisualizationRoot
+ className={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
@@ -845,7 +849,7 @@ class Visualization extends PureComponent<
ref={this.props.forwardedRef}
>
{!!hasHeader && (
- <Box className={S.header} flex="0 0 auto">
+ <VisualizationHeader>
<ChartCaption
series={series}
visualizerRawSeries={visualizerRawSeries}
@@ -860,7 +864,7 @@ class Visualization extends PureComponent<
canSelectTitle ? this.handleOnChangeCardAndRun : null
}
/>
- </Box>
+ </VisualizationHeader>
)}
{replacementContent ? (
replacementContent
@@ -1019,7 +1023,7 @@ class Visualization extends PureComponent<
onUpdateVisualizationSettings={onUpdateVisualizationSettings}
/>
)}
- </Box>
+ </VisualizationRoot>
</ErrorBoundary>
);
}
diff --git a/frontend/src/metabase/visualizations/components/legend/LegendCaption/LegendCaption.module.css b/frontend/src/metabase/visualizations/components/legend/LegendCaption/LegendCaption.module.css
deleted file mode 100644
index f2ee808cecd..00000000000
--- a/frontend/src/metabase/visualizations/components/legend/LegendCaption/LegendCaption.module.css
+++ /dev/null
@@ -1,54 +0,0 @@
-/* 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.tsx
new file mode 100644
index 00000000000..1b8d550fae6
--- /dev/null
+++ b/frontend/src/metabase/visualizations/components/legend/LegendCaption/LegendCaption.styled.tsx
@@ -0,0 +1,59 @@
+// 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.tsx
index f0959df2819..9639e3e8f9e 100644
--- a/frontend/src/metabase/visualizations/components/legend/LegendCaption/LegendCaption.tsx
+++ b/frontend/src/metabase/visualizations/components/legend/LegendCaption/LegendCaption.tsx
@@ -1,75 +1,24 @@
import cx from "classnames";
-import React, {
- type ReactNode,
- forwardRef,
- useCallback,
- useState,
-} from "react";
+import React, { 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 {
- Box,
- type BoxProps,
- Ellipsified,
- Flex,
- Icon,
- type IconProps,
- Menu,
- Tooltip,
-} from "metabase/ui";
+import type { IconProps } from "metabase/ui";
+import { Ellipsified, Icon, 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 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>
-);
+import {
+ LegendCaptionRoot,
+ LegendDescriptionIcon,
+ LegendLabel,
+ LegendLabelIcon,
+ LegendRightContent,
+} from "./LegendCaption.styled";
function shouldHideDescription(width: number | undefined) {
const HIDE_DESCRIPTION_THRESHOLD = 100;
@@ -93,7 +42,6 @@ interface LegendCaptionProps {
hasInfoTooltip?: boolean;
onSelectTitle?: () => void;
titleMenuItems?: React.ReactNode;
- titleSize?: LegendCaptionTitleSize;
width?: number;
}
@@ -108,7 +56,6 @@ export const LegendCaption = ({
onSelectTitle,
width,
titleMenuItems,
- titleSize,
}: LegendCaptionProps) => {
/*
* Optimization: lazy computing the href on title focus & mouseenter only.
@@ -137,13 +84,9 @@ export const LegendCaption = ({
const hasTitleMenuItems =
titleMenuItems && React.Children.count(titleMenuItems) > 1;
- const sizeClasses = titleSize ? TITLE_SIZE_CLASSES[titleSize] : undefined;
-
const titleElement = (
<LegendLabel
className={cx(
- S.label,
- sizeClasses?.label,
DashboardS.fullscreenNormalText,
// html2canvas doesn't support `text-overflow: ellipsis` (#45499) https://github.com/niklasvh/html2canvas/issues/324
@@ -172,13 +115,8 @@ export const LegendCaption = ({
);
return (
- <Flex
- align="center"
- miw={0}
- className={cx(sizeClasses?.root, className)}
- data-testid="legend-caption"
- >
- {icon && <Icon {...icon} className={cx(S.labelIcon, icon.className)} />}
+ <LegendCaptionRoot className={className} data-testid="legend-caption">
+ {icon && <LegendLabelIcon {...icon} />}
{hasTitleMenuItems ? (
<Menu>
<Menu.Target>{titleElement}</Menu.Target>
@@ -202,8 +140,7 @@ export const LegendCaption = ({
<LegendDescriptionIcon
name="info"
className={cx(CS.hoverChild, CS.hoverChildSmooth)}
- inCappedRow={titleSize != null}
- mt={titleSize != null ? undefined : "3px"}
+ mt="3px"
mr="lg"
/>
</Tooltip>
@@ -211,6 +148,6 @@ export const LegendCaption = ({
<LegendRightContent>
{actionButtons && <LegendActions>{actionButtons}</LegendActions>}
</LegendRightContent>
- </Flex>
+ </LegendCaptionRoot>
);
};
diff --git a/frontend/src/metabase/visualizations/components/legend/LegendCaption/index.ts b/frontend/src/metabase/visualizations/components/legend/LegendCaption/index.ts
index 5ed5312134d..c0ddea9da71 100644
--- a/frontend/src/metabase/visualizations/components/legend/LegendCaption/index.ts
+++ b/frontend/src/metabase/visualizations/components/legend/LegendCaption/index.ts
@@ -1,8 +1,5 @@
+export { LegendCaption } from "./LegendCaption";
export {
LEGEND_LABEL_FONT_SIZE,
LEGEND_LABEL_FONT_WEIGHT,
- LegendCaption,
- type LegendCaptionTitleSize,
- LegendDescriptionIcon,
- LegendRightContent,
-} from "./LegendCaption";
+} from "./LegendCaption.styled";
diff --git a/frontend/src/metabase/visualizations/components/skeletons/SkeletonCaption/SkeletonCaption.tsx b/frontend/src/metabase/visualizations/components/skeletons/SkeletonCaption/SkeletonCaption.tsx
index c098fadaed4..f195bd41ca1 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";
+} from "metabase/visualizations/components/legend/LegendCaption/LegendCaption.styled";
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.tsx
index c3444f6ebc6..152a78d10b4 100644
--- a/frontend/src/metabase/visualizations/components/skeletons/VisualizationSkeleton/VisualizationSkeleton.tsx
+++ b/frontend/src/metabase/visualizations/components/skeletons/VisualizationSkeleton/VisualizationSkeleton.tsx
@@ -1,8 +1,6 @@
-import cx from "classnames";
import type { HTMLAttributes } from "react";
-import { Box } from "metabase/ui";
-import VisualizationS from "metabase/visualizations/components/Visualization/Visualization.module.css";
+import { VisualizationRoot } from "metabase/visualizations/components/Visualization/Visualization.styled";
import { VisualizationSkeletonCaption } from "metabase/visualizations/components/skeletons/VisualizationSkeleton/VisualizationSkeleton.styled";
export type VisualizationSkeletonProps = HTMLAttributes<HTMLDivElement> & {
@@ -19,13 +17,13 @@ export const VisualizationSkeleton = ({
className,
}: VisualizationSkeletonProps) => {
return (
- <Box className={cx(VisualizationS.root, className)}>
+ <VisualizationRoot className={className}>
<VisualizationSkeletonCaption
name={name}
description={description}
actionMenu={actionMenu}
/>
{children}
- </Box>
+ </VisualizationRoot>
);
};
diff --git a/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.tsx b/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.tsx
index c9060e694ef..ac88bbbb681 100644
--- a/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.tsx
+++ b/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.tsx
@@ -12,7 +12,7 @@ import type { VisualizationProps } from "metabase/visualizations/types";
import {
CartesianChartLegendLayout,
CartesianChartRoot,
-} from "metabase/visualizations/visualizations/CartesianChart/CartesianChartLayout";
+} from "metabase/visualizations/visualizations/CartesianChart/CartesianChart.styled";
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.css
deleted file mode 100644
index 8a9b675028f..00000000000
--- a/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.module.css
+++ /dev/null
@@ -1,10 +0,0 @@
-.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.tsx
new file mode 100644
index 00000000000..2cfefba14db
--- /dev/null
+++ b/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.styled.tsx
@@ -0,0 +1,23 @@
+// 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.tsx
index f52293796f4..3feadad441a 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/CartesianChartLayout";
+} from "metabase/visualizations/visualizations/CartesianChart/CartesianChart.styled";
import type { CartesianHoveredObject } from "metabase/visualizations/visualizations/CartesianChart/types";
import { useChartEvents } from "metabase/visualizations/visualizations/CartesianChart/use-chart-events";
import {
@@ -24,7 +24,6 @@ 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";
@@ -56,7 +55,6 @@ function CartesianChartInner(props: VisualizationProps) {
showTitle,
headerIcon,
actionButtons,
- dashcard,
isDashboard,
isEditing,
isVisualizer,
@@ -212,18 +210,9 @@ function CartesianChartInner(props: VisualizationProps) {
useCloseTooltipOnScroll(chartRef);
- const sizeTier = useCartesianSizeTier({
- width: outerWidth,
- height: outerHeight,
- isDashboard,
- isQueryBuilder,
- dashcard,
- });
-
return (
<CartesianChartRoot
isQueryBuilder={isQueryBuilder}
- sizeTier={sizeTier}
className="CardVisualization"
>
{showTitle && (
@@ -239,7 +228,6 @@ function CartesianChartInner(props: VisualizationProps) {
}
width={outerWidth}
titleMenuItems={titleMenuItems}
- titleSize={sizeTier?.titleFontSize}
/>
)}
<CartesianChartLegendLayout
diff --git a/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChartLayout.tsx b/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChartLayout.tsx
deleted file mode 100644
index f42eb59a0cc..00000000000
--- a/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChartLayout.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-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.ts
index ec3beb00315..212cdff0feb 100644
--- a/frontend/src/metabase/visualizations/visualizations/CartesianChart/padding.ts
+++ b/frontend/src/metabase/visualizations/visualizations/CartesianChart/padding.ts
@@ -1,18 +1,12 @@
-import type { CartesianCardSizeTier } from "./sizing";
-
-interface ChartLayoutProps {
- isQueryBuilder?: boolean;
- sizeTier?: CartesianCardSizeTier;
- theme: { other: { cartesian: { padding?: string } } };
-}
-
-const pxToRem = (px: number) => `${px / 16}rem`;
+import type { MantineTheme } from "metabase/ui";
export const getChartPadding = ({
theme,
isQueryBuilder,
- sizeTier,
-}: ChartLayoutProps) => {
+}: {
+ isQueryBuilder?: boolean;
+ theme: MantineTheme;
+}) => {
const { padding } = theme.other.cartesian;
if (padding) {
@@ -25,24 +19,5 @@ 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.ts
deleted file mode 100644
index b85d3ddcf30..00000000000
--- a/frontend/src/metabase/visualizations/visualizations/CartesianChart/padding.unit.spec.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-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.ts
deleted file mode 100644
index cac4fbc4dd6..00000000000
--- a/frontend/src/metabase/visualizations/visualizations/CartesianChart/sizing.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-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.ts
deleted file mode 100644
index b66d5354078..00000000000
--- a/frontend/src/metabase/visualizations/visualizations/CartesianChart/sizing.unit.spec.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-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.ts
deleted file mode 100644
index bf080fceada..00000000000
--- a/frontend/src/metabase/visualizations/visualizations/CartesianChart/use-cartesian-size-tier.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-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);
-}