diff --git a/src/components/side_panel/chart/building_blocks/data_series/data_series.xml b/src/components/side_panel/chart/building_blocks/data_series/data_series.xml index f13aedefc3..e520373a44 100644 --- a/src/components/side_panel/chart/building_blocks/data_series/data_series.xml +++ b/src/components/side_panel/chart/building_blocks/data_series/data_series.xml @@ -1,7 +1,6 @@ -
- +
Chart title - - General + -
- Background color +
-
- +
Add a title -
- - - Title - + + + Title + +
-
- Chart type +
Right
-
- Values +
- - Data series +
-
+
- Series color
-
- Vertical axis +
-
- Series name +
-
- Trend line +
Show trend line @@ -123,8 +122,7 @@
- - Axes + -
- Legend position +
-
- Values +
- - Data series +
-
+
- Series color
-
- Vertical axis +
-
- Serie type +
-
- Series name +
-
- Trend line +
Show trend line @@ -132,8 +130,7 @@
- - Axes + - - Gauge Design + -
- Range +
-
- Thresholds +
diff --git a/src/components/side_panel/chart/pie_chart/pie_chart_design_panel.xml b/src/components/side_panel/chart/pie_chart/pie_chart_design_panel.xml index 417201ab19..9adcbe48e1 100644 --- a/src/components/side_panel/chart/pie_chart/pie_chart_design_panel.xml +++ b/src/components/side_panel/chart/pie_chart/pie_chart_design_panel.xml @@ -5,8 +5,7 @@ definition="props.definition" updateChart="props.updateChart"> -
- Legend position +
-
- Values +
-
- Key value +
-
- Baseline configuration +
Value
-
- Number formatting +
- - Baseline + -
- Baseline description +
-
- +
-
- Vertical axis position +
-
- Legend position +
-
- Values +
- - Waterfall design + -
- Options +
Use first value as subtotal
-
- Colors +
- - Axes + { static template = "o_spreadsheet.Section"; static props = { class: { type: String, optional: true }, + title: { type: String, optional: true }, slots: Object, }; } diff --git a/src/components/side_panel/components/section/section.xml b/src/components/side_panel/components/section/section.xml index 07441f1fdb..38f97cd696 100644 --- a/src/components/side_panel/components/section/section.xml +++ b/src/components/side_panel/components/section/section.xml @@ -1,8 +1,9 @@
- +
+
diff --git a/src/components/side_panel/conditional_formatting/cf_editor/cf_editor.xml b/src/components/side_panel/conditional_formatting/cf_editor/cf_editor.xml index a295739d51..4f32a0ef87 100644 --- a/src/components/side_panel/conditional_formatting/cf_editor/cf_editor.xml +++ b/src/components/side_panel/conditional_formatting/cf_editor/cf_editor.xml @@ -1,8 +1,7 @@
-
- Apply to range +
-
- Format rules +
-
- Currency +
-
- Apply to range +
-
- If the data is invalid +
-
- Replace +
-
- Show measure as: +
+
+`; + +exports[`Section Can render a section with a title slot 1`] = ` +
+
+
+
+ + My title + +
+ +
+ My content +
+ +
+
+
+`; + +exports[`Section Can render a section with both title props and slot 1`] = ` +
+
+
+
+ My title from props + My title from slot +
{ expect(fixture).toMatchSnapshot(); }); - test("Can render a section with a title", async () => { + test("Can render a section with a title slot", async () => { class SectionContainer extends Component { static template = xml/* xml */ `
@@ -42,4 +42,39 @@ describe("Section", () => { ({ fixture } = await mountComponent(SectionContainer, { props })); expect(fixture).toMatchSnapshot(); }); + + test("Can render a section with a title props", async () => { + class SectionContainer extends Component { + static template = xml/* xml */ ` +
+
+
My content
+
+
+ `; + static components = { Section }; + static props = { class: String }; + } + const props = { class: "my-class" }; + ({ fixture } = await mountComponent(SectionContainer, { props })); + expect(fixture).toMatchSnapshot(); + }); + + test("Can render a section with both title props and slot", async () => { + class SectionContainer extends Component { + static template = xml/* xml */ ` +
+
+ My title from slot +
My content
+
+
+ `; + static components = { Section }; + static props = { class: String }; + } + const props = { class: "my-class" }; + ({ fixture } = await mountComponent(SectionContainer, { props })); + expect(fixture).toMatchSnapshot(); + }); });