forked from airbytehq/airbyte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Jamakase/update onboarding flow (airbytehq#5656)
- Loading branch information
Showing
58 changed files
with
1,592 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
airbyte-webapp/src/components/CenteredPageComponents/BigButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import styled from "styled-components"; | ||
|
||
import { Button } from "components"; | ||
const BigButton = styled(Button)` | ||
const BigButton = styled(Button)<{ shadow?: boolean }>` | ||
font-size: 16px; | ||
line-height: 19px; | ||
padding: 10px 27px; | ||
font-weight: 500; | ||
box-shadow: ${({ shadow }) => | ||
shadow ? "0 8px 5px -5px rgba(0, 0, 0, 0.2)" : "none"}; | ||
`; | ||
|
||
export default BigButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ | ||
"replicateMySQL", | ||
"consolidateMarketing", | ||
"consolidatePayment", | ||
"buildDashboard", | ||
"zoomCalls" | ||
] |
55 changes: 55 additions & 0 deletions
55
airbyte-webapp/src/hooks/services/Onboarding/OnboardingService.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import React, { useContext, useMemo } from "react"; | ||
import { useLocalStorage } from "react-use"; | ||
import useWorkspace from "hooks/services/useWorkspace"; | ||
import casesConfig from "config/casesConfig.json"; | ||
|
||
type Context = { | ||
feedbackPassed?: boolean; | ||
passFeedback: () => void; | ||
useCases?: string[]; | ||
skipCase: (skipId: string) => void; | ||
}; | ||
|
||
export const OnboardingServiceContext = React.createContext<Context | null>( | ||
null | ||
); | ||
|
||
export const OnboardingServiceProvider: React.FC = ({ children }) => { | ||
const { workspace } = useWorkspace(); | ||
const [feedbackPassed, setFeedbackPassed] = useLocalStorage<boolean>( | ||
`${workspace.workspaceId}/passFeedback`, | ||
false | ||
); | ||
const [useCases, setUseCases] = useLocalStorage<string[]>( | ||
`${workspace.workspaceId}/useCases`, | ||
casesConfig | ||
); | ||
|
||
const ctx = useMemo<Context>( | ||
() => ({ | ||
feedbackPassed, | ||
passFeedback: () => setFeedbackPassed(true), | ||
useCases, | ||
skipCase: (skipId: string) => | ||
setUseCases(useCases?.filter((item) => item !== skipId)), | ||
}), | ||
[feedbackPassed, useCases] | ||
); | ||
|
||
return ( | ||
<OnboardingServiceContext.Provider value={ctx}> | ||
{children} | ||
</OnboardingServiceContext.Provider> | ||
); | ||
}; | ||
|
||
export const useOnboardingService = (): Context => { | ||
const onboardingService = useContext(OnboardingServiceContext); | ||
if (!onboardingService) { | ||
throw new Error( | ||
"useOnboardingService must be used within a OnboardingServiceProvider." | ||
); | ||
} | ||
|
||
return onboardingService; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./OnboardingService"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.