Skip to content
Snippets Groups Projects
Unverified Commit 77b70d05 authored by github-automation-metabase's avatar github-automation-metabase Committed by GitHub
Browse files

:robot: backported "temporarily hiding group into other" (#50549)


* temporarily hiding group into other (#50511)

* temporarily hiding group into other

* hide group into other

* remove assertions related to group into other

* Update Loki Snapshots

---------

Co-authored-by: default avatarMetabase Automation <github-automation@metabase.com>

* Update Loki Snapshots

---------

Co-authored-by: default avatarAleksandr Lesnenko <alxnddr@users.noreply.github.com>
parent 0341bf3e
No related branches found
No related tags found
No related merge requests found
Showing
with 9 additions and 47 deletions
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Range.png

79.2 KiB | W: | H:

.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Range.png

79.3 KiB | W: | H:

.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Range.png
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Range.png
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Range.png
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Date_Filter_Range.png
  • 2-up
  • Swipe
  • Onion skin
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List.png

72.6 KiB | W: | H:

.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List.png

72.6 KiB | W: | H:

.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List.png
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List.png
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List.png
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Dark_Theme_Parameter_List.png
  • 2-up
  • Swipe
  • Onion skin
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Month_Year.png

82.2 KiB | W: | H:

.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Month_Year.png

82.2 KiB | W: | H:

.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Month_Year.png
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Month_Year.png
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Month_Year.png
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Month_Year.png
  • 2-up
  • Swipe
  • Onion skin
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Range.png

78.6 KiB | W: | H:

.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Range.png

78.5 KiB | W: | H:

.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Range.png
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Range.png
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Range.png
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedDashboardView_filters_Light_Theme_Date_Filter_Range.png
  • 2-up
  • Swipe
  • Onion skin
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedQuestionView_Dark_Theme_Default.png

17.8 KiB | W: | H:

.loki/reference/chrome_laptop_embed_PublicOrEmbeddedQuestionView_Dark_Theme_Default.png

18 KiB | W: | H:

.loki/reference/chrome_laptop_embed_PublicOrEmbeddedQuestionView_Dark_Theme_Default.png
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedQuestionView_Dark_Theme_Default.png
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedQuestionView_Dark_Theme_Default.png
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedQuestionView_Dark_Theme_Default.png
  • 2-up
  • Swipe
  • Onion skin
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedQuestionView_Light_Theme_Default.png

17.5 KiB | W: | H:

.loki/reference/chrome_laptop_embed_PublicOrEmbeddedQuestionView_Light_Theme_Default.png

17.5 KiB | W: | H:

.loki/reference/chrome_laptop_embed_PublicOrEmbeddedQuestionView_Light_Theme_Default.png
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedQuestionView_Light_Theme_Default.png
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedQuestionView_Light_Theme_Default.png
.loki/reference/chrome_laptop_embed_PublicOrEmbeddedQuestionView_Light_Theme_Default.png
  • 2-up
  • Swipe
  • Onion skin
.loki/reference/chrome_laptop_static_viz_ComboChart_Bar_Max_Categories_Default.png

18.1 KiB | W: | H:

.loki/reference/chrome_laptop_static_viz_ComboChart_Bar_Max_Categories_Default.png

18 KiB | W: | H:

.loki/reference/chrome_laptop_static_viz_ComboChart_Bar_Max_Categories_Default.png
.loki/reference/chrome_laptop_static_viz_ComboChart_Bar_Max_Categories_Default.png
.loki/reference/chrome_laptop_static_viz_ComboChart_Bar_Max_Categories_Default.png
.loki/reference/chrome_laptop_static_viz_ComboChart_Bar_Max_Categories_Default.png
  • 2-up
  • Swipe
  • Onion skin
.loki/reference/chrome_laptop_static_viz_ComboChart_Bar_Max_Categories_Stacked.png

14 KiB | W: | H:

.loki/reference/chrome_laptop_static_viz_ComboChart_Bar_Max_Categories_Stacked.png

18.8 KiB | W: | H:

.loki/reference/chrome_laptop_static_viz_ComboChart_Bar_Max_Categories_Stacked.png
.loki/reference/chrome_laptop_static_viz_ComboChart_Bar_Max_Categories_Stacked.png
.loki/reference/chrome_laptop_static_viz_ComboChart_Bar_Max_Categories_Stacked.png
.loki/reference/chrome_laptop_static_viz_ComboChart_Bar_Max_Categories_Stacked.png
  • 2-up
  • Swipe
  • Onion skin
.loki/reference/chrome_laptop_static_viz_ComboChart_Bar_Max_Categories_Stacked_Normalized.png

17.9 KiB | W: | H:

.loki/reference/chrome_laptop_static_viz_ComboChart_Bar_Max_Categories_Stacked_Normalized.png

19.1 KiB | W: | H:

.loki/reference/chrome_laptop_static_viz_ComboChart_Bar_Max_Categories_Stacked_Normalized.png
.loki/reference/chrome_laptop_static_viz_ComboChart_Bar_Max_Categories_Stacked_Normalized.png
.loki/reference/chrome_laptop_static_viz_ComboChart_Bar_Max_Categories_Stacked_Normalized.png
.loki/reference/chrome_laptop_static_viz_ComboChart_Bar_Max_Categories_Stacked_Normalized.png
  • 2-up
  • Swipe
  • Onion skin
.loki/reference/chrome_laptop_viz_SankeyChart_Sankey_Gray_Edges.png

88.7 KiB | W: | H:

.loki/reference/chrome_laptop_viz_SankeyChart_Sankey_Gray_Edges.png

88.6 KiB | W: | H:

.loki/reference/chrome_laptop_viz_SankeyChart_Sankey_Gray_Edges.png
.loki/reference/chrome_laptop_viz_SankeyChart_Sankey_Gray_Edges.png
.loki/reference/chrome_laptop_viz_SankeyChart_Sankey_Gray_Edges.png
.loki/reference/chrome_laptop_viz_SankeyChart_Sankey_Gray_Edges.png
  • 2-up
  • Swipe
  • Onion skin
import { SAMPLE_DATABASE } from "e2e/support/cypress_sample_database";
import {
addOrUpdateDashboardCard,
assertEChartsTooltip,
createDashboardWithQuestions,
createNativeQuestion,
createQuestionAndDashboard,
......@@ -11,7 +10,6 @@ import {
getIframeBody,
modal,
openStaticEmbeddingModal,
otherSeriesChartPaths,
popover,
queryBuilderMain,
restore,
......@@ -1064,8 +1062,6 @@ describeEE("issue 8490", () => {
visualization_settings: {
"graph.dimensions": ["CREATED_AT", "CATEGORY"],
"graph.metrics": ["count"],
"graph.max_categories_enabled": true,
"graph.max_categories": 2,
},
display: "bar",
enable_embedding: true,
......@@ -1164,28 +1160,9 @@ describeEE("issue 8490", () => {
cy.findByText("1월 2024").should("be.visible");
// Aggregation "count"
cy.findByText("카운트").should("be.visible");
// "Other" bar tooltip
otherSeriesChartPaths().first().realHover();
});
});
assertEChartsTooltip({
rows: [
{
name: "Gizmo",
value: "4",
},
{
name: "Widget",
value: "2",
},
{
name: "합계",
value: "6",
},
],
});
cy.findByTestId("embed-frame").within(() => {
cy.log("assert the trend chart");
getDashboardCard(2).within(() => {
......
......@@ -782,7 +782,7 @@ describe("scenarios > visualizations > bar chart", () => {
resetHoverState();
});
it("should allow grouping series into a single 'Other' series", () => {
it.skip("should allow grouping series into a single 'Other' series", () => {
const AK_SERIES_COLOR = "#509EE3";
const USER_STATE_FIELD_REF = [
......
......@@ -66,13 +66,6 @@ function canHaveDataLabels(series, vizSettings) {
return vizSettings["stackable.stack_type"] !== "normalized" || !areAllAreas;
}
const areAllBars = (series, settings) =>
getSeriesDisplays(series, settings).every(display => display === "bar");
const canHaveMaxCategoriesSetting = (series, settings) => {
return Boolean(series && areAllBars(series, settings) && series.length >= 2);
};
export const GRAPH_DATA_SETTINGS = {
...columnSettings({
getColumns: ([
......@@ -103,18 +96,12 @@ export const GRAPH_DATA_SETTINGS = {
getDefault: (series, vizSettings) =>
getDefaultDimensions(series, vizSettings),
persistDefault: true,
getProps: ([{ card, data }], vizSettings, _, { transformedSeries }) => {
getProps: ([{ card, data }], vizSettings) => {
const addedDimensions = vizSettings["graph.dimensions"];
const maxDimensionsSupported = getMaxDimensionsSupported(card.display);
const options = data.cols
.filter(getDefaultDimensionFilter(card.display))
.map(getOptionFromColumn);
const fieldSettingWidgets = canHaveMaxCategoriesSetting(
transformedSeries,
vizSettings,
)
? [null, "graph.max_categories"] // We want to show "graph.max_categories" setting for the breakout dimension (2nd)
: [];
return {
options,
addAnother:
......@@ -127,7 +114,7 @@ export const GRAPH_DATA_SETTINGS = {
? t`Add series breakout`
: null,
columns: data.cols,
fieldSettingWidgets,
fieldSettingWidgets: [],
};
},
writeDependencies: ["graph.metrics"],
......@@ -461,19 +448,17 @@ export const GRAPH_DISPLAY_VALUES_SETTINGS = {
},
"graph.max_categories_enabled": {
hidden: true,
getDefault: () => false,
isValid: (series, settings) => {
return canHaveMaxCategoriesSetting(series, settings);
},
// temporarily hiding the setting (metabase#50510)
default: false,
isValid: () => false,
readDependencies: ["series_settings"],
},
"graph.max_categories": {
widget: ChartSettingMaxCategories,
hidden: true,
default: 8,
isValid: (series, settings) => {
return canHaveMaxCategoriesSetting(series, settings);
},
// temporarily hiding the setting (metabase#50510)
default: Number.MAX_SAFE_INTEGER,
isValid: () => false,
getProps: ([{ card }], settings) => {
return {
isEnabled: settings["graph.max_categories_enabled"],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment