Skip to content

Commit

Permalink
chore: move onboarding flow and dialog under same location (#8272)
Browse files Browse the repository at this point in the history
It is mostly moving the onboarding folders under same directory for more
clear project structure.
  • Loading branch information
sjaanus authored Sep 26, 2024
1 parent a7e0743 commit 4397af0
Show file tree
Hide file tree
Showing 34 changed files with 35 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { CodeComponent } from 'react-markdown/lib/ast-to-react';
import type { FC } from 'react';
import copy from 'copy-to-clipboard';
import useToast from '../../hooks/useToast';
import useToast from 'hooks/useToast';
import { IconButton, styled, Tooltip } from '@mui/material';
import CopyIcon from '@mui/icons-material/FileCopy';
import type { SdkName } from './sharedTypes';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import {
useMediaQuery,
useTheme,
} from '@mui/material';
import { SingleSelectConfigButton } from '../common/DialogFormTemplate/ConfigButtons/SingleSelectConfigButton';
import { SingleSelectConfigButton } from 'component/common/DialogFormTemplate/ConfigButtons/SingleSelectConfigButton';
import EnvironmentsIcon from '@mui/icons-material/CloudCircle';
import { ArcherContainer, ArcherElement } from 'react-archer';
import { useEffect } from 'react';
import { SectionHeader, StepperBox } from './SharedComponents';
import { Stepper } from './Stepper';
import { Badge } from '../common/Badge/Badge';
import { Badge } from 'component/common/Badge/Badge';

const ChooseEnvironment = ({
environments,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { SectionHeader, StepperBox } from './SharedComponents';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import type { Sdk } from './sharedTypes';
import { Stepper } from './Stepper';
import { Badge } from '../common/Badge/Badge';
import { Badge } from 'component/common/Badge/Badge';
import { Markdown } from 'component/common/Markdown/Markdown';
import { CodeRenderer, codeRenderSnippets } from './CodeRenderer';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Suspense } from 'react';
import Loader from '../common/Loader/Loader';
import Loader from 'component/common/Loader/Loader';
import TestSdkConnection from './TestSdkConnection';
import type { Sdk } from './sharedTypes';
import { SdkConnected } from './SdkConnected';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { formatAssetPath } from 'utils/formatPath';
import { SectionHeader, StepperBox } from './SharedComponents';
import { clientSdks, type Sdk, serverSdks } from './sharedTypes';
import { Stepper } from './Stepper';
import { Badge } from '../common/Badge/Badge';
import { Badge } from 'component/common/Badge/Badge';

const SpacedContainer = styled('div')(({ theme }) => ({
padding: theme.spacing(5, 8, 8, 8),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { Avatar, Box, Link, styled, Typography } from '@mui/material';
import { SectionHeader, StepperBox } from './SharedComponents';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import { allSdks, type Sdk } from './sharedTypes';
import { formatAssetPath } from '../../utils/formatPath';
import { formatAssetPath } from 'utils/formatPath';
import { Stepper } from './Stepper';
import { Badge } from '../common/Badge/Badge';
import { Badge } from 'component/common/Badge/Badge';
import { Markdown } from 'component/common/Markdown/Markdown';
import { CodeRenderer, codeRenderSnippets } from './CodeRenderer';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box, styled, type Theme } from '@mui/material';
import { ProjectIcon } from '../common/ProjectIcon/ProjectIcon';
import { ProjectIcon } from 'component/common/ProjectIcon/ProjectIcon';
import EnvironmentsIcon from '@mui/icons-material/CloudCircle';
import CodeIcon from '@mui/icons-material/Code';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import node from '../../assets/icons/sdks/Logo-node.svg';
import go from '../../assets/icons/sdks/Logo-go.svg';
import ruby from '../../assets/icons/sdks/Logo-ruby.svg';
import php from '../../assets/icons/sdks/Logo-php.svg';
import rust from '../../assets/icons/sdks/Logo-rust.svg';
import dotnet from '../../assets/icons/sdks/Logo-net.svg';
import java from '../../assets/icons/sdks/Logo-java.svg';
import python from '../../assets/icons/sdks/Logo-python.svg';
import javascript from '../../assets/icons/sdks/Logo-javascript.svg';
import react from '../../assets/icons/sdks/Logo-react.svg';
import vue from '../../assets/icons/sdks/Logo-vue.svg';
import svelte from '../../assets/icons/sdks/Logo-svelte.svg';
import swift from '../../assets/icons/sdks/Logo-swift.svg';
import android from '../../assets/icons/sdks/Logo-android.svg';
import flutter from '../../assets/icons/sdks/Logo-flutter.svg';
import node from '../../../assets/icons/sdks/Logo-node.svg';
import go from '../../../assets/icons/sdks/Logo-go.svg';
import ruby from '../../../assets/icons/sdks/Logo-ruby.svg';
import php from '../../../assets/icons/sdks/Logo-php.svg';
import rust from '../../../assets/icons/sdks/Logo-rust.svg';
import dotnet from '../../../assets/icons/sdks/Logo-net.svg';
import java from '../../../assets/icons/sdks/Logo-java.svg';
import python from '../../../assets/icons/sdks/Logo-python.svg';
import javascript from '../../../assets/icons/sdks/Logo-javascript.svg';
import react from '../../../assets/icons/sdks/Logo-react.svg';
import vue from '../../../assets/icons/sdks/Logo-vue.svg';
import svelte from '../../../assets/icons/sdks/Logo-svelte.svg';
import swift from '../../../assets/icons/sdks/Logo-swift.svg';
import android from '../../../assets/icons/sdks/Logo-android.svg';
import flutter from '../../../assets/icons/sdks/Logo-flutter.svg';

export type SdkType = 'client' | 'frontend';
export type Sdk = { name: SdkName; type: SdkType };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ npm install @unleash/proxy-client-vue
```

2\. Initialize Unleash

```js
import { createApp } from 'vue'
import { createApp } from 'frontend/src/component/onboarding/dialog/snippets/vue'
import { plugin as unleashPlugin } from '@unleash/proxy-client-vue'
// import the root component App from a single-file component.
import App from './App.vue'

const config = {
url: '<YOUR_API_URL>',
clientKey: '<YOUR_API_TOKEN>',
refreshInterval: 15,
appName: 'unleash-onboarding-vue',
url: '<YOUR_API_URL>',
clientKey: '<YOUR_API_TOKEN>',
refreshInterval: 15,
appName: 'unleash-onboarding-vue',
}

const app = createApp(App)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
UPDATE_PROJECT,
CREATE_PROJECT_API_TOKEN,
} from 'component/providers/AccessProvider/permissions';
import { FlagCreationButton } from '../ProjectFeatureTogglesHeader/ProjectFeatureTogglesHeader';
import { FlagCreationButton } from '../../project/Project/PaginatedProjectFeatureToggles/ProjectFeatureTogglesHeader/ProjectFeatureTogglesHeader';
import ResponsiveButton from 'component/common/ResponsiveButton/ResponsiveButton';
import useProjectOverview from 'hooks/api/getters/useProjectOverview/useProjectOverview';
import { SdkExample } from './SdkExample';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { type SelectChangeEvent, styled, Typography } from '@mui/material';
import { Link } from 'react-router-dom';
import Select from 'component/common/select';
import Select from '../../common/select';
import { useState } from 'react';
import { allSdks } from '../../../../onboarding/sharedTypes';
import { allSdks } from '../dialog/sharedTypes';

const TitleContainer = styled('div')(({ theme }) => ({
display: 'flex',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ import { AvatarCell } from './AvatarCell';
import { useUiFlag } from 'hooks/useUiFlag';
import { styled } from '@mui/material';
import useProjectOverview from 'hooks/api/getters/useProjectOverview/useProjectOverview';
import { ConnectSdkDialog } from '../../../onboarding/ConnectSdkDialog';
import { ProjectOnboarding } from './ProjectOnboarding/ProjectOnboarding';
import { ConnectSdkDialog } from '../../../onboarding/dialog/ConnectSdkDialog';
import { ProjectOnboarding } from '../../../onboarding/flow/ProjectOnboarding';
import { useLocalStorageState } from 'hooks/useLocalStorageState';

interface IPaginatedProjectFeatureTogglesProps {
Expand Down

0 comments on commit 4397af0

Please sign in to comment.