Skip to content

Commit

Permalink
chore(plugin-chart-pivot-table): Add more descriptive tooltips for so…
Browse files Browse the repository at this point in the history
…rting [ID-29] (#17634)

* chore(plugin-chart-pivot-table): Add more descriptive tooltips for sorting

* Update superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx

Co-authored-by: Evan Rusackas <[email protected]>

* Update superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx

Co-authored-by: Evan Rusackas <[email protected]>

Co-authored-by: Evan Rusackas <[email protected]>
  • Loading branch information
kgabryje and rusackas authored Dec 2, 2021
1 parent d9e9c3a commit e8ce873
Showing 1 changed file with 24 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import React from 'react';
import {
QueryFormMetric,
smartDateFormatter,
Expand Down Expand Up @@ -225,7 +226,7 @@ const config: ControlPanelConfig = {
name: 'rowOrder',
config: {
type: 'SelectControl',
label: t('Rows sort by'),
label: t('Sort rows by'),
default: 'key_a_to_z',
choices: [
// [value, label]
Expand All @@ -235,7 +236,16 @@ const config: ControlPanelConfig = {
['value_z_to_a', t('value descending')],
],
renderTrigger: true,
description: t('Order of rows'),
description: (
<React.Fragment>
<div>{t('Change order of rows.')}</div>
<div>{t('Available sorting modes:')}</div>
<ul>
<li>{t('By key: use row names as sorting key')}</li>
<li>{t('By value: use metric values as sorting key')}</li>
</ul>
</React.Fragment>
),
},
},
],
Expand All @@ -244,7 +254,7 @@ const config: ControlPanelConfig = {
name: 'colOrder',
config: {
type: 'SelectControl',
label: t('Cols sort by'),
label: t('Sort columns by'),
default: 'key_a_to_z',
choices: [
// [value, label]
Expand All @@ -254,7 +264,16 @@ const config: ControlPanelConfig = {
['value_z_to_a', t('value descending')],
],
renderTrigger: true,
description: t('Order of columns'),
description: (
<React.Fragment>
<div>{t('Change order of columns.')}</div>
<div>{t('Available sorting modes:')}</div>
<ul>
<li>{t('By key: use column names as sorting key')}</li>
<li>{t('By value: use metric values as sorting key')}</li>
</ul>
</React.Fragment>
),
},
},
],
Expand All @@ -280,7 +299,7 @@ const config: ControlPanelConfig = {
name: 'colSubtotalPosition',
config: {
type: 'SelectControl',
label: t('Cols subtotal position'),
label: t('Columns subtotal position'),
default: false,
choices: [
// [value, label]
Expand Down

0 comments on commit e8ce873

Please sign in to comment.