feat(style): hide dashboard header by url parameter (#12918)

* feat(native-filters): hide dashboard header bu url parameter

* lint: fix lint

* test: add tests

* test: fix test

* refactor: upgrade standalone param

* fix: pre-commit and extract to method is_standalone_mode

* test: fix tests

* test: fix tests

* fix: fix standalone statement

* refactor: fix CR notes

* chore: pre-commit

* fix: fix sticky tabs + update CR notes

* lint: fix lint

* lint: fix lint

* fix: fix CR notes

* fix: fix CR notes

* lint: fix lint

* refactor: fix cr notes

Co-authored-by: amitmiran137 <amit.miran@nielsen.com>
This commit is contained in:
simcha90
2021-02-11 15:05:35 +02:00
committed by GitHub
parent 42c4facb7e
commit c5781cde60
20 changed files with 197 additions and 97 deletions

View File

@@ -30,6 +30,7 @@ import {
buildTimeRangeString,
formatTimeRange,
} from 'src/explore/dateFilterUtils';
import { DashboardStandaloneMode } from 'src/dashboard/util/constants';
import * as hostNamesConfig from 'src/utils/hostNamesConfig';
import { getChartMetadataRegistry } from '@superset-ui/core';
@@ -99,7 +100,9 @@ describe('exploreUtils', () => {
});
compareURI(
URI(url),
URI('/superset/explore/').search({ standalone: 'true' }),
URI('/superset/explore/').search({
standalone: DashboardStandaloneMode.HIDE_NAV,
}),
);
});
it('preserves main URLs params', () => {
@@ -205,7 +208,7 @@ describe('exploreUtils', () => {
URI(getExploreLongUrl(formData, 'standalone')),
URI('/superset/explore/').search({
form_data: sFormData,
standalone: 'true',
standalone: DashboardStandaloneMode.HIDE_NAV,
}),
);
});