Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

mayuran/DPROD-3544/accumulator-update #7208

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
06b04eb
feat: option revamp
konstantinosG-deriv Feb 26, 2024
7cd5ebb
Merge branch 'master' into translation-3600-options-revamp-part-1
konstantinosG-deriv Feb 26, 2024
5163c6d
feat: change description
konstantinosG-deriv Feb 26, 2024
c38cecb
Merge branch 'translation-3600-options-revamp-part-1' of github.com:k…
konstantinosG-deriv Feb 26, 2024
5f7f068
auto-pull-translation
konstantinosG-deriv Feb 27, 2024
d0be745
feat: master merge and fix sonarcloud error
konstantinosG-deriv Feb 27, 2024
fbec01f
auto-pull-translation
konstantinosG-deriv Feb 27, 2024
83c53b6
translation: 📚 sync translations from crowdin feature branch
DerivFE Feb 27, 2024
9cab92d
fix: translations trigger empty commit
konstantinosG-deriv Feb 27, 2024
945ccfb
fix: translations trigger empty commit
konstantinosG-deriv Feb 27, 2024
fed8c2f
fix: translations on questions
konstantinosG-deriv Feb 27, 2024
e3a1bdc
fix: translation for button
konstantinosG-deriv Feb 27, 2024
e613127
auto-pull-translation
konstantinosG-deriv Feb 27, 2024
573ca90
translation: 📚 sync translations from crowdin feature branch
DerivFE Feb 27, 2024
86582a2
fix: review comments
konstantinosG-deriv Feb 28, 2024
41884b3
fix: slider for mobile
konstantinosG-deriv Feb 29, 2024
949b01c
feat: master merge
konstantinosG-deriv Feb 29, 2024
aa109d2
feat: master merge
konstantinosG-deriv Feb 29, 2024
5965171
fix: initial accumulator page
mayuran-deriv Feb 29, 2024
573c77e
fix: image issue
mayuran-deriv Mar 1, 2024
2764b31
fix: image change
mayuran-deriv Mar 1, 2024
8406e31
auto-pull-translation
mayuran-deriv Mar 1, 2024
65e9016
translation: 📚 sync translations from crowdin feature branch
DerivFE Mar 1, 2024
59b72a9
fix: remove script
mayuran-deriv Mar 1, 2024
a9ac4ba
Merge branch 'translation-008866-accumulator-branch' of github.com:ma…
mayuran-deriv Mar 1, 2024
3741e9f
chore: trigger vercel
mayuran-deriv Mar 1, 2024
672f709
fix: img
mayuran-deriv Mar 1, 2024
68948c4
fix: trade hub button
mayuran-deriv Mar 4, 2024
fbc976e
fix: remove unwanted code
mayuran-deriv Mar 4, 2024
f690ef0
fix: sub tasks
mayuran-deriv Mar 5, 2024
0ea4790
fix: id added
mayuran-deriv Mar 6, 2024
bf5f96e
fix: packages updated
mayuran-deriv Mar 6, 2024
71a517c
fix: try
mayuran-deriv Mar 7, 2024
c6f706c
fix: try float
mayuran-deriv Mar 7, 2024
1f2797a
fix: float
mayuran-deriv Mar 7, 2024
46ed5b5
fix: float
mayuran-deriv Mar 8, 2024
6affb9c
chore: trigger vercel
mayuran-deriv Mar 8, 2024
603f62b
fix: floating in options
mayuran-deriv Mar 8, 2024
6d0085a
auto-pull-translation
mayuran-deriv Mar 8, 2024
62133ef
Merge branch 'master' of github.com:binary-com/deriv-com into transla…
mayuran-deriv Mar 8, 2024
a182c13
auto-pull-translation
mayuran-deriv Mar 8, 2024
a4a8055
translation: 📚 sync translations from crowdin feature branch
DerivFE Mar 8, 2024
a0a513b
auto-pull-translation
mayuran-deriv Mar 8, 2024
47781b2
translation: 📚 sync translations from crowdin feature branch
DerivFE Mar 8, 2024
2fd7e03
chore: trigger vercel
mayuran-deriv Mar 10, 2024
05237e5
Merge branch 'translation-008866-accumulator-branch' of github.com:ma…
mayuran-deriv Mar 10, 2024
7dd0bd7
Merge branch 'master' of github.com:binary-com/deriv-com into transla…
mayuran-deriv Mar 11, 2024
bfc8522
fix: tab padding
mayuran-deriv Mar 11, 2024
60797f6
auto-pull-translation
mayuran-deriv Mar 11, 2024
6b058af
translation: 📚 sync translations from crowdin feature branch
DerivFE Mar 11, 2024
dc93ab6
fix: redirection
mayuran-deriv Mar 11, 2024
317fbfb
Merge branch 'translation-008866-accumulator-branch' of github.com:ma…
mayuran-deriv Mar 11, 2024
6edcc3b
fix: gap
mayuran-deriv Mar 11, 2024
1612304
fix: font sixe
mayuran-deriv Mar 11, 2024
acd1900
fix: options layout
mayuran-deriv Mar 11, 2024
df204c4
fix: text color
mayuran-deriv Mar 11, 2024
7a21db9
fix: color
mayuran-deriv Mar 11, 2024
c9e9db7
Merge branch 'master' of github.com:binary-com/deriv-com into transla…
mayuran-deriv Mar 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 33 additions & 55 deletions crowdin/messages.json

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"@artsy/fresnel": "^6.2.1",
"@builder.io/partytown": "^0.8.1",
"@deriv-com/analytics": "^1.4.11",
"@deriv-com/blocks": "^0.87.0",
"@deriv-com/components": "^0.52.0",
"@deriv-com/blocks": "^0.111.0",
"@deriv-com/components": "^0.57.0",
"@deriv-com/hooks": "^0.11.0",
"@deriv-com/providers": "^0.12.0",
"@deriv/deriv-api": "^1.0.13",
"@deriv/quill-design": "^1.2.16",
"@deriv/quill-icons": "^1.17.3",
"@deriv/quill-design": "^1.2.18",
"@deriv/quill-icons": "^1.19.2",
"@hookform/resolvers": "^3.3.2",
"@livechat/customer-sdk": "^3.1.5",
"@loadable/component": "^5.15.3",
Expand All @@ -24,6 +24,8 @@
"@svgr/webpack": "^8.1.0",
"@tanstack/react-table": "^8.10.7",
"@vercel/gatsby-plugin-vercel-builder": "^0.1.2",
"@zxcvbn-ts/core": "^3.0.4",
"@zxcvbn-ts/language-common": "^3.0.4",
"cli-select": "^1.1.2",
"clsx": "^1.2.1",
"commander": "^8.3.0",
Expand Down Expand Up @@ -81,9 +83,7 @@
"use-query-params": "^1.2.3",
"usehooks-ts": "^2.9.1",
"webpack": "^5.89.0",
"yup": "^1.3.2",
"@zxcvbn-ts/core": "^3.0.4",
"@zxcvbn-ts/language-common": "^3.0.4"
"yup": "^1.3.2"
},
"devDependencies": {
"@commitlint/cli": "^16.3.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,82 @@
import React from 'react'
import { options_heading_section } from './styles.module.scss'
import Flex from 'features/components/atoms/flex-box'
import Typography from 'features/components/atoms/typography'
import { Hero } from '@deriv-com/blocks'
// eslint-disable-next-line import/no-unresolved
import { v4 as uuidv4 } from 'uuid'
import { Text, Heading, Button } from '@deriv/quill-design'
import { Localize } from 'components/localization'
import { TString } from 'types/generics'
import Label from 'features/components/atoms/label'
import useScrollToElement from 'features/hooks/use-scroll-to-element'
import TradersHubCtaButton from 'features/components/molecules/traders-hub-cta-button'
import { useFloatingCtaContext } from 'features/contexts/floating-cta/cta.provider'
import FloatingCta from 'features/pages/home/hero/floating-cta'

interface WhatAreDigitalOptionsProps {
heading: TString
description: TString
is_coming_soon: boolean
has_content_block: boolean
}

const WhatAreDigitalOptions = ({
heading,
description,
is_coming_soon,
has_content_block,
}: WhatAreDigitalOptionsProps) => {
const clickToScrollHandler = useScrollToElement('faqs', -100)
const uniq = `navbuttons_uniq_class_${uuidv4()}`
const { ctaBottom, visibilityPercentage, entryRef } = useFloatingCtaContext()

return (
<Flex.Box
justify="center"
align="center"
direction="col"
padding_block="12x"
md={{ padding_block: '20x' }}
gap={'8x'}
className={options_heading_section}
>
{is_coming_soon && (
<Label text="_t_Available on Demo accounts only_t_" bgcolor="blue" />
<>
<Hero.ContentLess
className="px-800 md:px-1200 lg:px-gap-none"
description={
<Text className="leading-6">
<Localize translate_text={description} />
</Text>
}
title={
<Heading>
<Localize translate_text={heading} />
</Heading>
}
>
{is_coming_soon && (
<Label text="_t_Available on Demo accounts only_t_" bgcolor="blue" />
)}
{has_content_block && (
<div
className="flex flex-col items-center gap-400 md:!flex-row md:justify-center"
id={uniq}
>
<TradersHubCtaButton
ref={entryRef}
className="w-full md:!w-auto"
size="lg"
/>
<Button
size="lg"
variant="secondary"
colorStyle="black"
className="w-full md:!w-auto hover:!bg-solid-slate-50 sm:hover:!bg-opacity-black-100"
onClick={clickToScrollHandler}
>
<Localize translate_text="_t_Read FAQs_t_" />
</Button>
</div>
)}
</Hero.ContentLess>
{has_content_block && (
<FloatingCta
style={{
transform: `translateY(${visibilityPercentage - 100}%)`,
bottom: `${-68 + ctaBottom}px`,
}}
/>
)}
<Typography.Heading align="center" as="h1">
<Localize translate_text={heading} />
</Typography.Heading>
<Typography.Paragraph align="center">
<Localize translate_text={description} />
</Typography.Paragraph>
</Flex.Box>
</>
)
}

Expand Down
42 changes: 42 additions & 0 deletions src/features/components/quill/options-layout/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import React, { ReactNode } from 'react'
import MainRowNavigation from '../../templates/navigation/main-nav'
import Layout from '../quill-layout'
import MainFooter from 'features/components/templates/footer'
import { TString } from 'types/generics'
import OptionsTopTab from 'features/components/organisms/options-top-tab'
import WhatAreDigitalOptions from 'features/components/organisms/what-are-digital-options'

interface OptionsLayoutProps {
children?: ReactNode
heading: TString
description: TString
is_coming_soon?: boolean
has_content_block?: boolean
}

const OptionsLayout = ({
heading,
description,
children,
is_coming_soon = false,
has_content_block = false,
}: OptionsLayoutProps) => {
return (
<>
<Layout>
<MainRowNavigation />
<OptionsTopTab />
<WhatAreDigitalOptions
heading={heading}
description={description}
is_coming_soon={is_coming_soon}
has_content_block={has_content_block}
/>
{children}
<MainFooter />
</Layout>
</>
)
}

export default OptionsLayout
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useEffect, useState, useRef } from 'react'
import { Breadcrumbs } from '@deriv-com/components'
import { SwiperSlide, Swiper } from 'swiper/react'
import SwiperCore, { Navigation } from 'swiper'
import NavigationTabMenu from '../../tabs/navigation-menu'
Expand Down Expand Up @@ -46,6 +47,19 @@ const NavigationTabWithoutBorder = ({ tab_data }: NavigationTabWithoutBorderType

return (
<Container.Fluid pt="25x">
<Breadcrumbs
className="py-general-md mt-600 ml-400"
links={[
{
content: 'Home',
href: '/',
},
{
content: 'Options',
href: '/trade-types/options',
},
]}
/>
<Flex.Box
padding_block="10x"
gap="6x"
Expand Down
31 changes: 18 additions & 13 deletions src/features/components/templates/options-layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,33 @@ interface OptionsLayoutProps {
heading: TString
description: TString
is_coming_soon?: boolean
has_content_block?: boolean
}

const OptionsLayout = ({
heading,
description,
children,
is_coming_soon = false,
has_content_block = false,
}: OptionsLayoutProps) => {
return (
<Layout>
<MainRowNavigation />
<OptionsTopTab />
<WhatAreDigitalOptions
heading={heading}
description={description}
is_coming_soon={is_coming_soon}
/>
{children}
<WhyTradeOptions data={why_trade_options_data} />
<StartTrading data={start_trading_data} />
<MainFooter />
</Layout>
<>
<Layout>
<MainRowNavigation />
<OptionsTopTab />
<WhatAreDigitalOptions
heading={heading}
description={description}
is_coming_soon={is_coming_soon}
has_content_block={has_content_block}
/>
{children}
<WhyTradeOptions data={why_trade_options_data} />
<StartTrading data={start_trading_data} />
<MainFooter />
</Layout>
</>
)
}

Expand Down
62 changes: 62 additions & 0 deletions src/features/pages/options/accumulator/_video-schema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { localize } from 'components/localization'

type VideoSchemaType = {
'@context': string
'@type': string
name: string
description: string
thumbnailUrl: string[]
uploadDate: string
duration: string
contentUrl: string
embedUrl: string
interactionStatistic: {
'@type': string
interactionType: { '@type': string }
userInteractionCount: number
}
regionsAllowed: string
}

export const accumulator_options_video_schema: VideoSchemaType = {
'@context': 'https://schema.org',
'@type': 'VideoObject',
name: localize('_t_Accumulator options_t_'),
description: '',
thumbnailUrl: [
'https://i.vimeocdn.com/video/1802590890-87dbeab783be62940dae5798d760708f253c9abcfe63c990fe1d6ba30745fb45-d_100x75',
' https://i.vimeocdn.com/video/1802590890-87dbeab783be62940dae5798d760708f253c9abcfe63c990fe1d6ba30745fb45-d_200x150',
'https://i.vimeocdn.com/video/1802590890-87dbeab783be62940dae5798d760708f253c9abcfe63c990fe1d6ba30745fb45-d_640',
],
uploadDate: '2024-02-22 03:39:43',
duration: 'PT1M54S',
contentUrl: 'https://vimeo.com/915479906',
embedUrl: 'https://player.vimeo.com/video/915479906',
interactionStatistic: {
'@type': 'InteractionCounter',
interactionType: { '@type': 'WatchAction' },
userInteractionCount: 5647018,
},
regionsAllowed: '',
}
export const how_to_trade_video_schema: VideoSchemaType = {
'@context': 'https://schema.org',
'@type': 'VideoObject',
name: 'How to trade accumulator options on Deriv Trader',
description: '',
thumbnailUrl: [
'https://i.vimeocdn.com/video/1805100037-7bedb6314f58f350105dcd055eef2c649e04a922813fb17453e8d76b0e179037-d_100x75',
'https://i.vimeocdn.com/video/1805100037-7bedb6314f58f350105dcd055eef2c649e04a922813fb17453e8d76b0e179037-d_200x150',
'https://i.vimeocdn.com/video/1805100037-7bedb6314f58f350105dcd055eef2c649e04a922813fb17453e8d76b0e179037-d_640',
],
uploadDate: '2024-02-27T02:22:29+08:00',
contentUrl: 'https://vimeo.com/917007011',
embedUrl: 'https://player.vimeo.com/video/917007011',
duration: 'PT1M54S',
interactionStatistic: {
'@type': 'InteractionCounter',
interactionType: { '@type': 'WatchAction' },
userInteractionCount: 5647018,
},
regionsAllowed: '',
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import 'features/styles/theme/variables';

.accordion_border{
border-bottom: 2px solid var(--color-grey-45) ;
}
Loading
Loading