Skip to content

Commit

Permalink
fix: explore warnings cleanup (#20864)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomedina248 committed Jul 26, 2022
1 parent 6b0c303 commit 5d107b8
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 84 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
*/
import { debounce } from 'lodash';
import { formatSelectOptions } from '@superset-ui/chart-controls';
import { addLocaleData, SLOW_DEBOUNCE, t } from '@superset-ui/core';
import i18n from './i18n';

addLocaleData(i18n);
import { SLOW_DEBOUNCE, t } from '@superset-ui/core';

export const PAGE_SIZE_OPTIONS = formatSelectOptions<number>([
[0, t('page_size.all')],
Expand Down
65 changes: 0 additions & 65 deletions superset-frontend/plugins/plugin-chart-handlebars/src/i18n.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ import {
getStandardizedControls,
sections,
} from '@superset-ui/chart-controls';
import { addLocaleData, t } from '@superset-ui/core';
import i18n from '../i18n';
import { t } from '@superset-ui/core';
import { allColumnsControlSetItem } from './controls/columns';
import { groupByControlSetItem } from './controls/groupBy';
import { handlebarsTemplateControlSetItem } from './controls/handlebarTemplate';
Expand All @@ -48,8 +47,6 @@ import {
import { queryModeControlSetItem } from './controls/queryMode';
import { styleControlSetItem } from './controls/style';

addLocaleData(i18n);

const config: ControlPanelConfig = {
controlPanelSections: [
sections.legacyTimeseriesTime,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
import React from 'react';
import {
addLocaleData,
ChartDataResponseResult,
ensureIsArray,
FeatureFlag,
Expand Down Expand Up @@ -50,11 +49,8 @@ import {
getStandardizedControls,
} from '@superset-ui/chart-controls';

import i18n from './i18n';
import { PAGE_SIZE_OPTIONS } from './consts';

addLocaleData(i18n);

function getQueryMode(controls: ControlStateMapping): QueryMode {
const mode = controls?.query_mode?.value;
if (mode === QueryMode.aggregate || mode === QueryMode.raw) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const buttonsStyles = (theme: SupersetTheme) => css`
& .fave-unfave-icon {
padding: 0 ${theme.gridUnit}px;
&:first-child {
&:first-of-type {
padding-left: 0;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const propTypes = {
vizType: PropTypes.string.isRequired,
form_data: PropTypes.object,
ownState: PropTypes.object,
standalone: PropTypes.number,
standalone: PropTypes.bool,
force: PropTypes.bool,
timeout: PropTypes.number,
chartIsStale: PropTypes.bool,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const propTypes = {
controls: PropTypes.object.isRequired,
forcedHeight: PropTypes.string,
form_data: PropTypes.object.isRequired,
standalone: PropTypes.number.isRequired,
standalone: PropTypes.bool.isRequired,
force: PropTypes.bool,
timeout: PropTypes.number,
impressionId: PropTypes.string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ export default class SelectControl extends React.PureComponent {
name,
placeholder,
onFocus,
optionRenderer,
showHeader,
value,
tokenSeparators,
Expand Down Expand Up @@ -241,7 +240,6 @@ export default class SelectControl extends React.PureComponent {
name: `select-${name}`,
onChange: this.onChange,
onFocus,
optionRenderer,
options: this.state.options,
placeholder,
sortComparator: this.props.sortComparator,
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/views/components/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const StyledHeader = styled.header`
.ant-menu > .ant-menu-item > a {
padding: 0px;
}
.main-nav .ant-menu-submenu-title > svg:nth-child(1) {
.main-nav .ant-menu-submenu-title > svg:nth-of-type(1) {
display: none;
}
.ant-menu-item-active > a {
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/views/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { Provider } from 'react-redux';
import { setupStore } from './store';

// Disable connecting to redux debugger so that the React app injected
// Below the menu like SqlLab or Explore can conect its redux store to the debugger
// Below the menu like SqlLab or Explore can connect its redux store to the debugger
const store = setupStore(true);
const container = document.getElementById('app');
const bootstrapJson = container?.getAttribute('data-bootstrap') ?? '{}';
Expand Down

0 comments on commit 5d107b8

Please sign in to comment.