Skip to content

Commit f46f939

Browse files
committed
move image examples to english tour example
1 parent 52d7fcc commit f46f939

3 files changed

Lines changed: 14 additions & 7 deletions

File tree

src/components/VisualTour/stories/VisualTour.stories.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ import { Meta, StoryFn } from "@storybook/react";
44
import {
55
Button,
66
Icon,
7+
OverflowText,
78
OverviewItem,
89
OverviewItemDepiction,
910
OverviewItemDescription,
1011
OverviewItemLine,
1112
Toolbar,
1213
ToolbarSection,
14+
VisualTour,
1315
VisualTourProps,
1416
} from "../../../../index";
15-
import VisualTour from "../VisualTour";
1617

1718
import stepDefinitionsEn from "./defaultTour";
1819
import stepDefinitionsDe from "./defaultTour.de";
@@ -23,6 +24,7 @@ export default {
2324
argTypes: {},
2425
} as Meta<typeof VisualTour>;
2526

27+
// FIXME: should give code example about the tour, not only about the elements used as targets
2628
const Template: StoryFn<typeof VisualTour> = (args: VisualTourProps) => {
2729
const [closed, setClosed] = React.useState<boolean>(true);
2830

@@ -53,6 +55,7 @@ const Template: StoryFn<typeof VisualTour> = (args: VisualTourProps) => {
5355
};
5456

5557
// Randomly choose between English and German translation
58+
// FIXME: we cannot use random situation, otherwise the storybook example cannot relly compared between revisions
5659
const stepDefinitions = Math.random() < 0.5 ? stepDefinitionsEn : stepDefinitionsDe;
5760

5861
export const Default = Template.bind({});
@@ -71,8 +74,12 @@ const defaultArgs: VisualTourProps = {
7174
<Icon name={"item-info"} />
7275
</OverviewItemDepiction>
7376
<OverviewItemDescription>
74-
<OverviewItemLine>{texts.firstLine}</OverviewItemLine>
75-
<OverviewItemLine>{texts.secondLine}</OverviewItemLine>
77+
<OverviewItemLine>
78+
<OverflowText>{texts.firstLine}</OverflowText>
79+
</OverviewItemLine>
80+
<OverviewItemLine>
81+
<OverflowText>{texts.secondLine}</OverflowText>
82+
</OverviewItemLine>
7683
</OverviewItemDescription>
7784
</OverviewItem>
7885
);

src/components/VisualTour/stories/defaultTour.de.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,10 @@ const definition = {
2323
},
2424
highlightElementLeft: {
2525
title: "Element auf der linken Seite hervorheben & Bild hochkant",
26-
image: "https://upload.wikimedia.org/wikipedia/commons/a/a3/Knowledge_graph_installation_at_the_Futurium_Berlin_21.jpg",
2726
content: "Der Tooltip wird dort plaziert, wo er am besten für den Benutzer zu sehen ist.",
2827
},
2928
highlightElementC: {
3029
title: "Element C hervorheben & Bild landscape",
31-
image: "https://upload.wikimedia.org/wikipedia/commons/1/15/Knowledge_graph_installation_at_the_Futurium_Berlin.jpg",
3230
content: "Element ist außerhalb des Tourcontainers.",
3331
},
3432
highlightElementD: {

src/components/VisualTour/stories/defaultTour.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ const definition = {
2222
content: "Context overlay for another highlighted element.",
2323
},
2424
highlightElementLeft: {
25-
title: "Highlight element on the left",
25+
title: "Highlight element on the left & portrait image",
26+
image: "https://upload.wikimedia.org/wikipedia/commons/a/a3/Knowledge_graph_installation_at_the_Futurium_Berlin_21.jpg",
2627
content: "The tooltip is placed where it is best seen by the user.",
2728
},
2829
highlightElementC: {
29-
title: "Highlight element C",
30+
title: "Highlight element C & landscape image",
31+
image: "https://upload.wikimedia.org/wikipedia/commons/1/15/Knowledge_graph_installation_at_the_Futurium_Berlin.jpg",
3032
content: "Element outside tour container.",
3133
},
3234
highlightElementD: {

0 commit comments

Comments
 (0)