Skip to content

Commit

Permalink
refactor : Change menu name and reorder items (#11993)
Browse files Browse the repository at this point in the history
* Change menu name and reorder items

* change type

Co-authored-by: Victor Malai <victormalai@Victors-MacBook-Pro.local>
  • Loading branch information
maloun96 and Victor Malai authored Dec 13, 2020
1 parent 90ed326 commit 022d755
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class SliceHeaderControls extends React.PureComponent {
const refreshTooltip = isCached
? t('Cached %s', cachedWhen)
: (updatedWhen && t('Fetched %s', updatedWhen)) || '';
const resizeLabel = isFullSize ? t('Minimize') : t('Maximize');
const resizeLabel = isFullSize ? t('Minimize Chart') : t('Maximize Chart');

const menu = (
<Menu
Expand Down Expand Up @@ -206,16 +206,10 @@ class SliceHeaderControls extends React.PureComponent {

{this.props.supersetCanExplore && (
<Menu.Item key={MENU_KEYS.EXPLORE_CHART}>
{t('Explore chart')}
{t('View Chart in Explore')}
</Menu.Item>
)}

{this.props.supersetCanCSV && (
<Menu.Item key={MENU_KEYS.EXPORT_CSV}>{t('Export CSV')}</Menu.Item>
)}

<Menu.Item key={MENU_KEYS.RESIZE_LABEL}>{resizeLabel}</Menu.Item>

<Menu.Item key={MENU_KEYS.SHARE_CHART}>
<URLShortLinkModal
url={getDashboardUrl(
Expand All @@ -229,9 +223,15 @@ class SliceHeaderControls extends React.PureComponent {
/>
</Menu.Item>

<Menu.Item key={MENU_KEYS.RESIZE_LABEL}>{resizeLabel}</Menu.Item>

<Menu.Item key={MENU_KEYS.DOWNLOAD_AS_IMAGE}>
{t('Download as image')}
</Menu.Item>

{this.props.supersetCanCSV && (
<Menu.Item key={MENU_KEYS.EXPORT_CSV}>{t('Export CSV')}</Menu.Item>
)}
</Menu>
);

Expand Down

0 comments on commit 022d755

Please sign in to comment.