Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore(frontend): Spelling #19676

Merged
merged 70 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
23a4750
spelling: activity
jsoref Apr 10, 2022
41c8405
spelling: aggregates
jsoref Apr 10, 2022
74a9a38
spelling: ambiguous
jsoref Apr 10, 2022
d41cea2
spelling: annotation
jsoref Apr 10, 2022
3e1096e
spelling: approaches
jsoref Apr 10, 2022
54412ad
spelling: bootstrap
jsoref Apr 10, 2022
71c552d
spelling: bottom
jsoref Apr 10, 2022
f78d9e4
spelling: boundary
jsoref Apr 10, 2022
eb8b968
spelling: checkerboard
jsoref Apr 10, 2022
43a7e1a
spelling: children
jsoref Apr 12, 2022
5f9743f
spelling: choropleth
jsoref Apr 12, 2022
8534515
spelling: comparison
jsoref Apr 12, 2022
ea94bfc
spelling: compatibility
jsoref Apr 12, 2022
fb35775
spelling: component
jsoref Apr 12, 2022
d9b578a
spelling: contingent
jsoref Apr 12, 2022
d228abf
spelling: coordinates
jsoref Apr 12, 2022
c6df623
spelling: dashboard
jsoref Apr 12, 2022
0843604
spelling: description
jsoref Apr 12, 2022
72948d7
spelling: different
jsoref Apr 12, 2022
d2807ed
spelling: dispatcher
jsoref Apr 12, 2022
4088dfc
spelling: encodable
jsoref Apr 12, 2022
a95adcc
spelling: executed
jsoref Apr 12, 2022
b02efef
spelling: extension
jsoref Apr 12, 2022
501576a
spelling: filter
jsoref Apr 12, 2022
b6473c9
spelling: granularity
jsoref Jan 25, 2023
9f511b0
spelling: integer
jsoref Apr 12, 2022
bb95d2f
spelling: intermediate
jsoref Apr 12, 2022
08876ac
spelling: javascript
jsoref Apr 12, 2022
cd11d91
spelling: labeled
jsoref Apr 12, 2022
705327c
spelling: layed out
jsoref Apr 12, 2022
630b55f
spelling: longitude
jsoref Apr 12, 2022
8271b45
spelling: manifest
jsoref Apr 12, 2022
ec03a2f
spelling: maximum
jsoref Apr 12, 2022
d7963ac
spelling: message
jsoref Apr 12, 2022
0d29c33
spelling: metadata
jsoref Apr 12, 2022
9de62d1
spelling: milliseconds
jsoref Apr 12, 2022
caea052
spelling: minute
jsoref Apr 12, 2022
47a6607
spelling: nonsense
jsoref Apr 12, 2022
d0ed85a
spelling: order
jsoref Apr 12, 2022
855c301
spelling: overridable
jsoref Apr 12, 2022
f9bf7e6
spelling: overridden
jsoref Apr 12, 2022
e760b94
spelling: override
jsoref Apr 12, 2022
1b348cd
spelling: parameters
jsoref Apr 12, 2022
363625b
spelling: preferred
jsoref Apr 12, 2022
47dd4e8
spelling: reaffectation
jsoref Apr 12, 2022
a0a9a45
spelling: redundant
jsoref Apr 12, 2022
8a3f4b3
spelling: regarding
jsoref Apr 12, 2022
b16e118
spelling: regardless
jsoref Apr 12, 2022
d2f7da5
spelling: renders
jsoref Apr 12, 2022
086d23c
spelling: scheme
jsoref Apr 12, 2022
47468bd
spelling: serialized
jsoref Apr 12, 2022
a391f72
spelling: shortener
jsoref Apr 12, 2022
9926c15
spelling: significant
jsoref Apr 12, 2022
3075fb0
spelling: simpler
jsoref Apr 12, 2022
f162a24
spelling: source
jsoref Apr 12, 2022
9b799f6
spelling: stringify
jsoref Apr 12, 2022
2e23230
spelling: the
jsoref Apr 12, 2022
de3bb93
spelling: threshold
jsoref Apr 12, 2022
84c627f
spelling: transform
jsoref Apr 12, 2022
33809a4
spelling: translated
jsoref Apr 12, 2022
d806f3f
spelling: translation
jsoref Apr 12, 2022
028502e
spelling: undefined
jsoref Apr 12, 2022
e444ceb
spelling: unknown
jsoref Apr 12, 2022
644cf54
spelling: unnecessary
jsoref Apr 12, 2022
7d4b38f
spelling: untyped
jsoref Apr 12, 2022
25e800d
spelling: using
jsoref Apr 12, 2022
b23296f
spelling: visible
jsoref Apr 12, 2022
b051a16
spelling: visualization
jsoref Apr 12, 2022
6b810cd
spelling: when
jsoref Apr 12, 2022
f4a2ca6
spelling: with
jsoref Apr 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/generate_frontend_ts_tasklist.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ while (directories.length) {
// directory.
const hasTypescriptFiles =
getFilesByExtensions("./", [".ts", ".tsx"]).length > 0;
const hasJavascriptFiles =
const hasJavaScriptFiles =
getFilesByExtensions("./", [".js", ".jsx"]).length > 0;

if (hasJavascriptFiles) {
if (hasJavaScriptFiles) {
console.log(
`${" ".repeat(
curDirectory.split("/").length - 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ export function saveNativeFilterSettings(charts: ChartSpec[]) {
}

/** ************************************************************************
* Cancel Native fitler settings
* Cancel Native filter settings
* @returns {None}
* @summary helper for cancel native filters settings
************************************************************************* */
Expand Down
12 changes: 6 additions & 6 deletions superset-frontend/cypress-base/cypress/support/directories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ export const databasesPage = {
step: '.helper-top',
selectDbStepTitle: '.select-db > h4',
preferredBlockBigQuery: '.preferred > :nth-child(1)',
prefferedBlockPostgreSQL: '.preferred > :nth-child(2)',
prefferedBlockSnowflake: '.preferred > :nth-child(3)',
prefferedBlockMySQL: '.preferred > :nth-child(4)',
prefferedBlockAthena: '.preferred > :nth-child(5)',
prefferedBlockSheets: '.preferred > :nth-child(6)',
preferredBlockPostgreSQL: '.preferred > :nth-child(2)',
preferredBlockSnowflake: '.preferred > :nth-child(3)',
preferredBlockMySQL: '.preferred > :nth-child(4)',
preferredBlockAthena: '.preferred > :nth-child(5)',
preferredBlockSheets: '.preferred > :nth-child(6)',
supportedDatabasesText: '.control-label',
orChoose: '.available-label',
dbDropdown: '[class="ant-select-selection-search-input"]',
Expand Down Expand Up @@ -590,7 +590,7 @@ export const exploreView = {
okButton: '.ant-modal-confirm-btns .ant-btn-primary',
},
},
vizualizationTypeModal: {
visualizationTypeModal: {
vizTypeButton: dataTestLocator('viztype-selector-container'),
},
};
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {
'\\.svg$': '<rootDir>/spec/__mocks__/svgrMock.tsx',
'^src/(.*)$': '<rootDir>/src/$1',
'^spec/(.*)$': '<rootDir>/spec/$1',
// mapping plugins of superset-ui to souce code
// mapping plugins of superset-ui to source code
'@superset-ui/(.*)$': '<rootDir>/node_modules/@superset-ui/$1/src',
},
testEnvironment: 'jsdom',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const config: ControlPanelConfig = {
*
* There are several predefined controls that can be used.
* Some examples:
* - groupby: columns to group by (tranlated to GROUP BY statement)
* - groupby: columns to group by (translated to GROUP BY statement)
* - series: same as groupby, but single selection.
* - metrics: multiple metrics (translated to aggregate expression)
* - metric: sane as metrics, but single selection
Expand Down Expand Up @@ -91,7 +91,7 @@ const config: ControlPanelConfig = {
* by the `@superset-ui/core/lib/validator`:
* - validateNonEmpty: must have at least one value
* - validateInteger: must be an integer value
* - validateNumber: must be an intger or decimal value
* - validateNumber: must be an integer or decimal value
*/

// For control input types, see: superset-frontend/src/explore/components/controls/index.js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
PostProcessingRename,
ensureIsArray,
getMetricLabel,
ComparisionType,
ComparisonType,
getXAxisLabel,
} from '@superset-ui/core';
import { PostProcessingFactory } from './types';
Expand Down Expand Up @@ -50,9 +50,9 @@ export const renameOperator: PostProcessingFactory<PostProcessingRename> = (
(
isTimeComparison(formData, queryObject) &&
[
ComparisionType.Difference,
ComparisionType.Ratio,
ComparisionType.Percentage,
ComparisonType.Difference,
ComparisonType.Ratio,
ComparisonType.Percentage,
].includes(formData.comparison_type)
)
) &&
Expand All @@ -66,7 +66,7 @@ export const renameOperator: PostProcessingFactory<PostProcessingRename> = (
// we will rename the "metric" from the metricWithOffset label
// for example: "count__1 year ago" => "1 year ago"
isTimeComparison(formData, queryObject) &&
formData.comparison_type === ComparisionType.Values
formData.comparison_type === ComparisonType.Values
) {
const metricOffsetMap = getMetricOffsetsMap(formData, queryObject);
const timeOffsets = ensureIsArray(formData.time_compare);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* specific language governing permissions and limitationsxw
* under the License.
*/
import { ComparisionType, PostProcessingCompare } from '@superset-ui/core';
import { ComparisonType, PostProcessingCompare } from '@superset-ui/core';
import { getMetricOffsetsMap, isTimeComparison } from './utils';
import { PostProcessingFactory } from './types';

Expand All @@ -28,7 +28,7 @@ export const timeCompareOperator: PostProcessingFactory<PostProcessingCompare> =

if (
isTimeComparison(formData, queryObject) &&
comparisonType !== ComparisionType.Values
comparisonType !== ComparisonType.Values
) {
return {
operation: 'compare',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
ensureIsArray,
JsonObject,
QueryFormData,
ComparisionType,
ComparisonType,
} from '@superset-ui/core';
import { isString } from 'lodash';

Expand All @@ -30,7 +30,7 @@ export const isDerivedSeries = (
formData: QueryFormData,
): boolean => {
const comparisonType = formData.comparison_type;
if (comparisonType !== ComparisionType.Values) {
if (comparisonType !== ComparisonType.Values) {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* specific language governing permissions and limitationsxw
* under the License.
*/
import { ComparisionType } from '@superset-ui/core';
import { ComparisonType } from '@superset-ui/core';
import { getMetricOffsetsMap } from './getMetricOffsetsMap';
import { PostProcessingFactory } from '../types';

Expand All @@ -29,7 +29,7 @@ export const isTimeComparison: PostProcessingFactory<boolean> = (
const metricOffsetMap = getMetricOffsetsMap(formData, queryObject);

return (
Object.values(ComparisionType).includes(comparisonType) &&
Object.values(ComparisonType).includes(comparisonType) &&
metricOffsetMap.size > 0
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/
import React from 'react';
import { t, RollingType, ComparisionType } from '@superset-ui/core';
import { t, RollingType, ComparisonType } from '@superset-ui/core';
import { ControlPanelSectionConfig } from '../types';
import { formatSelectOptions } from '../utils';

Expand Down Expand Up @@ -137,10 +137,10 @@ export const advancedAnalyticsControls: ControlPanelSectionConfig = {
label: t('Calculation type'),
default: 'values',
choices: [
[ComparisionType.Values, t('Actual values')],
[ComparisionType.Difference, t('Difference')],
[ComparisionType.Percentage, t('Percentage change')],
[ComparisionType.Ratio, t('Ratio')],
[ComparisonType.Values, t('Actual values')],
[ComparisonType.Difference, t('Difference')],
[ComparisonType.Percentage, t('Percentage change')],
[ComparisonType.Ratio, t('Ratio')],
],
description: t(
'How to display time shifts: as individual lines; as the ' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const SHARED_COLUMN_CONFIG_PROPS = {
label: t('Small number format'),
description: t(
'D3 number format for numbers between -1.0 and 1.0, ' +
'useful when you want to have different siginificant digits for small and large numbers',
'useful when you want to have different significant digits for small and large numbers',
),
},
d3TimeFormat,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import {
getSequentialSchemeRegistry,
SequentialScheme,
legacyValidateInteger,
ComparisionType,
ComparisonType,
isAdhocColumn,
isPhysicalColumn,
ensureIsArray,
Expand Down Expand Up @@ -308,7 +308,7 @@ const y_axis_format: SharedControlConfig<'SelectControl', SelectDefaultOption> =
option.label.includes(search) || option.value.includes(search),
mapStateToProps: state => {
const isPercentage =
state.controls?.comparison_type?.value === ComparisionType.Percentage;
state.controls?.comparison_type?.value === ComparisonType.Percentage;
return {
choices: isPercentage
? D3_FORMAT_OPTIONS.filter(option => option[0].includes('%'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export interface ControlPanelState {
}

/**
* The action dispather will call Redux `dispatch` internally and return what's
* The action dispatcher will call Redux `dispatch` internally and return what's
* returned from `dispatch`, which by default is the original or another action.
*/
export interface ActionDispatcher<
Expand Down Expand Up @@ -200,7 +200,7 @@ export type TabOverride = 'data' | 'customize' | boolean;
tab, or 'customize' if you want it to show up on that tam. Otherwise sections with ALL
`renderTrigger: true` components will show up on the `Customize` tab.
* - visibility: a function that uses control panel props to check whether a control should
* be visibile.
* be visible.
*/
export interface BaseControlConfig<
T extends ControlType = ControlType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function expandControlConfig(
// {
// name: 'metric',
// config: {
// type: 'SelectControl' | SelectComonent
// type: 'SelectControl' | SelectComponent
// }
// }
if ('name' in control && 'config' in control) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { ComparisionType, QueryObject, SqlaFormData } from '@superset-ui/core';
import { ComparisonType, QueryObject, SqlaFormData } from '@superset-ui/core';
import { renameOperator } from '@superset-ui/chart-controls';

const formData: SqlaFormData = {
Expand Down Expand Up @@ -74,9 +74,9 @@ test('should skip renameOperator if does not exist x_axis and is_timeseries', ()

test('should skip renameOperator if exists derived metrics', () => {
[
ComparisionType.Difference,
ComparisionType.Ratio,
ComparisionType.Percentage,
ComparisonType.Difference,
ComparisonType.Ratio,
ComparisonType.Percentage,
].forEach(type => {
expect(
renameOperator(
Expand Down Expand Up @@ -126,7 +126,7 @@ test('should add renameOperator if exist "actual value" time comparison', () =>
{
...formData,
...{
comparison_type: ComparisionType.Values,
comparison_type: ComparisonType.Values,
time_compare: ['1 year ago', '1 year later'],
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ test('rolling_type: sum/mean/std', () => {
});

test('should append compared metrics when sets time compare type', () => {
const comparisionTypes = ['values', 'difference', 'percentage', 'ratio'];
comparisionTypes.forEach(cType => {
const comparisonTypes = ['values', 'difference', 'percentage', 'ratio'];
comparisonTypes.forEach(cType => {
expect(
rollingWindowOperator(
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ test('should skip CompareOperator', () => {
});

test('should generate difference/percentage/ratio CompareOperator', () => {
const comparisionTypes = ['difference', 'percentage', 'ratio'];
comparisionTypes.forEach(cType => {
const comparisonTypes = ['difference', 'percentage', 'ratio'];
comparisonTypes.forEach(cType => {
expect(
timeCompareOperator(
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/
import { isDerivedSeries } from '@superset-ui/chart-controls';
import { SqlaFormData, ComparisionType } from '@superset-ui/core';
import { SqlaFormData, ComparisonType } from '@superset-ui/core';

const formData: SqlaFormData = {
datasource: 'foo',
Expand All @@ -31,15 +31,15 @@ const series = {

test('should be false if comparison type is not actual values', () => {
expect(isDerivedSeries(series, formData)).toEqual(false);
Object.keys(ComparisionType)
.filter(type => type === ComparisionType.Values)
Object.keys(ComparisonType)
.filter(type => type === ComparisonType.Values)
.forEach(type => {
const formDataWithComparisionType = {
const formDataWithComparisonType = {
...formData,
comparison_type: type,
time_compare: ['1 month ago'],
};
expect(isDerivedSeries(series, formDataWithComparisionType)).toEqual(
expect(isDerivedSeries(series, formDataWithComparisonType)).toEqual(
false,
);
});
Expand All @@ -48,7 +48,7 @@ test('should be false if comparison type is not actual values', () => {
test('should be true if comparison type is values', () => {
const formDataWithActualTypes = {
...formData,
comparison_type: ComparisionType.Values,
comparison_type: ComparisonType.Values,
time_compare: ['1 month ago', '1 month later'],
};
expect(isDerivedSeries(series, formDataWithActualTypes)).toEqual(true);
Expand All @@ -62,7 +62,7 @@ test('should be false if series name does not match time_compare', () => {
};
const formDataWithActualTypes = {
...formData,
comparison_type: ComparisionType.Values,
comparison_type: ComparisonType.Values,
time_compare: ['1 month ago', '1 month later'],
};
expect(isDerivedSeries(arbitrary_series, formDataWithActualTypes)).toEqual(
Expand All @@ -78,7 +78,7 @@ test('should be false if time compare is not suffix', () => {
};
const formDataWithActualTypes = {
...formData,
comparison_type: ComparisionType.Values,
comparison_type: ComparisonType.Values,
time_compare: ['1 month ago', '1 month later'],
};
expect(isDerivedSeries(series, formDataWithActualTypes)).toEqual(false);
Expand All @@ -92,7 +92,7 @@ test('should be false if series name invalid', () => {
};
const formDataWithActualTypes = {
...formData,
comparison_type: ComparisionType.Values,
comparison_type: ComparisonType.Values,
time_compare: ['1 month ago', '1 month later'],
};
expect(isDerivedSeries(series, formDataWithActualTypes)).toEqual(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export type Props = Omit<SuperChartCoreProps, 'chartProps'> &
FallbackComponent?: React.ComponentType<FallbackPropsWithDimension>;
/** Event listener for unexpected errors from chart */
onErrorBoundary?: ErrorBoundaryProps['onError'];
/** Prop for form plugins uisng superchart */
/** Prop for form plugins using superchart */
showOverflow?: boolean;
/** Prop for popovercontainer ref */
parentRef?: RefObject<any>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export function evalExpression(expression: string, value: number): number {
const subExpressions = String(parsedExpression).split('=');
parsedExpression = subExpressions[1] ?? subExpressions[0];
// we can ignore the type requirement on `TOKENS`, as value is always `number`
// and doesn't need to consider `number | underfined`.
// and doesn't need to consider `number | undefined`.
// @ts-ignore
return Number(mexp.eval(parsedExpression, TOKENS, { x: value }));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default function buildQueryObject<T extends QueryFormData>(

let queryObject: QueryObject = {
// fallback `null` to `undefined` so they won't be sent to the backend
// (JSON.strinify will ignore `undefined`.)
// (JSON.stringify will ignore `undefined`.)
time_range: time_range || undefined,
since: since || undefined,
until: until || undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function normalizeOrderBy(
};
}

// todo: Removed `legacy_ordery_by` after refactoring
// todo: Removed `legacy_order_by` after refactoring
if (
queryObject.legacy_order_by !== undefined &&
queryObject.legacy_order_by !== null &&
Expand Down
Loading