Skip to content

Commit

Permalink
Welcome Page WebUI: Move brave-ui paths to brave-core paths
Browse files Browse the repository at this point in the history
  • Loading branch information
cezaraugusto authored and petemill committed Jul 23, 2019
1 parent 1f6856c commit bc8819d
Show file tree
Hide file tree
Showing 36 changed files with 65 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */

import { ComponentType } from 'react'
import styled, { css } from '../../../theme'
import Button, { Props as ButtonProps } from '../../../components/buttonsIndicators/button'
import styled, { css } from 'brave-ui/theme'
import Button, { Props as ButtonProps } from 'brave-ui/components/buttonsIndicators/button'

interface BaseButtonProps {
active?: boolean
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */

import styled, { css } from '../../../theme'
import palette from '../../../theme/colors'
import styled, { css } from 'brave-ui/theme'
import palette from 'brave-ui/theme/colors'
import caratUrl from './carat.svg'

export interface SelectBoxProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */

import styled from 'styled-components'
import { Heading } from '../../../index'
import Heading from 'brave-ui/components/text/heading'

export const Title = styled(Heading)`
font-size: 28px;
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions components/brave_welcome_ui/containers/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { bindActionCreators, Dispatch } from 'redux'
import { connect } from 'react-redux'

// Feature-specific components
import { Page, Panel, SlideContent } from 'brave-ui/features/welcome'
import { Page, Panel, SlideContent } from '../components'

// Component groups
import WelcomeBox from './screens/welcomeBox'
Expand All @@ -19,7 +19,7 @@ import ThemeBox from './screens/themeBox'
import FooterBox from './screens/footerBox'

// Images
import { Background, BackgroundContainer } from 'brave-ui/features/welcome/images'
import { Background, BackgroundContainer } from '../components/images'

// Utils
import * as welcomeActions from '../actions/welcome_actions'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
SkipButton,
FooterButton,
Bullet
} from 'brave-ui/features/welcome'
} from '../../components'

// Shared components
import { ArrowRightIcon } from 'brave-ui/components/icons'
Expand Down
10 changes: 7 additions & 3 deletions components/brave_welcome_ui/containers/screens/importBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
import * as React from 'react'

// Feature-specific components
import { Content, Title, Paragraph, PrimaryButton, SelectGrid, SelectBox } from 'brave-ui/features/welcome'
import { Content, Title, Paragraph, PrimaryButton, SelectGrid, SelectBox } from '../../components'

// Images
import { WelcomeImportImage } from 'brave-ui/features/welcome/images'
import { WelcomeImportImage } from '../../components/images'

// Utils
import { getLocale } from '../../../common/locale'
import { getSelectedBrowserProfile, getSourceBrowserProfileIndex, isValidBrowserProfiles } from '../../welcomeUtils'
import {
getSelectedBrowserProfile,
getSourceBrowserProfileIndex,
isValidBrowserProfiles
} from '../../welcomeUtils'

export interface Props {
index: number
Expand Down
4 changes: 2 additions & 2 deletions components/brave_welcome_ui/containers/screens/rewardsBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import * as React from 'react'

// Feature-specific components
import { Content, Title, Paragraph, PrimaryButton } from 'brave-ui/features/welcome'
import { Content, Title, Paragraph, PrimaryButton } from '../../components'

// Images
import { WelcomeRewardsImage } from 'brave-ui/features/welcome/images'
import { WelcomeRewardsImage } from '../../components/images'

// Utils
import { getLocale } from '../../../common/locale'
Expand Down
4 changes: 2 additions & 2 deletions components/brave_welcome_ui/containers/screens/searchBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import * as React from 'react'

// Feature-specific components
import { Content, Title, Paragraph, PrimaryButton, SelectGrid, SelectBox } from 'brave-ui/features/welcome'
import { Content, Title, Paragraph, PrimaryButton, SelectGrid, SelectBox } from '../../components'

// Images
import { WelcomeSearchImage } from 'brave-ui/features/welcome/images'
import { WelcomeSearchImage } from '../../components/images'

// Utils
import { getLocale } from '../../../common/locale'
Expand Down
4 changes: 2 additions & 2 deletions components/brave_welcome_ui/containers/screens/shieldsBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import * as React from 'react'

// Feature-specific components
import { Content, Title, Paragraph } from 'brave-ui/features/welcome'
import { Content, Title, Paragraph } from '../../components'

// Utils
import { getLocale } from '../../../common/locale'

// Images
import { WelcomeShieldsImage } from 'brave-ui/features/welcome/images'
import { WelcomeShieldsImage } from '../../components/images'

interface Props {
index: number
Expand Down
4 changes: 2 additions & 2 deletions components/brave_welcome_ui/containers/screens/themeBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import * as React from 'react'

// Feature-specific components
import { Content, Title, Paragraph, PrimaryButton } from 'brave-ui/features/welcome'
import { Content, Title, Paragraph, PrimaryButton } from '../../components'

// Images
import { WelcomeThemeImage } from 'brave-ui/features/welcome/images'
import { WelcomeThemeImage } from '../../components/images'

// Utils
import { getLocale } from '../../../common/locale'
Expand Down
4 changes: 2 additions & 2 deletions components/brave_welcome_ui/containers/screens/welcomeBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import * as React from 'react'

// Feature-specific components
import { Content, Title, Paragraph, PrimaryButton } from 'brave-ui/features/welcome'
import { Content, Title, Paragraph, PrimaryButton } from '../../components'

// Shared components
import { ArrowRightIcon } from 'brave-ui/components/icons'

// Images
import { WelcomeLionImage } from 'brave-ui/features/welcome/images'
import { WelcomeLionImage } from '../../components/images'

// Utils
import { getLocale } from '../../../common/locale'
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
import * as React from 'react'

// Feature-specific components
import {
Page,
Panel,
SlideContent
} from '../../../../src/features/welcome/'
import { Page, Panel, SlideContent } from '../../components'

// Component groups
import WelcomeBox from './screens/welcomeBox'
Expand All @@ -21,11 +17,7 @@ import ThemeBox from './screens/themeBox'
import FooterBox from './screens/footerBox'

// Images
import { Background, BackgroundContainer } from '../../../../src/features/welcome/images'

// Fonts
import '../../../assets/fonts/muli.css'
import '../../../assets/fonts/poppins.css'
import { Background, BackgroundContainer } from '../../components/images'

export interface State {
currentScreen: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import {
SkipButton,
FooterButton,
Bullet
} from '../../../../../src/features/welcome/'
} from '../../../components'

// Shared components
import { ArrowRightIcon } from '../../../../../src/components/icons'
import { ArrowRightIcon } from 'brave-ui/components/icons'

// Utils
import locale from '../fakeLocale'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@
import * as React from 'react'

// Feature-specific components
import { Content, Title, Paragraph, PrimaryButton, SelectGrid } from '../../../../../src/features/welcome/'
import { SelectBox } from '../../../../../src/features/welcome'
import {
Content,
Title,
Paragraph,
PrimaryButton,
SelectGrid,
SelectBox
} from '../../../components'

// Utils
import locale from '../fakeLocale'

// Images
import { WelcomeImportImage } from '../../../../../src/features/welcome/images'
import { WelcomeImportImage } from '../../../components/images'

interface Props {
index: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import * as React from 'react'

// Feature-specific components
import { Content, Title, Paragraph, PrimaryButton } from '../../../../../src/features/welcome/'
import { Content, Title, Paragraph, PrimaryButton } from '../../../components'

// Utils
import locale from '../fakeLocale'

// Images
import { WelcomeRewardsImage } from '../../../../../src/features/welcome/images'
import { WelcomeRewardsImage } from '../../../components/images'

interface Props {
index: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,20 @@
import * as React from 'react'

// Feature-specific components
import { Content, Title, Paragraph, SelectGrid, PrimaryButton } from '../../../../../src/features/welcome/'
import { SelectBox } from '../../../../../src/features/welcome'
import {
Content,
Title,
Paragraph,
SelectGrid,
PrimaryButton,
SelectBox
} from '../../../components'

// Utils
import locale from '../fakeLocale'

// Images
import { WelcomeSearchImage } from '../../../../../src/features/welcome/images'
import { WelcomeSearchImage } from '../../../components/images'

interface Props {
index: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import * as React from 'react'

// Feature-specific components
import { Content, Title, Paragraph } from '../../../../../src/features/welcome/'
import { Content, Title, Paragraph } from '../../../components'

// Utils
import locale from '../fakeLocale'

// Images
import { WelcomeShieldsImage } from '../../../../../src/features/welcome/images'
import { WelcomeShieldsImage } from '../../../components/images'

interface Props {
index: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import * as React from 'react'

// Feature-specific components
import { Content, Title, Paragraph, PrimaryButton } from '../../../../../src/features/welcome/'
import { Content, Title, Paragraph, PrimaryButton } from '../../../components'

// Utils
import locale from '../fakeLocale'

// Images
import { WelcomeThemeImage } from '../../../../../src/features/welcome/images'
import { WelcomeThemeImage } from '../../../components/images'

interface Props {
index: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
import * as React from 'react'

// Feature-specific components
import { Content, Title, Paragraph, PrimaryButton } from '../../../../../src/features/welcome/'
import { Content, Title, Paragraph, PrimaryButton } from '../../../components'

// Shared components
import { ArrowRightIcon } from '../../../../../src/components/icons'
import { ArrowRightIcon } from 'brave-ui/components/icons'

// Utils
import locale from '../fakeLocale'

// Images
import { WelcomeLionImage } from '../../../../../src/features/welcome/images'
import { WelcomeLionImage } from '../../../components/images'

interface Props {
index: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
import * as React from 'react'
import { storiesOf } from '@storybook/react'
import { withKnobs, boolean } from '@storybook/addon-knobs'
import { FullPageStory } from '../../storyUtils'
// Components
import WelcomePage from './page/index'

storiesOf('Feature Components/Welcome', module)
.addDecorator(FullPageStory)
storiesOf('Welcome', module)
.addDecorator(withKnobs)
.add('Page', () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion components/brave_welcome_ui/welcomeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import { Dispatch } from 'redux'
import { getSearchEngineProvidersSuccess, getBrowserProfilesSuccess } from './actions/welcome_actions'
import { State as ImportBoxState } from '../brave_welcome_ui/components/screens/importBox'
import { State as ImportBoxState } from './containers/screens/importBox'

// Search box

Expand Down
2 changes: 1 addition & 1 deletion components/test/brave_welcome_ui/components/app_test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { welcomeInitialState } from '../../testData'
import {
WelcomePage,
mapStateToProps
} from '../../../brave_welcome_ui/components/app'
} from '../../../../components/brave_welcome_ui/containers/app'

describe('welcomePage component', () => {
describe('mapStateToProps', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

import * as React from 'react'
import { shallow } from 'enzyme'
import { Content, PrimaryButton } from 'brave-ui/features/welcome'
import { WelcomeImportImage } from 'brave-ui/features/welcome/images'
import ImportBox, { Props } from '../../../../components/brave_welcome_ui/components/screens/importBox'
import { Content, PrimaryButton } from '../../../../components/brave_welcome_ui/components'
import { WelcomeImportImage } from '../../../../components/brave_welcome_ui/components/images'
import ImportBox, { Props } from '../../../../components/brave_welcome_ui/containers/screens/importBox'
import { mockImportSources } from '../../testData'

describe('ImportBox component tests', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

import * as React from 'react'
import { shallow } from 'enzyme'
import { Content } from 'brave-ui/features/welcome'
import { WelcomeSearchImage } from 'brave-ui/features/welcome/images'
import SearchBox, { Props } from '../../../../components/brave_welcome_ui/components/screens/searchBox'
import { Content } from '../../../../components/brave_welcome_ui/components'
import { WelcomeSearchImage } from '../../../../components/brave_welcome_ui/components/images'
import SearchBox, { Props } from '../../../../components/brave_welcome_ui/containers/screens/searchBox'
import { mockSearchProviders } from '../../testData'

describe('searchBox component tests', () => {
Expand Down

0 comments on commit bc8819d

Please sign in to comment.