Skip to content

Commit

Permalink
chore: renaming conversation to chatbot
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Burtey committed Mar 28, 2024
1 parent baaaf16 commit 2895775
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 26 deletions.
29 changes: 13 additions & 16 deletions .storybook/storybook.requires.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/* do not change this file, it is auto generated by storybook. */

import { argsEnhancers } from "@storybook/addon-actions/dist/modern/preset/addArgs"
import "@storybook/addon-ondevice-actions/register"
import "@storybook/addon-ondevice-backgrounds/register"
import "@storybook/addon-ondevice-controls/register"
import "@storybook/addon-ondevice-knobs/register"
import "@storybook/addon-ondevice-notes/register"
import {
configure,
addDecorator,
addParameters,
addArgsEnhancer,
clearDecorators,
} from "@storybook/react-native";
} from "@storybook/react-native"

global.STORIES = [
{
Expand All @@ -16,18 +21,10 @@ global.STORIES = [
importPathMatcher:
"^\\.[\\\\/](?:app(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.(?:ts|tsx)?)$",
},
];

import "@storybook/addon-ondevice-notes/register";
import "@storybook/addon-ondevice-controls/register";
import "@storybook/addon-ondevice-knobs/register";
import "@storybook/addon-ondevice-backgrounds/register";
import "@storybook/addon-ondevice-actions/register";

import { argsEnhancers } from "@storybook/addon-actions/dist/modern/preset/addArgs";
]

try {
argsEnhancers.forEach((enhancer) => addArgsEnhancer(enhancer));
argsEnhancers.forEach((enhancer) => addArgsEnhancer(enhancer))
} catch {}

const getStories = () => {
Expand Down Expand Up @@ -67,7 +64,7 @@ const getStories = () => {
"./app/screens/authentication-screen/authentication-check-screen.stories.tsx": require("../app/screens/authentication-screen/authentication-check-screen.stories.tsx"),
"./app/screens/authentication-screen/authentication-screen.stories.tsx": require("../app/screens/authentication-screen/authentication-screen.stories.tsx"),
"./app/screens/authentication-screen/pin-screen.stories.tsx": require("../app/screens/authentication-screen/pin-screen.stories.tsx"),
"./app/screens/conversation/conversation.stories.tsx": require("../app/screens/conversation/conversation.stories.tsx"),
"./app/screens/conversation/conversation.stories.tsx": require("../app/screens/chatbot-screen/chatbot.stories.tsx"),
"./app/screens/conversion-flow/conversion-success-screen.stories.tsx": require("../app/screens/conversion-flow/conversion-success-screen.stories.tsx"),
"./app/screens/earns-map-screen/earns-map-screen.stories.tsx": require("../app/screens/earns-map-screen/earns-map-screen.stories.tsx"),
"./app/screens/earns-screen/earns-quiz.stories.tsx": require("../app/screens/earns-screen/earns-quiz.stories.tsx"),
Expand Down Expand Up @@ -104,7 +101,7 @@ const getStories = () => {
"./app/screens/settings-screen/settings-screen.stories.tsx": require("../app/screens/settings-screen/settings-screen.stories.tsx"),
"./app/screens/settings-screen/theme-screen.stories.tsx": require("../app/screens/settings-screen/theme-screen.stories.tsx"),
"./app/screens/transaction-detail-screen/transaction-detail-screen.stories.tsx": require("../app/screens/transaction-detail-screen/transaction-detail-screen.stories.tsx"),
};
};
}
}

configure(getStories, module, false);
configure(getStories, module, false)
2 changes: 1 addition & 1 deletion .storybook/storybook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RNBootSplash.hide({ fade: true })
const StorybookUI = getStorybookUI({
enableWebsockets: true,
onDeviceUI: true,
initialSelection: { kind: "Conversation Screen", name: "Default" },
initialSelection: { kind: "ChatBot Screen", name: "Default" },
shouldPersistSelection: false,
})

Expand Down
4 changes: 2 additions & 2 deletions app/navigation/root-navigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import LearnIcon from "@app/assets/icons/learn.svg"
import MapIcon from "@app/assets/icons/map.svg"
import { useIsAuthed } from "@app/graphql/is-authed-context"
import { useI18nContext } from "@app/i18n/i18n-react"
import { ConversationScreen } from "@app/screens/conversation/conversation"
import { ChatBotScreen } from "@app/screens/chatbot-screen/chatbot"
import {
ConversionConfirmationScreen,
ConversionDetailsScreen,
Expand Down Expand Up @@ -412,7 +412,7 @@ export const RootStack = () => {
/>
<RootNavigator.Screen
name="chatbot"
component={ConversationScreen}
component={ChatBotScreen}
options={{
title: LL.support.chatbot(),
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { StoryScreen } from "../../../.storybook/views"
import { createCache } from "../../graphql/cache"
import { SupportChatDocument } from "../../graphql/generated"
import { IsAuthedContextProvider } from "../../graphql/is-authed-context"
import { ConversationScreen } from "./conversation"
import { ChatBotScreen } from "./chatbot"

const mockEmpty = [
{
Expand Down Expand Up @@ -61,23 +61,23 @@ const mockShort = [
]

export default {
title: "Conversation Screen",
component: ConversationScreen,
title: "ChatBot Screen",
component: ChatBotScreen,
decorators: [(Story) => <StoryScreen>{Story()}</StoryScreen>],
} as Meta<typeof ConversationScreen>
} as Meta<typeof ChatBotScreen>

export const Empty = () => (
<MockedProvider mocks={mockEmpty} cache={createCache()}>
<IsAuthedContextProvider value={true}>
<ConversationScreen />
<ChatBotScreen />
</IsAuthedContextProvider>
</MockedProvider>
)

export const Default = () => (
<MockedProvider mocks={mockShort} cache={createCache()}>
<IsAuthedContextProvider value={true}>
<ConversationScreen />
<ChatBotScreen />
</IsAuthedContextProvider>
</MockedProvider>
)
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ gql`
}
`

export const ConversationScreen = () => {
export const ChatBotScreen = () => {
const styles = useStyles()
const { theme } = useTheme()

Expand Down

0 comments on commit 2895775

Please sign in to comment.