Skip to content

Commit c5b5b14

Browse files
authored
Merge pull request #915 from visualize-admin/feat/banner-height
feat: Diminish banner height
2 parents 94cebc4 + 38a48b7 commit c5b5b14

4 files changed

Lines changed: 17 additions & 12 deletions

File tree

app/configurator/components/presence.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ export const navPresenceProps = {
3636
exit: "exit",
3737
};
3838

39+
export const BANNER_HEIGHT = 250;
40+
export const BANNER_MARGIN_TOP = 96;
3941
export const bannerPresenceProps: Transition = {
4042
transition: { duration: 0.5 },
41-
initial: { marginTop: -446 },
42-
animate: { marginTop: 96 },
43-
exit: { marginTop: -446 },
43+
initial: { marginTop: -(BANNER_HEIGHT + BANNER_MARGIN_TOP) },
44+
animate: { marginTop: BANNER_MARGIN_TOP },
45+
exit: { marginTop: -(BANNER_HEIGHT + BANNER_MARGIN_TOP) },
4446
};

app/configurator/components/select-dataset-step.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ import {
2929
} from "@/configurator/components/layout";
3030
import {
3131
bannerPresenceProps,
32+
BANNER_HEIGHT,
33+
BANNER_MARGIN_TOP,
3234
MotionBox,
3335
navPresenceProps,
3436
smoothPresenceProps,
@@ -81,8 +83,8 @@ const useStyles = makeStyles<Theme, { datasetPresent: boolean }>((theme) => ({
8183
gridTemplateColumns:
8284
"minmax(12rem, 20rem) minmax(22rem, 1fr) minmax(12rem, 20rem)",
8385
gridTemplateAreas: `". banner ."`,
84-
height: 350,
85-
marginTop: 96,
86+
minHeight: BANNER_HEIGHT,
87+
marginTop: BANNER_MARGIN_TOP,
8688
backgroundColor: theme.palette.primary.light,
8789
},
8890
panelBanner: {

e2e/filters.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ describe("Filters", () => {
2222
"1. Production region",
2323
"2. Stand structure",
2424
// ---
25-
"3. Evaluation type",
26-
"4. Reference area",
27-
"5. Grid",
25+
"3. Inventory",
26+
"4. Evaluation type",
27+
"5. Reference area",
2828
]);
2929

3030
const productionRegionFilter = selectors.edition.dataFilterInput(

e2e/interactive-filters.spec.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ test("it should display values in interactive filters as hierarchie", async ({
88
await page.goto("/en/__test/int/bathing-water-quality-hierarchie");
99
await selectors.chart.loaded();
1010
await page.locator('text="Show Filters"').click();
11-
await within(selectors.published.interactiveFilters())
12-
.getByText("Seerose")
13-
.click();
14-
await selectors.mui.popover().getByText("BAQUA_FR");
11+
const interactiveFilters = await within(
12+
selectors.published.interactiveFilters()
13+
);
14+
await page.locator("[value=Seerose]").click();
15+
await selectors.mui.popover().getByText("BAQUA_FR").click();
1516
await selectors.mui.popover().getByText("Nouvelle plage").click();
1617
await selectors.chart.loaded();
1718
});

0 commit comments

Comments
 (0)