Skip to content

Commit

Permalink
fix: reorder options for consistency (DHIS2-9004) (519b0ba) v34 (#1211)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinkrulltott authored Aug 25, 2020
1 parent b099607 commit 8c59852
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 33 deletions.
16 changes: 8 additions & 8 deletions packages/app/i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2020-05-25T18:22:35.064Z\n"
"PO-Revision-Date: 2020-05-25T18:22:35.064Z\n"
"POT-Creation-Date: 2020-08-21T09:51:29.294Z\n"
"PO-Revision-Date: 2020-08-21T09:51:29.294Z\n"

msgid "Rename successful"
msgstr ""
Expand Down Expand Up @@ -735,24 +735,24 @@ msgstr ""
msgid "Data"
msgstr ""

msgid "Axes"
msgstr ""

msgid "Style"
msgstr ""

msgid "Display"
msgstr ""

msgid "Lines"
msgstr ""

msgid "Axes"
msgstr ""

msgid "Vertical (y) axis"
msgstr ""

msgid "Horizontal (x) axis"
msgstr ""

msgid "Style"
msgstr ""

msgid "Chart style"
msgstr ""

Expand Down
39 changes: 27 additions & 12 deletions packages/app/src/modules/options/areaConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ import RangeAxisLabel from '../../components/VisualizationOptions/Options/RangeA
import DomainAxisLabel from '../../components/VisualizationOptions/Options/DomainAxisLabel'
import HideLegend from '../../components/VisualizationOptions/Options/HideLegend'
import HideTitle from '../../components/VisualizationOptions/Options/HideTitle'
import Title from '../../components/VisualizationOptions/Options/Title'
import HideSubtitle from '../../components/VisualizationOptions/Options/HideSubtitle'
import Subtitle from '../../components/VisualizationOptions/Options/Subtitle'
import CompletedOnly from '../../components/VisualizationOptions/Options/CompletedOnly'

export default [
Expand All @@ -30,23 +28,31 @@ export default [
getLabel: () => i18n.t('Data'),
content: [
{
key: 'data-section-1',
key: 'data-display',
getLabel: () => i18n.t('Display'),
content: React.Children.toArray([
<ShowData />,
<PercentStackedValues />,
<CumulativeValues />,
<HideEmptyRowItems />,
<SortOrder />,
]),
},
{
key: 'data-lines',
getLabel: () => i18n.t('Lines'),
content: React.Children.toArray([
<RegressionType />,
<TargetLine />,
<BaseLine />,
<SortOrder />,
<AggregationType />,
]),
},
{
key: 'data-advanced',
getLabel: () => i18n.t('Advanced'),
content: React.Children.toArray([<CompletedOnly />]),
content: React.Children.toArray([
<AggregationType />,
<CompletedOnly />,
]),
},
],
},
Expand All @@ -55,7 +61,8 @@ export default [
getLabel: () => i18n.t('Axes'),
content: [
{
key: 'axes-section-1',
key: 'axes-vertical-axis',
getLabel: () => i18n.t('Vertical (y) axis'),
content: React.Children.toArray([
<RangeAxisMinValue />,
<RangeAxisMaxValue />,
Expand All @@ -65,19 +72,27 @@ export default [
<DomainAxisLabel />,
]),
},
{
key: 'axes-horizontal-axis',
getLabel: () => i18n.t('Horizontal (x) axis'),
content: React.Children.toArray([<DomainAxisLabel />]),
},
],
},
{
key: 'style-tab',
getLabel: () => i18n.t('Style'),
content: [
{
key: 'style-section-1',
key: 'style-chart-style',
getLabel: () => i18n.t('Chart style'),
content: React.Children.toArray([<ShowData />, <HideLegend />]),
},
{
key: 'style-titles',
getLabel: () => i18n.t('Titles'),
content: React.Children.toArray([
<HideLegend />,
<Title />,
<HideTitle />,
<Subtitle />,
<HideSubtitle />,
]),
},
Expand Down
39 changes: 27 additions & 12 deletions packages/app/src/modules/options/lineConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ import RangeAxisLabel from '../../components/VisualizationOptions/Options/RangeA
import DomainAxisLabel from '../../components/VisualizationOptions/Options/DomainAxisLabel'
import HideLegend from '../../components/VisualizationOptions/Options/HideLegend'
import HideTitle from '../../components/VisualizationOptions/Options/HideTitle'
import Title from '../../components/VisualizationOptions/Options/Title'
import HideSubtitle from '../../components/VisualizationOptions/Options/HideSubtitle'
import Subtitle from '../../components/VisualizationOptions/Options/Subtitle'
import CompletedOnly from '../../components/VisualizationOptions/Options/CompletedOnly'

export default [
Expand All @@ -29,22 +27,30 @@ export default [
getLabel: () => i18n.t('Data'),
content: [
{
key: 'data-section-1',
key: 'data-display',
getLabel: () => i18n.t('Display'),
content: React.Children.toArray([
<ShowData />,
<CumulativeValues />,
<HideEmptyRowItems />,
<SortOrder />,
]),
},
{
key: 'data-lines',
getLabel: () => i18n.t('Lines'),
content: React.Children.toArray([
<RegressionType />,
<TargetLine />,
<BaseLine />,
<SortOrder />,
<AggregationType />,
]),
},
{
key: 'data-advanced',
getLabel: () => i18n.t('Advanced'),
content: React.Children.toArray([<CompletedOnly />]),
content: React.Children.toArray([
<AggregationType />,
<CompletedOnly />,
]),
},
],
},
Expand All @@ -53,7 +59,8 @@ export default [
getLabel: () => i18n.t('Axes'),
content: [
{
key: 'axes-section-1',
key: 'axes-vertical-axis',
getLabel: () => i18n.t('Vertical (y) axis'),
content: React.Children.toArray([
<RangeAxisMinValue />,
<RangeAxisMaxValue />,
Expand All @@ -63,19 +70,27 @@ export default [
<DomainAxisLabel />,
]),
},
{
key: 'axes-horizontal-axis',
getLabel: () => i18n.t('Horizontal (x) axis'),
content: React.Children.toArray([<DomainAxisLabel />]),
},
],
},
{
key: 'style-tab',
getLabel: () => i18n.t('Style'),
content: [
{
key: 'style-section-1',
key: 'style-chart-style',
getLabel: () => i18n.t('Chart style'),
content: React.Children.toArray([<ShowData />, <HideLegend />]),
},
{
key: 'style-titles',
getLabel: () => i18n.t('Titles'),
content: React.Children.toArray([
<HideLegend />,
<Title />,
<HideTitle />,
<Subtitle />,
<HideSubtitle />,
]),
},
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/modules/options/stackedColumnConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export default [
key: 'data-display',
getLabel: () => i18n.t('Display'),
content: React.Children.toArray([
<ShowData />,
<PercentStackedValues />,
<CumulativeValues />,
<HideEmptyRowItems />,
Expand Down Expand Up @@ -86,6 +85,7 @@ export default [
key: 'style-chart-style',
getLabel: () => i18n.t('Chart style'),
content: React.Children.toArray([
<ShowData />,
<NoSpaceBetweenColumns />,
<HideLegend />,
/* TODO new option <BackgroundLines /> */
Expand Down

0 comments on commit 8c59852

Please sign in to comment.