chore: make control panel sub sections look better (#24736)

This commit is contained in:
Maxime Beauchemin
2023-07-20 16:33:50 -07:00
committed by GitHub
parent 9b6ed315f8
commit 22a0fe555c
25 changed files with 145 additions and 55 deletions

View File

@@ -23,6 +23,7 @@ import {
ControlPanelsContainerProps,
ControlSetRow,
ControlStateMapping,
ControlSubSectionHeader,
D3_TIME_FORMAT_DOCS,
formatSelectOptions,
getStandardizedControls,
@@ -292,9 +293,9 @@ const config: ControlPanelConfig = {
tabOverride: 'customize',
expanded: true,
controlSetRows: [
[<div className="section-header">{t('X Axis')}</div>],
[<ControlSubSectionHeader>{t('X Axis')}</ControlSubSectionHeader>],
...createAxisTitleControl('x'),
[<div className="section-header">{t('Y Axis')}</div>],
[<ControlSubSectionHeader>{t('Y Axis')}</ControlSubSectionHeader>],
...createAxisTitleControl('y'),
],
},
@@ -318,10 +319,10 @@ const config: ControlPanelConfig = {
},
],
...legendSection,
[<div className="section-header">{t('X Axis')}</div>],
[<ControlSubSectionHeader>{t('X Axis')}</ControlSubSectionHeader>],
...createAxisControl('x'),
...richTooltipSection,
[<div className="section-header">{t('Y Axis')}</div>],
[<ControlSubSectionHeader>{t('Y Axis')}</ControlSubSectionHeader>],
...createAxisControl('y'),
],
},

View File

@@ -21,6 +21,7 @@ import { t } from '@superset-ui/core';
import {
ControlPanelConfig,
ControlPanelsContainerProps,
ControlSubSectionHeader,
D3_TIME_FORMAT_DOCS,
getStandardizedControls,
sections,
@@ -167,7 +168,7 @@ const config: ControlPanelConfig = {
},
],
...legendSection,
[<div className="section-header">{t('X Axis')}</div>],
[<ControlSubSectionHeader>{t('X Axis')}</ControlSubSectionHeader>],
[
{
name: 'x_axis_time_format',
@@ -200,7 +201,7 @@ const config: ControlPanelConfig = {
],
...richTooltipSection,
// eslint-disable-next-line react/jsx-key
[<div className="section-header">{t('Y Axis')}</div>],
[<ControlSubSectionHeader>{t('Y Axis')}</ControlSubSectionHeader>],
['y_axis_format'],
[
{

View File

@@ -21,6 +21,7 @@ import { t } from '@superset-ui/core';
import {
ControlPanelConfig,
ControlPanelsContainerProps,
ControlSubSectionHeader,
D3_TIME_FORMAT_DOCS,
getStandardizedControls,
sections,
@@ -109,7 +110,7 @@ const config: ControlPanelConfig = {
},
],
...legendSection,
[<div className="section-header">{t('X Axis')}</div>],
[<ControlSubSectionHeader>{t('X Axis')}</ControlSubSectionHeader>],
[
{
@@ -144,7 +145,7 @@ const config: ControlPanelConfig = {
// eslint-disable-next-line react/jsx-key
...richTooltipSection,
// eslint-disable-next-line react/jsx-key
[<div className="section-header">{t('Y Axis')}</div>],
[<ControlSubSectionHeader>{t('Y Axis')}</ControlSubSectionHeader>],
['y_axis_format'],
[
{

View File

@@ -21,6 +21,7 @@ import { t } from '@superset-ui/core';
import {
ControlPanelConfig,
ControlPanelsContainerProps,
ControlSubSectionHeader,
D3_TIME_FORMAT_DOCS,
getStandardizedControls,
sections,
@@ -109,7 +110,7 @@ const config: ControlPanelConfig = {
},
],
...legendSection,
[<div className="section-header">{t('X Axis')}</div>],
[<ControlSubSectionHeader>{t('X Axis')}</ControlSubSectionHeader>],
[
{
name: 'x_axis_time_format',
@@ -143,7 +144,7 @@ const config: ControlPanelConfig = {
// eslint-disable-next-line react/jsx-key
...richTooltipSection,
// eslint-disable-next-line react/jsx-key
[<div className="section-header">{t('Y Axis')}</div>],
[<ControlSubSectionHeader>{t('Y Axis')}</ControlSubSectionHeader>],
['y_axis_format'],
[