{
{t('Export to Excel')}
- {isFeatureEnabled(FeatureFlag.ALLOW_FULL_CSV_EXPORT) &&
+ {isFeatureEnabled(FeatureFlag.AllowFullCsvExport) &&
props.supersetCanCSV &&
isTable && (
<>
diff --git a/superset-frontend/src/dashboard/components/SyncDashboardState/SyncDashboardState.test.tsx b/superset-frontend/src/dashboard/components/SyncDashboardState/SyncDashboardState.test.tsx
index 1565a43e19657..063e88975dec7 100644
--- a/superset-frontend/src/dashboard/components/SyncDashboardState/SyncDashboardState.test.tsx
+++ b/superset-frontend/src/dashboard/components/SyncDashboardState/SyncDashboardState.test.tsx
@@ -26,7 +26,7 @@ test('stores the dashboard info with local storages', () => {
render(, {
useRedux: true,
});
- expect(getItem(LocalStorageKeys.dashboard__explore_context, {})).toEqual({
+ expect(getItem(LocalStorageKeys.DashboardExploreContext, {})).toEqual({
[testDashboardPageId]: expect.objectContaining({
dashboardPageId: testDashboardPageId,
}),
diff --git a/superset-frontend/src/dashboard/components/SyncDashboardState/index.tsx b/superset-frontend/src/dashboard/components/SyncDashboardState/index.tsx
index fd252e83c6d95..4ad1f3518ef5d 100644
--- a/superset-frontend/src/dashboard/components/SyncDashboardState/index.tsx
+++ b/superset-frontend/src/dashboard/components/SyncDashboardState/index.tsx
@@ -34,7 +34,7 @@ const EMPTY_OBJECT = {};
export const getDashboardContextLocalStorage = () => {
const dashboardsContexts = getItem(
- LocalStorageKeys.dashboard__explore_context,
+ LocalStorageKeys.DashboardExploreContext,
{},
);
// A new dashboard tab id is generated on each dashboard page opening.
@@ -52,7 +52,7 @@ const updateDashboardTabLocalStorage = (
dashboardContext: DashboardContextForExplore,
) => {
const dashboardsContexts = getDashboardContextLocalStorage();
- setItem(LocalStorageKeys.dashboard__explore_context, {
+ setItem(LocalStorageKeys.DashboardExploreContext, {
...dashboardsContexts,
[dashboardPageId]: dashboardContext,
});
diff --git a/superset-frontend/src/dashboard/components/gridComponents/Row.jsx b/superset-frontend/src/dashboard/components/gridComponents/Row.jsx
index ae3db36d1dbf5..d645a1a2cfc6f 100644
--- a/superset-frontend/src/dashboard/components/gridComponents/Row.jsx
+++ b/superset-frontend/src/dashboard/components/gridComponents/Row.jsx
@@ -118,7 +118,7 @@ class Row extends React.PureComponent {
// if chart rendered - remove it if it's more than 4 view heights away from current viewport
componentDidMount() {
if (
- isFeatureEnabled(FeatureFlag.DASHBOARD_VIRTUALIZATION) &&
+ isFeatureEnabled(FeatureFlag.DashboardVirtualization) &&
!isCurrentUserBot()
) {
this.observerEnabler = new IntersectionObserver(
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx
index cb6f17d96dbf9..3c44081a3f95b 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx
@@ -109,7 +109,7 @@ const ActionButtons = ({
dataMaskApplied,
dataMaskSelected,
isApplyDisabled,
- filterBarOrientation = FilterBarOrientation.VERTICAL,
+ filterBarOrientation = FilterBarOrientation.Vertical,
}: ActionButtonsProps) => {
const isClearAllEnabled = useMemo(
() =>
@@ -121,7 +121,7 @@ const ActionButtons = ({
),
[dataMaskApplied, dataMaskSelected],
);
- const isVertical = filterBarOrientation === FilterBarOrientation.VERTICAL;
+ const isVertical = filterBarOrientation === FilterBarOrientation.Vertical;
return (
handleHighlightFilterSource(filter.path)}
/>
{(filter.column || filter.value) && (
@@ -89,7 +89,7 @@ const CrossFilter = (props: {
)),
[crossFilters],
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.test.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.test.tsx
index 99b5fa23f925e..42f92522ff1b3 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.test.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.test.tsx
@@ -160,7 +160,7 @@ describe('FilterBar', () => {
const renderWrapper = (props = closedBarProps, state?: object) =>
render(
= {}) =>
test('Dropdown trigger renders with FF HORIZONTAL_FILTER_BAR on', async () => {
// @ts-ignore
global.featureFlags = {
- [FeatureFlag.HORIZONTAL_FILTER_BAR]: true,
+ [FeatureFlag.HorizontalFilterBar]: true,
};
await setup();
expect(screen.getByLabelText('gear')).toBeVisible();
@@ -82,7 +82,7 @@ test('Dropdown trigger renders with FF HORIZONTAL_FILTER_BAR on', async () => {
test('Dropdown trigger does not render with FF HORIZONTAL_FILTER_BAR off', async () => {
// @ts-ignore
global.featureFlags = {
- [FeatureFlag.HORIZONTAL_FILTER_BAR]: false,
+ [FeatureFlag.HorizontalFilterBar]: false,
};
await setup();
expect(screen.queryByLabelText('gear')).not.toBeInTheDocument();
@@ -91,7 +91,7 @@ test('Dropdown trigger does not render with FF HORIZONTAL_FILTER_BAR off', async
test('Dropdown trigger renders with dashboard edit permissions', async () => {
// @ts-ignore
global.featureFlags = {
- [FeatureFlag.HORIZONTAL_FILTER_BAR]: true,
+ [FeatureFlag.HorizontalFilterBar]: true,
};
await setup({
dash_edit_perm: true,
@@ -102,7 +102,7 @@ test('Dropdown trigger renders with dashboard edit permissions', async () => {
test('Dropdown trigger does not render without dashboard edit permissions', async () => {
// @ts-ignore
global.featureFlags = {
- [FeatureFlag.HORIZONTAL_FILTER_BAR]: true,
+ [FeatureFlag.HorizontalFilterBar]: true,
};
await setup({
dash_edit_perm: false,
@@ -114,7 +114,7 @@ test('Dropdown trigger does not render without dashboard edit permissions', asyn
test('Dropdown trigger renders with FF DASHBOARD_CROSS_FILTERS on', async () => {
// @ts-ignore
global.featureFlags = {
- [FeatureFlag.DASHBOARD_CROSS_FILTERS]: true,
+ [FeatureFlag.DashboardCrossFilters]: true,
};
await setup();
@@ -124,7 +124,7 @@ test('Dropdown trigger renders with FF DASHBOARD_CROSS_FILTERS on', async () =>
test('Dropdown trigger does not render with FF DASHBOARD_CROSS_FILTERS off', async () => {
// @ts-ignore
global.featureFlags = {
- [FeatureFlag.DASHBOARD_CROSS_FILTERS]: false,
+ [FeatureFlag.DashboardCrossFilters]: false,
};
await setup();
@@ -134,7 +134,7 @@ test('Dropdown trigger does not render with FF DASHBOARD_CROSS_FILTERS off', asy
test('Popover shows cross-filtering option on by default', async () => {
// @ts-ignore
global.featureFlags = {
- [FeatureFlag.DASHBOARD_CROSS_FILTERS]: true,
+ [FeatureFlag.DashboardCrossFilters]: true,
};
await setup();
userEvent.click(screen.getByLabelText('gear'));
@@ -145,7 +145,7 @@ test('Popover shows cross-filtering option on by default', async () => {
test('Can enable/disable cross-filtering', async () => {
// @ts-ignore
global.featureFlags = {
- [FeatureFlag.DASHBOARD_CROSS_FILTERS]: true,
+ [FeatureFlag.DashboardCrossFilters]: true,
};
fetchMock.reset();
fetchMock.put('glob:*/api/v1/dashboard/1', {
@@ -165,7 +165,7 @@ test('Can enable/disable cross-filtering', async () => {
test('Popover opens with "Vertical" selected', async () => {
// @ts-ignore
global.featureFlags = {
- [FeatureFlag.HORIZONTAL_FILTER_BAR]: true,
+ [FeatureFlag.HorizontalFilterBar]: true,
};
await setup();
userEvent.click(screen.getByLabelText('gear'));
@@ -180,9 +180,9 @@ test('Popover opens with "Vertical" selected', async () => {
test('Popover opens with "Horizontal" selected', async () => {
// @ts-ignore
global.featureFlags = {
- [FeatureFlag.HORIZONTAL_FILTER_BAR]: true,
+ [FeatureFlag.HorizontalFilterBar]: true,
};
- await setup({ filterBarOrientation: FilterBarOrientation.HORIZONTAL });
+ await setup({ filterBarOrientation: FilterBarOrientation.Horizontal });
userEvent.click(screen.getByLabelText('gear'));
userEvent.hover(screen.getByText('Orientation of filter bar'));
expect(await screen.findByText('Vertical (Left)')).toBeInTheDocument();
@@ -195,7 +195,7 @@ test('Popover opens with "Horizontal" selected', async () => {
test('On selection change, send request and update checked value', async () => {
// @ts-ignore
global.featureFlags = {
- [FeatureFlag.HORIZONTAL_FILTER_BAR]: true,
+ [FeatureFlag.HorizontalFilterBar]: true,
};
fetchMock.reset();
fetchMock.put('glob:*/api/v1/dashboard/1', {
@@ -256,7 +256,7 @@ test('On selection change, send request and update checked value', async () => {
test('On failed request, restore previous selection', async () => {
// @ts-ignore
global.featureFlags = {
- [FeatureFlag.HORIZONTAL_FILTER_BAR]: true,
+ [FeatureFlag.HorizontalFilterBar]: true,
};
fetchMock.reset();
fetchMock.put('glob:*/api/v1/dashboard/1', 400);
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBarSettings/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBarSettings/index.tsx
index 8aa51f06339bc..05f57beb6bc52 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBarSettings/index.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBarSettings/index.tsx
@@ -67,7 +67,7 @@ const CROSS_FILTERS_MENU_KEY = 'cross-filters-menu-key';
const CROSS_FILTERS_SCOPING_MENU_KEY = 'cross-filters-scoping-menu-key';
const isOrientation = (o: SelectedKey): o is FilterBarOrientation =>
- o === FilterBarOrientation.VERTICAL || o === FilterBarOrientation.HORIZONTAL;
+ o === FilterBarOrientation.Vertical || o === FilterBarOrientation.Horizontal;
const FilterBarSettings = () => {
const dispatch = useDispatch();
@@ -81,7 +81,7 @@ const FilterBarSettings = () => {
const [selectedFilterBarOrientation, setSelectedFilterBarOrientation] =
useState(filterBarOrientation);
const isCrossFiltersFeatureEnabled = isFeatureEnabled(
- FeatureFlag.DASHBOARD_CROSS_FILTERS,
+ FeatureFlag.DashboardCrossFilters,
);
const shouldEnableCrossFilters =
isCrossFiltersEnabled && isCrossFiltersFeatureEnabled;
@@ -92,7 +92,7 @@ const FilterBarSettings = () => {
({ dashboardInfo }) => dashboardInfo.dash_edit_perm,
);
const canSetHorizontalFilterBar =
- canEdit && isFeatureEnabled(FeatureFlag.HORIZONTAL_FILTER_BAR);
+ canEdit && isFeatureEnabled(FeatureFlag.HorizontalFilterBar);
const [openScopingModal, scopingModal] = useCrossFiltersScopingModal();
@@ -184,11 +184,11 @@ const FilterBarSettings = () => {
label: t('Orientation of filter bar'),
children: [
{
- key: FilterBarOrientation.VERTICAL,
+ key: FilterBarOrientation.Vertical,
label: t('Vertical (Left)'),
},
{
- key: FilterBarOrientation.HORIZONTAL,
+ key: FilterBarOrientation.Horizontal,
label: t('Horizontal (Top)'),
},
],
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx
index 96f51f5359e13..bc66d07c08b4f 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx
@@ -153,7 +153,7 @@ const useFilterControlDisplay = (
overflow: boolean,
) =>
useMemo(() => {
- if (orientation === FilterBarOrientation.HORIZONTAL) {
+ if (orientation === FilterBarOrientation.Horizontal) {
if (overflow) {
return {
FilterControlContainer: HorizontalOverflowFilterControlContainer,
@@ -228,7 +228,7 @@ const FilterControl = ({
inView,
showOverflow,
parentRef,
- orientation = FilterBarOrientation.VERTICAL,
+ orientation = FilterBarOrientation.Vertical,
overflow = false,
}: FilterControlProps) => {
const portalNode = useMemo(() => createHtmlPortalNode(), []);
@@ -275,7 +275,7 @@ const FilterControl = ({
const isScrolling = useContext(FilterBarScrollContext);
const filterCardPlacement = useMemo(() => {
- if (orientation === FilterBarOrientation.HORIZONTAL) {
+ if (orientation === FilterBarOrientation.Horizontal) {
if (overflow) {
return FilterCardPlacement.Left;
}
@@ -302,7 +302,7 @@ const FilterControl = ({
= ({
}) => {
const filterBarOrientation = useSelector(
({ dashboardInfo }) =>
- isFeatureEnabled(FeatureFlag.HORIZONTAL_FILTER_BAR)
+ isFeatureEnabled(FeatureFlag.HorizontalFilterBar)
? dashboardInfo.filterBarOrientation
- : FilterBarOrientation.VERTICAL,
+ : FilterBarOrientation.Vertical,
);
const { outlinedFilterId, lastUpdated } = useFilterOutlined();
@@ -97,7 +97,7 @@ const FilterControls: FC = ({
const verboseMaps = useChartsVerboseMaps();
const isCrossFiltersEnabled = isFeatureEnabled(
- FeatureFlag.DASHBOARD_CROSS_FILTERS,
+ FeatureFlag.DashboardCrossFilters,
);
const selectedCrossFilters = useMemo(
() =>
@@ -208,7 +208,7 @@ const FilterControls: FC = ({
id: `${c.name}${c.emitterId}`,
element: rendererCrossFilter(
c,
- FilterBarOrientation.HORIZONTAL,
+ FilterBarOrientation.Horizontal,
selectedCrossFilters.at(-1),
),
}));
@@ -326,9 +326,9 @@ const FilterControls: FC = ({
)}
))}
- {filterBarOrientation === FilterBarOrientation.VERTICAL &&
+ {filterBarOrientation === FilterBarOrientation.Vertical &&
renderVerticalContent()}
- {filterBarOrientation === FilterBarOrientation.HORIZONTAL &&
+ {filterBarOrientation === FilterBarOrientation.Horizontal &&
renderHorizontalContent()}
>
);
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterDivider.stories.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterDivider.stories.tsx
index 46e7c03fadb5d..37385ff5e9f6f 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterDivider.stories.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterDivider.stories.tsx
@@ -65,7 +65,7 @@ export const HorizontalFilterDivider = (props: FilterDividerProps) => (
background-color: white;
`}
>
-
+