Skip to content

Commit

Permalink
Bot Squad / New DBot Homepage (#6496)
Browse files Browse the repository at this point in the history
* Feature  develop dashboard tabs (#6265)

* feature--dashboard-UI

* added ternary for the main content

* Rupato New Dashboard -- removed console

* updated package-lock

* package lock json changes

* new-package-lock-json

* implemented joyride and ui tour guide development

* added react-joyride

* Added chart tab in new dbot-homepage

* resolved merge conflict and added beacon disable property

* fix for screen width

* added mobx and changes in joyride config

* added updated icon.js

* Worked on bot-builder and added toolbar & toolbox within it

* Worked on bot-builder

* Worked on bot-builder and added toolbar & toolbox within it

* updated icon package

* added icon package

* Fixed icons and resequenced tabs

* added run-panel to the dashboard

* created dashboard store to manage the tab state

* added sidebar and and tutorials UI and also cardpopup functionality

* converted to typescript joyride config

* changes for type in typescript

* Removed duplicate imports

* Fixed imports

* Removed unused components and placed run stretegy button on its place

* refactored dashboard component

* fix for code smells

* made suggested changes

* resolved merge conflict package.lock.json

* regenerated package.lock.json due to merge conflict

* changed file names

* resolved merge conflict

* removed dashboard tsx file

* fix for eslint

* removed sidebar and dashboard.tsx

* added sidebar and dashboard.tsx fiels

* removed translations file

* added translations file

* fix for mobx make observable

* Update packages/bot-web-ui/src/components/toolbar/runStrategy.tsx

Co-authored-by: Matin shafiei <matin@binary.com>

* Update packages/bot-web-ui/package.json

Co-authored-by: Matin shafiei <matin@binary.com>

* Update packages/bot-web-ui/src/components/dashboard/dashboard-components/index.scss

Co-authored-by: Matin shafiei <matin@binary.com>

* Update packages/components/src/components/icon/icons.js

Co-authored-by: Matin shafiei <matin@binary.com>

* fixed review comments

* fixed review comments

* fix for prettier on circle CI

* refactored component and updated typescript related definitions

* fixed typo and added react mouseevent

* run strategy position fix

* updated types in toolbar and joyride config

* run panel implementation and intro sidebar fix

* Did final refactoring of the components

* removed pacakge-lock and fixed casing in joyride config

* removed inline css

* Improvised code worked on the comments

* added eslint-disable no-unused-expression

* refactored db dashboard tab component

* typo fixes

* Removed redundunt joyride config

Co-authored-by: Sandeep <sandeep@deriv.com>
Co-authored-by: Sandeep Rajput <90243468+sandeep-deriv@users.noreply.github.com>
Co-authored-by: Farabi <102643568+farabi-deriv@users.noreply.github.com>
Co-authored-by: Matin shafiei <matin@binary.com>
Co-authored-by: Farabi <farabi@Farabi-Chowdhurys-MacBook-Pro-C02X37B9JG5H-Rapid-7-Test.local>

* removed endpoint option and made dashboard as default homepage (#6543)

* removed endpoint option and made dashboard as default homepage

* removed unsed components

* made dashboard page as the deafult route

* made dashboard page as the deafult route

* made dashboard page as the deafult route

* made dashboard page as the deafult route

* removed imports from app.jsx and used common import

* fixed review comments

* fixed review comments

* MaryiaF/feat: Quick Strategy as per new design (#6246)

* MaryiaF/feat: Quick Strategy

* MaryiaF/feat: create components for Quick Strategy

* feat: update implementation of the QStrategy form, create a new select for type of strategy

* feat: create reusable field for the form

* MaryiaF/feat: update data and properties for the reusable fields, implementation reusable methods, optimization of the code

* MaryiaF/fix: the issue when the field is undefined

* MaryiaF/fix: uniq input field for all types of strategies, renaming nessesary variables, replacing duplicate conditions with reusable methods

* MaryiaF/fix: setActiveTabIndex() rename to setActiveTypeStrategyIndex() in order to keep the previous implementation of the form and the new one working

* MaryiaF/refactor: improve reusable methods and cases, remove unnessesary methods for new design, code optimization

* MaryiaF/feat: optimize Field component for most of possible cases

* MaryiaF/refactor: form component, splite to SelectField component

* MaryiaF/refactor: form component, splite to SelectField component

* MaryiaF/refactor: improve the implementation of fields

* MaryiaF/chore: move the folder of q-strategy to dashboard

* MaryiaF/refactor: add types with TypeScript for components QStrategy and QStrategyContainer

* MaryiaF/refactor: add TS for common_inputs_properties object

* MaryiaF/refactor: add types for q-strategy, market-option, footer, form, trade-type-option components and for objects

* MaryiaF/fix: issues of TS of all components

* MaryiaF/chore: remove unused variables

* MaryiaF/chore: remove duplicated component SelectField

* MaryiaF/chore: remove unused remaining variables

* MaryiaF/refactor: add type for initial_values of the form with TS

* MaryiaF/refactor: improve InputField component of the form to more reusable

* MaryiaF/feat: add styles as per new design for the Quick strategy form

* MaryiaF/chore: remove unnessesary variables, fix styles of active item of the strategy of the select component

* MaryiaF/fex: to memoize components and avoid unnecessary re-renders

* MaryiaF/feat: validation all fields, refactoring re-renders

* MaryiaF/chore: remove unnecessary methods from the store quick-strategy-store

* MaryiaF/chore: fix consistent-return issue

* MaryiaF/fix: Eslint issues, console issues, TS issues

* MaryiaF/refactor: add types for store quick-strategy-store

* MaryiaF/feat: add by click button quick strategy open q-strategy form on the mobile, refactoring/fixing styles after pull changes

* MaryiaF/fix: types of quick-strategy-store

* MaryiaF/fix: rename functions, variables as per convention, fix types of TS

* MaryiaF/fix: remove matching 01 of the fields

* MaryiaF/refactor: jsx elements + add TODO for the future in the store quick-strategy-store.ts

* MaryiaF/refactor: rename files

* MaryiaF/chore: remove unnecessary types

* MaryiaF/fix: method createStrategy()

* MaryiaF/refactor: type of the RootStore in the QuickStrategy store

* MaryiaF/fix: add triggers on the form QStrategy for button "run/create and edit"

* MaryiaF/feat: form alight to the centre when the performance panel collapped

* MaryiaF/chore: rename components to full name

* MaryiaF/chore: remove unnecessary property of objects(id and name are the same)

* MaryiaF/chore: rename variables as per code convension

* MaryiaF/chore: remove unnecessary extra fragment

* MaryiaF/chore: rename variables as per convention

* MaryiaF/refactor: expressions

* Sandeep/dbot homepage fix conflicts (#6654)

* Adrienne / Changed border bottom color for order details page in responsive for dark mode (#6221)

* changed border bottom color for order details

* Changed border bottom color for buy-sell modal

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* hamid/65032/migrate-deposit-to-ts (#6307)

* Migrate Deposit to TS

* Remove package-lock.json

* Fix test errors

* Change data-testid name

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* hamid/74066/migrate-shared-components-to-ts (#6342)

* Migrate Error to TS

* Migrate ResendEmailButtonWrapper to TS

* Migrate SideNote to TS

* Migrate USDTSideNote to TS

* Fix typo

* Rename RootStore to TRootStore

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* Farzin/73307/TS migration of deposit related stores (#6262)

* update MobX libraries

* bot migration

* trader migration

* core migration

* cfd migration

* p2p migration

* cashier migration

* regenerate package-lock.json

* fix verification store issue on cashier

* temperately commented failed tests to find a solution

* fix console errors related to mobx

* regenerate package-lock.json

* fix general store issue on p2p

* bug: fix p2p stores bugs

* fix console errors

* fix: Open position blinking while there is active contract going on

* perf(cashier): add types for client, common, ui stores; refactor Types folder structure

* perf(cashier): add types in client, ui stores

* refactor(cashier): refactor root-store declaration into type

* refactor(cashier): refactor naming

* fix: blinking issue

* fix: nitpik

* feat(cashier): :construction: migrate `ErrorStore` to TypeScript

* fix bot issue

* feat(cashier): :construction: migrate `IframeStore` to TypeScript

* feat(cashier): :construction: migrate `DepositStore` to TypeScript

* chores: change @deriv/deriv-charts versions

* fix(cashier): :bug: fix `tsconfig`

* fix(cashier): :memo: resolve PR comments

* fix(cashier): :memo: resolve PR comments

* fix(cashier): :memo: resolve PR comments

* fix(cashier): :memo: resolve PR comments

* refactor(cashier): :coffin: remove `container` as a prop in `setIframeUrl` method

* fix(cashier): :memo: resolve merge conflicts

* fix(cashier): :memo: resolve merge conflicts

Co-authored-by: Niloofar Sadeghi <niloofar.sadeghi@firstsource.tech>
Co-authored-by: george-usynin-binary <heorhi@binary.com>
Co-authored-by: George Usynin <103181646+george-usynin-binary@users.noreply.github.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* Farzin/73507/Duplicate ads shown on "My ad" page in DP2P,  after you edit and close the sell ad. (#6222)

* fix(dp2p): :bug: fix duplicated adverts issue in my ads tab

* Trigger Build

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* likhith/fixed rerouting to p2p from cashier dashboard (#6244)

* fix: refactored condition that resets the route

* fix: failing test cases

* merged master

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* yauheni/74104/ts migration for account DemoMessage component (#6346)

Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* yauheni/74383/ converting app.jsx in account to functional component (#6282)

* yauheni/74383/ converting app in account to functional component

* converted to tsx with rootstore

* added todo for future types implementation

Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: Matin shafiei <matin@deriv.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* yauheni/74189/ts_migration_text_container-deleted_being_unused (#6378)

Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* feat: added configuration for account package migration (#6419)

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* Revert "yauheni/74383/ converting app.jsx in account to functional component (#6282)" (#6612)

This reverts commit e1fc3e8af2bc0bfefa3427e0bcf257300563755c.

* Revert "feat: added configuration for account package migration (#6419)" (#6613)

This reverts commit d9974cbd6606f5f4d528d1ed165f473ce1930329.

* translations: 📚 sync translations with crowdin (#6614)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* Update to single quote (#6618)

* translations: 📚 sync translations with crowdin (#6619)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* Revert "sandeep/65842/unifiy-websocket -- using the same websocket instance from the core … (#6555)" (#6623)

This reverts commit e2b3d2e2f6cdd2b1af097ce14f84d3bf03baf87f.

* translations: 📚 sync translations with crowdin (#6624)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* P2P / Feature - Blocked advertiser (#6006)

* create feature branch

* Ameerul /Task 65488 Reusable modal to block advertiser (#5589)

* changed the margin-top for mobile view for buy-sell

* merging upstream master

* merge with local

* added new component (modal) for blocking/unblocking users and added a new observable in advertiser-page-store to view modal

* ammended observable bool value to false and made props required for the modal

* changed the ternary for each localized text to accomadate translations

* added minor changes

* changed the localize tags in button

* fixed isRequired

* removed observable is_block_user_modal_open, pass as prop to BlockUserModal instead

* Update branch (#5680)

* fixed translation for amount field in account transfer form cashier (#5605)

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* farrah/updated deposit store test coverage (#5430)

* updated deposit store test coverage

* added a check for updateAccountStatus

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* likhith/Fix validation message for payment methods (#5187)

* Added appropriate error message

* Fixed error messages in Edit form

* Added validation for SWIFT

* Added a hook to validate methods

* Removed commented code

* Refactored the code by moving the custom hook to hooks folder

* Minor bug fixes

* refactor: Renamed a variable

* fix: added regex to allow more characters as valid

* fix: implemented button disabled

* fix: changed the edit payment method

* fix: added payment error message overlapping issue

Co-authored-by: Likhith Kolayari <likhith@deriv.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* Amina/poi_limited_test_case (#5642)

* poi_limited_test_case

* poi_limited_test_case

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* yauheni / IdvRejected test coverage (#5637)

Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* yauheni / IdvNoSubmisssions test coverage (#5636)

* yauheni / IdvNoSubmisssions test coverage

* imports fix

* naming typo fix

* Delete poi-idv-rejected.spec.js

Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* feat: add check if has restricted parent (#5635)

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* Adrienne / P2P responsive add PM full screen modal button footers are now fixed by design (#5561)

* Mobile add PM full screen modal button footers are now fixed by design specs

* Incorporated code review changes

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* Bala/Add bootstrap dev script (#5659)

* chore: add bootstrap dev script

* Update package.json

Co-authored-by: Yashim Wong <75345074+yashim-deriv@users.noreply.github.com>

* chore: remove build from bootstrap

Co-authored-by: Yashim Wong <75345074+yashim-deriv@users.noreply.github.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* translations: 📚 sync translations with crowdin (#5679)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* update branch

Co-authored-by: vinu-deriv <100689171+vinu-deriv@users.noreply.github.com>
Co-authored-by: Farrah Mae Ochoa <82315152+farrah-deriv@users.noreply.github.com>
Co-authored-by: Likhith Kolayari <98398322+likhith-deriv@users.noreply.github.com>
Co-authored-by: Likhith Kolayari <likhith@deriv.com>
Co-authored-by: amina-deriv <84661147+amina-deriv@users.noreply.github.com>
Co-authored-by: yauheni-kryzhyk-deriv <103182683+yauheni-kryzhyk-deriv@users.noreply.github.com>
Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: maryiafrantsava-binary <103181650+maryiafrantsava-binary@users.noreply.github.com>
Co-authored-by: adrienne-deriv <103016120+adrienne-deriv@users.noreply.github.com>
Co-authored-by: balakrishna-binary <56330681+balakrishna-binary@users.noreply.github.com>
Co-authored-by: Yashim Wong <75345074+yashim-deriv@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* Adrienne / Create blocked advertisers tab (#5590)

* Added new blocked advertisers tab for desktop and mobile

* Refactored code

* Added blocked advertisers svg icon

* Resolved failed build, added blocked-advertisers.svg icon

* Incorporated code review suggestions

* Incorporated code review suggestions

* Show loading screen when icon is still loading

* Removed loading

* Removed manual font size

* fix: block user folder and stuff (#5848)

* Block unblock function draft (#5857)

* Added block/unblock function to general-store

* Added new observable

* Refactored

* Adrienne / Blocked user count icon with tooltip (#5684)

* Created component for blocked user count

* Added blocked user count component

* Added blocked user icon

* Linked blocked_by_count returned by BE

* Incorporated code reviews

* Added block user count modal for mobile when user taps on the block user count

* Ensure blocked user icon count has correct fill in dark mode

* Adrienne / Blocked advertiser overlay (#5859)

* Added block user overlay component for desktop/responsive

* Refacted sass file to use BEM convention and removed default

* Refactored code review changes

* Refactored code review changes

* Refactored overlay component as a wrapper

* Show unblock user modal and added unblock user action

* changed icon name

* Added checks for response

* Incorporated code review changes

* Fixed typo

* Change overlay height for mobile to ensure it fills remaining space

* Removed tabs in advertiser's page as per design

* Fixed test issues

* Made advertiser page non-scrollable when overlay is shown

* Removed close icon from block user modal as discussed

* Removed block me button

* Removed setIsBlockedUserModalOpen from advertiser page store

* Renamed props in block user overlay to onClickUnblock

* Renamed overlay props

* Added TODO regarding design changes on tabs in advertiser page

* updated observables

* added boolean checks

* Ameerul /Task 65494 list of blocked users feature (#5858)

* added 2 new components for row and table, added new scss file, added new functions and observables in my_profile and advertiser-page store

* fixed loading issue, mobile full page modal view and the css issue for viewing the table

* refactored code in advertiser store and block user modal

* removed promise for getBlockedAdvertisersList function

* merged blocked advertiser tab with list of users

* added removed code

* empty commit

* refactored code

* refactored blockUnblockUser function

* separated the block user table to my-profile and refactored code

* added blockUnblockUser function to general store

* added new functions to general store

* merged with master, added new functions in general store to block user table and to my profile store

* changed page header for blocked advertisers list

* Adrienne / Added search functionality for list of blocked advertisers (#6005)

* Added search functionality

* Refactored code changes

* Refactored code changes

* Renamed BlockedAdvertisersList to BlockUserList

* Fixed issues with block advertiser list table height

* Fixed issue with search box not loading

* Fixed an issue where the profile header is not fully width

* Reduced margin bottom height for tabs and stats height due to flex

* Ameerul /Task #65487 Dropdown Block User Feature (#5682)

* added dropdown, menu dots icon, added function for users to block advertisers with block user modal

* refactored code, and renamed dropdown component to advertiser-page-dropdown-menu

* renamed variables and functions according to comments

* refactored block user function in advertiser-page-store and block-user-modal

* minor changes to the imports

* merged with master and added changes

* removed old blockUser and showModal functions from advertiser store

* removed is_blocked from dropdown

* refactored code with comments

* moved showBlockUserModal function to the store

* removed curly brackets in name

* fixed gap in modal

* fixed tooltip message and user cannot block themselves

* fixed dropdown darkmode design and hid menu dots icon when user is blocked

* changed dropdown hover colour

* added useOnClickOutisde Hook to hide dropdown when clicked outside

* Refactored blocked user overlay css and advertiser page css (#6097)

* Blocked user feature sanity check (#6434)

* added dropdown, menu dots icon, added function for users to block advertisers with block user modal

* refactored code, and renamed dropdown component to advertiser-page-dropdown-menu

* renamed variables and functions according to comments

* refactored block user function in advertiser-page-store and block-user-modal

* minor changes to the imports

* merged with master and added changes

* removed old blockUser and showModal functions from advertiser store

* removed is_blocked from dropdown

* refactored code with comments

* moved showBlockUserModal function to the store

* removed curly brackets in name

* fixed gap in modal

* fixed tooltip message and user cannot block themselves

* fixed dropdown darkmode design and hid menu dots icon when user is blocked

* changed dropdown hover colour

* added useOnClickOutisde Hook to hide dropdown when clicked outside

* fixed bug fixes for advertiser page and my profile name

* Adrienne / Blocked user feature search box bug (Merge after sanity check PR is merged!) (#6436)

* added dropdown, menu dots icon, added function for users to block advertisers with block user modal

* refactored code, and renamed dropdown component to advertiser-page-dropdown-menu

* renamed variables and functions according to comments

* refactored block user function in advertiser-page-store and block-user-modal

* minor changes to the imports

* merged with master and added changes

* removed old blockUser and showModal functions from advertiser store

* removed is_blocked from dropdown

* refactored code with comments

* moved showBlockUserModal function to the store

* removed curly brackets in name

* fixed gap in modal

* fixed tooltip message and user cannot block themselves

* fixed dropdown darkmode design and hid menu dots icon when user is blocked

* changed dropdown hover colour

* added useOnClickOutisde Hook to hide dropdown when clicked outside

* fixed bug fixes for advertiser page and my profile name

* Fixed an issue where the block user table does not display No blocked advertisers after unblocking the last user during search

Co-authored-by: ameerul <ameerul@deriv.com>

* Blocked user count not appearing in my profile (#6446)

* fixed bugs for blocked user count in my profile

* reverted changes from my profile and change my profile name

* Aligned avatar to flex start in advertiser page as per design requirements (#6553)

* Adrienne / Hide block user dropdown when user views their own advertiser page (#6529)

* Hide block user dropdown when user views their own advertiser page

* Removed dropdown when user views their own ad and also removes disabled dropdown prop functionality

* Adrienne / Fixed alignment issues with block user count in responsive and bug where Blocked Advertisers responsive tab is not fully visible (#6527)

* Fixed alignment issues with block user count in responsive and bug where Blocked Advertisers responsive tab is not fully visible

* Integrated code review

* Adrienne / Made block user count to be subscribed to updates (#6561)

* Moved blocked user count observable to general store's subscription to subscribe to block user count updates

* Destructure response

* Refactored code

* Ameerul /Bug 76978 Blocked advertiser list is not loading after barred one user and showing console error (#6565)

* added error handling if user is barred and wants to get blocked advertisers list

* updated ui for error message and added new component to handle errors in table

* changed mobile margin for error message

* added new icon for blocked advertisers barred

* removed commented code

* Adrienne / Removed hover styling for responsive in blocked advertisers list (#6567)

* test

* test

* test agane

* Added styling for unfocusing

* Added styling for unfocusing

* Removed hover styling for responsive

* Ameerul /Bug 77176 The Block modal keep on looping for Disable P2P user  (#6580)

* added error-modal in advertiser page to handle if advertiser is banned and user wants to block

* updated error modal has_close_icon and implemented comments

* added has_close_icon in props

* Ameerul /Bug 77339 When userA trying to block an advertiser is barred, once userA is unbarred on trying to block advertiser temporary barred error model is displayed (#6591)

* fixed issue when user is banneed and tries to block advertiser, and changed width for error modal

* fixed checking if user is barred and changed error modal styling

* Adrienne / Scrollable advertiser page when no ads in responsive (#6622)

* draft pr

* removed top margin in advertiser page ads table

Co-authored-by: Carol Sachdeva <carol@binary.com>
Co-authored-by: ameerul-deriv <103412909+ameerul-deriv@users.noreply.github.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>
Co-authored-by: vinu-deriv <100689171+vinu-deriv@users.noreply.github.com>
Co-authored-by: Farrah Mae Ochoa <82315152+farrah-deriv@users.noreply.github.com>
Co-authored-by: Likhith Kolayari <98398322+likhith-deriv@users.noreply.github.com>
Co-authored-by: Likhith Kolayari <likhith@deriv.com>
Co-authored-by: amina-deriv <84661147+amina-deriv@users.noreply.github.com>
Co-authored-by: yauheni-kryzhyk-deriv <103182683+yauheni-kryzhyk-deriv@users.noreply.github.com>
Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: maryiafrantsava-binary <103181650+maryiafrantsava-binary@users.noreply.github.com>
Co-authored-by: adrienne-deriv <103016120+adrienne-deriv@users.noreply.github.com>
Co-authored-by: balakrishna-binary <56330681+balakrishna-binary@users.noreply.github.com>
Co-authored-by: Yashim Wong <75345074+yashim-deriv@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>
Co-authored-by: Adrienne Rio <adrienne@deriv.com>
Co-authored-by: Ameerul Hady <ameerul@deriv.com>

* thisyahlen/fix for reset balance (#6630)

* fix for reset balance

* code refactor

* code refactor

* console rates fix

* Blocked advertiser hotfix (#6635)

* add: delay

* reduce delay

* set active tab to my stats on unmount in my profile

Co-authored-by: ameerul hady <ameerul@deriv.com>

* translations: 📚 sync translations with crowdin (#6637)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* Akmal / Rename Synthetic accounts into Derived (#6568)

* Rename Synthetic accounts into Derived

* Update test cases

* Fix failed test cases

* Fix: icons naming

* Fix: remove unused function

* Fix: icons.js

* Rename latest strings

* Content and style changes for derived accounts

* Content changes for MT5 dashboard

* Rename DMT5 to Deriv Mt5

* Fix test cases

* Revert "Fix test cases"

This reverts commit 74dd2fb1b095955c249d6db01a56fdf94ceb1d09.

* Revert "Rename DMT5 to Deriv Mt5"

This reverts commit f0b74d791f29005f749e85e53ac3b290a08d98a4.

* Revert "Content changes for MT5 dashboard"

This reverts commit 32e03e6c306a6fd680b22997393d25096acb10bf.

* Redo content changes

* Revert the fix

* Rename derived label to derived svg

* Change label for real account

* Revert revert 'Rename DMT5 password to Deriv MT5 password'

* Fix test cases

* Fix test case

* Change password modal title

* Fix test case

* Revert Derived SVG change

* Change DMT5 to Deriv MT5 in jurisdiction

* Add condition

* removed Dmt5 from the transfer dropdown in cashier

* fixed cashier related test cases

* Update jurisdiction modal

* Fix the whatever

* Temporarily remove test case until Deriv X part is done

* Add jurisdiction to success modal

* Fix getFormattedJurisdictionCode

* Add enter password label with jurisdiction

* Remove old test case, the value is set dynamically

* Temp fix: change derived label to synthetic for deriv x only

* Revert "Vinu/removed Dmt5 for synthetic account from the transfer dropdown in cashier"

* Fix: dxtrade label temp fix

* Fix: remp fix for dxtrade label in success modal

* Revert label for deriv x

Co-authored-by: Yashim Wong <yashim@deriv.com>
Co-authored-by: vinu-deriv <vinu@deriv.com>

* translations: 📚 sync translations with crowdin (#6651)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* carol/ React simple star rating dependency (#6652)

* fix: dependency

* fix: dependency please

* reran bootstrap and build

Co-authored-by: adrienne-deriv <103016120+adrienne-deriv@users.noreply.github.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>
Co-authored-by: Hamid <hamid@re-work.dev>
Co-authored-by: Farzin Mirzaie <72082844+farzin-fs@users.noreply.github.com>
Co-authored-by: Niloofar Sadeghi <niloofar.sadeghi@firstsource.tech>
Co-authored-by: george-usynin-binary <heorhi@binary.com>
Co-authored-by: George Usynin <103181646+george-usynin-binary@users.noreply.github.com>
Co-authored-by: Likhith Kolayari <98398322+likhith-deriv@users.noreply.github.com>
Co-authored-by: yauheni-kryzhyk-deriv <103182683+yauheni-kryzhyk-deriv@users.noreply.github.com>
Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: Matin shafiei <matin@deriv.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>
Co-authored-by: Sui Sin <103026762+suisin-deriv@users.noreply.github.com>
Co-authored-by: Nijil Nirmal <62882794+nijil-binary@users.noreply.github.com>
Co-authored-by: Carol Sachdeva <carol@binary.com>
Co-authored-by: ameerul-deriv <103412909+ameerul-deriv@users.noreply.github.com>
Co-authored-by: vinu-deriv <100689171+vinu-deriv@users.noreply.github.com>
Co-authored-by: Farrah Mae Ochoa <82315152+farrah-deriv@users.noreply.github.com>
Co-authored-by: Likhith Kolayari <likhith@deriv.com>
Co-authored-by: amina-deriv <84661147+amina-deriv@users.noreply.github.com>
Co-authored-by: maryiafrantsava-binary <103181650+maryiafrantsava-binary@users.noreply.github.com>
Co-authored-by: balakrishna-binary <56330681+balakrishna-binary@users.noreply.github.com>
Co-authored-by: Yashim Wong <75345074+yashim-deriv@users.noreply.github.com>
Co-authored-by: Adrienne Rio <adrienne@deriv.com>
Co-authored-by: Ameerul Hady <ameerul@deriv.com>
Co-authored-by: thisyahlen <104053934+thisyahlen-deriv@users.noreply.github.com>
Co-authored-by: Akmal Djumakhodjaev <akmal@binary.com>
Co-authored-by: Yashim Wong <yashim@deriv.com>
Co-authored-by: vinu-deriv <vinu@deriv.com>

* MaryiaF/refactor: Quick Strategy Tab Improvements (#6647)

* MaryiaF/fix: add optional for .field_name

* MaryiaF/fix: error field_name

* Sandeep/fix conflicts 1 (#6663)

* Adrienne / Changed border bottom color for order details page in responsive for dark mode (#6221)

* changed border bottom color for order details

* Changed border bottom color for buy-sell modal

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* hamid/65032/migrate-deposit-to-ts (#6307)

* Migrate Deposit to TS

* Remove package-lock.json

* Fix test errors

* Change data-testid name

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* hamid/74066/migrate-shared-components-to-ts (#6342)

* Migrate Error to TS

* Migrate ResendEmailButtonWrapper to TS

* Migrate SideNote to TS

* Migrate USDTSideNote to TS

* Fix typo

* Rename RootStore to TRootStore

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* Farzin/73307/TS migration of deposit related stores (#6262)

* update MobX libraries

* bot migration

* trader migration

* core migration

* cfd migration

* p2p migration

* cashier migration

* regenerate package-lock.json

* fix verification store issue on cashier

* temperately commented failed tests to find a solution

* fix console errors related to mobx

* regenerate package-lock.json

* fix general store issue on p2p

* bug: fix p2p stores bugs

* fix console errors

* fix: Open position blinking while there is active contract going on

* perf(cashier): add types for client, common, ui stores; refactor Types folder structure

* perf(cashier): add types in client, ui stores

* refactor(cashier): refactor root-store declaration into type

* refactor(cashier): refactor naming

* fix: blinking issue

* fix: nitpik

* feat(cashier): :construction: migrate `ErrorStore` to TypeScript

* fix bot issue

* feat(cashier): :construction: migrate `IframeStore` to TypeScript

* feat(cashier): :construction: migrate `DepositStore` to TypeScript

* chores: change @deriv/deriv-charts versions

* fix(cashier): :bug: fix `tsconfig`

* fix(cashier): :memo: resolve PR comments

* fix(cashier): :memo: resolve PR comments

* fix(cashier): :memo: resolve PR comments

* fix(cashier): :memo: resolve PR comments

* refactor(cashier): :coffin: remove `container` as a prop in `setIframeUrl` method

* fix(cashier): :memo: resolve merge conflicts

* fix(cashier): :memo: resolve merge conflicts

Co-authored-by: Niloofar Sadeghi <niloofar.sadeghi@firstsource.tech>
Co-authored-by: george-usynin-binary <heorhi@binary.com>
Co-authored-by: George Usynin <103181646+george-usynin-binary@users.noreply.github.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* Farzin/73507/Duplicate ads shown on "My ad" page in DP2P,  after you edit and close the sell ad. (#6222)

* fix(dp2p): :bug: fix duplicated adverts issue in my ads tab

* Trigger Build

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* likhith/fixed rerouting to p2p from cashier dashboard (#6244)

* fix: refactored condition that resets the route

* fix: failing test cases

* merged master

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* yauheni/74104/ts migration for account DemoMessage component (#6346)

Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* yauheni/74383/ converting app.jsx in account to functional component (#6282)

* yauheni/74383/ converting app in account to functional component

* converted to tsx with rootstore

* added todo for future types implementation

Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: Matin shafiei <matin@deriv.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* yauheni/74189/ts_migration_text_container-deleted_being_unused (#6378)

Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* feat: added configuration for account package migration (#6419)

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* Revert "yauheni/74383/ converting app.jsx in account to functional component (#6282)" (#6612)

This reverts commit e1fc3e8af2bc0bfefa3427e0bcf257300563755c.

* Revert "feat: added configuration for account package migration (#6419)" (#6613)

This reverts commit d9974cbd6606f5f4d528d1ed165f473ce1930329.

* translations: 📚 sync translations with crowdin (#6614)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* Update to single quote (#6618)

* translations: 📚 sync translations with crowdin (#6619)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* Revert "sandeep/65842/unifiy-websocket -- using the same websocket instance from the core … (#6555)" (#6623)

This reverts commit e2b3d2e2f6cdd2b1af097ce14f84d3bf03baf87f.

* translations: 📚 sync translations with crowdin (#6624)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* P2P / Feature - Blocked advertiser (#6006)

* create feature branch

* Ameerul /Task 65488 Reusable modal to block advertiser (#5589)

* changed the margin-top for mobile view for buy-sell

* merging upstream master

* merge with local

* added new component (modal) for blocking/unblocking users and added a new observable in advertiser-page-store to view modal

* ammended observable bool value to false and made props required for the modal

* changed the ternary for each localized text to accomadate translations

* added minor changes

* changed the localize tags in button

* fixed isRequired

* removed observable is_block_user_modal_open, pass as prop to BlockUserModal instead

* Update branch (#5680)

* fixed translation for amount field in account transfer form cashier (#5605)

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* farrah/updated deposit store test coverage (#5430)

* updated deposit store test coverage

* added a check for updateAccountStatus

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* likhith/Fix validation message for payment methods (#5187)

* Added appropriate error message

* Fixed error messages in Edit form

* Added validation for SWIFT

* Added a hook to validate methods

* Removed commented code

* Refactored the code by moving the custom hook to hooks folder

* Minor bug fixes

* refactor: Renamed a variable

* fix: added regex to allow more characters as valid

* fix: implemented button disabled

* fix: changed the edit payment method

* fix: added payment error message overlapping issue

Co-authored-by: Likhith Kolayari <likhith@deriv.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* Amina/poi_limited_test_case (#5642)

* poi_limited_test_case

* poi_limited_test_case

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* yauheni / IdvRejected test coverage (#5637)

Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* yauheni / IdvNoSubmisssions test coverage (#5636)

* yauheni / IdvNoSubmisssions test coverage

* imports fix

* naming typo fix

* Delete poi-idv-rejected.spec.js

Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* feat: add check if has restricted parent (#5635)

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* Adrienne / P2P responsive add PM full screen modal button footers are now fixed by design (#5561)

* Mobile add PM full screen modal button footers are now fixed by design specs

* Incorporated code review changes

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* Bala/Add bootstrap dev script (#5659)

* chore: add bootstrap dev script

* Update package.json

Co-authored-by: Yashim Wong <75345074+yashim-deriv@users.noreply.github.com>

* chore: remove build from bootstrap

Co-authored-by: Yashim Wong <75345074+yashim-deriv@users.noreply.github.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* translations: 📚 sync translations with crowdin (#5679)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* update branch

Co-authored-by: vinu-deriv <100689171+vinu-deriv@users.noreply.github.com>
Co-authored-by: Farrah Mae Ochoa <82315152+farrah-deriv@users.noreply.github.com>
Co-authored-by: Likhith Kolayari <98398322+likhith-deriv@users.noreply.github.com>
Co-authored-by: Likhith Kolayari <likhith@deriv.com>
Co-authored-by: amina-deriv <84661147+amina-deriv@users.noreply.github.com>
Co-authored-by: yauheni-kryzhyk-deriv <103182683+yauheni-kryzhyk-deriv@users.noreply.github.com>
Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: maryiafrantsava-binary <103181650+maryiafrantsava-binary@users.noreply.github.com>
Co-authored-by: adrienne-deriv <103016120+adrienne-deriv@users.noreply.github.com>
Co-authored-by: balakrishna-binary <56330681+balakrishna-binary@users.noreply.github.com>
Co-authored-by: Yashim Wong <75345074+yashim-deriv@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* Adrienne / Create blocked advertisers tab (#5590)

* Added new blocked advertisers tab for desktop and mobile

* Refactored code

* Added blocked advertisers svg icon

* Resolved failed build, added blocked-advertisers.svg icon

* Incorporated code review suggestions

* Incorporated code review suggestions

* Show loading screen when icon is still loading

* Removed loading

* Removed manual font size

* fix: block user folder and stuff (#5848)

* Block unblock function draft (#5857)

* Added block/unblock function to general-store

* Added new observable

* Refactored

* Adrienne / Blocked user count icon with tooltip (#5684)

* Created component for blocked user count

* Added blocked user count component

* Added blocked user icon

* Linked blocked_by_count returned by BE

* Incorporated code reviews

* Added block user count modal for mobile when user taps on the block user count

* Ensure blocked user icon count has correct fill in dark mode

* Adrienne / Blocked advertiser overlay (#5859)

* Added block user overlay component for desktop/responsive

* Refacted sass file to use BEM convention and removed default

* Refactored code review changes

* Refactored code review changes

* Refactored overlay component as a wrapper

* Show unblock user modal and added unblock user action

* changed icon name

* Added checks for response

* Incorporated code review changes

* Fixed typo

* Change overlay height for mobile to ensure it fills remaining space

* Removed tabs in advertiser's page as per design

* Fixed test issues

* Made advertiser page non-scrollable when overlay is shown

* Removed close icon from block user modal as discussed

* Removed block me button

* Removed setIsBlockedUserModalOpen from advertiser page store

* Renamed props in block user overlay to onClickUnblock

* Renamed overlay props

* Added TODO regarding design changes on tabs in advertiser page

* updated observables

* added boolean checks

* Ameerul /Task 65494 list of blocked users feature (#5858)

* added 2 new components for row and table, added new scss file, added new functions and observables in my_profile and advertiser-page store

* fixed loading issue, mobile full page modal view and the css issue for viewing the table

* refactored code in advertiser store and block user modal

* removed promise for getBlockedAdvertisersList function

* merged blocked advertiser tab with list of users

* added removed code

* empty commit

* refactored code

* refactored blockUnblockUser function

* separated the block user table to my-profile and refactored code

* added blockUnblockUser function to general store

* added new functions to general store

* merged with master, added new functions in general store to block user table and to my profile store

* changed page header for blocked advertisers list

* Adrienne / Added search functionality for list of blocked advertisers (#6005)

* Added search functionality

* Refactored code changes

* Refactored code changes

* Renamed BlockedAdvertisersList to BlockUserList

* Fixed issues with block advertiser list table height

* Fixed issue with search box not loading

* Fixed an issue where the profile header is not fully width

* Reduced margin bottom height for tabs and stats height due to flex

* Ameerul /Task #65487 Dropdown Block User Feature (#5682)

* added dropdown, menu dots icon, added function for users to block advertisers with block user modal

* refactored code, and renamed dropdown component to advertiser-page-dropdown-menu

* renamed variables and functions according to comments

* refactored block user function in advertiser-page-store and block-user-modal

* minor changes to the imports

* merged with master and added changes

* removed old blockUser and showModal functions from advertiser store

* removed is_blocked from dropdown

* refactored code with comments

* moved showBlockUserModal function to the store

* removed curly brackets in name

* fixed gap in modal

* fixed tooltip message and user cannot block themselves

* fixed dropdown darkmode design and hid menu dots icon when user is blocked

* changed dropdown hover colour

* added useOnClickOutisde Hook to hide dropdown when clicked outside

* Refactored blocked user overlay css and advertiser page css (#6097)

* Blocked user feature sanity check (#6434)

* added dropdown, menu dots icon, added function for users to block advertisers with block user modal

* refactored code, and renamed dropdown component to advertiser-page-dropdown-menu

* renamed variables and functions according to comments

* refactored block user function in advertiser-page-store and block-user-modal

* minor changes to the imports

* merged with master and added changes

* removed old blockUser and showModal functions from advertiser store

* removed is_blocked from dropdown

* refactored code with comments

* moved showBlockUserModal function to the store

* removed curly brackets in name

* fixed gap in modal

* fixed tooltip message and user cannot block themselves

* fixed dropdown darkmode design and hid menu dots icon when user is blocked

* changed dropdown hover colour

* added useOnClickOutisde Hook to hide dropdown when clicked outside

* fixed bug fixes for advertiser page and my profile name

* Adrienne / Blocked user feature search box bug (Merge after sanity check PR is merged!) (#6436)

* added dropdown, menu dots icon, added function for users to block advertisers with block user modal

* refactored code, and renamed dropdown component to advertiser-page-dropdown-menu

* renamed variables and functions according to comments

* refactored block user function in advertiser-page-store and block-user-modal

* minor changes to the imports

* merged with master and added changes

* removed old blockUser and showModal functions from advertiser store

* removed is_blocked from dropdown

* refactored code with comments

* moved showBlockUserModal function to the store

* removed curly brackets in name

* fixed gap in modal

* fixed tooltip message and user cannot block themselves

* fixed dropdown darkmode design and hid menu dots icon when user is blocked

* changed dropdown hover colour

* added useOnClickOutisde Hook to hide dropdown when clicked outside

* fixed bug fixes for advertiser page and my profile name

* Fixed an issue where the block user table does not display No blocked advertisers after unblocking the last user during search

Co-authored-by: ameerul <ameerul@deriv.com>

* Blocked user count not appearing in my profile (#6446)

* fixed bugs for blocked user count in my profile

* reverted changes from my profile and change my profile name

* Aligned avatar to flex start in advertiser page as per design requirements (#6553)

* Adrienne / Hide block user dropdown when user views their own advertiser page (#6529)

* Hide block user dropdown when user views their own advertiser page

* Removed dropdown when user views their own ad and also removes disabled dropdown prop functionality

* Adrienne / Fixed alignment issues with block user count in responsive and bug where Blocked Advertisers responsive tab is not fully visible (#6527)

* Fixed alignment issues with block user count in responsive and bug where Blocked Advertisers responsive tab is not fully visible

* Integrated code review

* Adrienne / Made block user count to be subscribed to updates (#6561)

* Moved blocked user count observable to general store's subscription to subscribe to block user count updates

* Destructure response

* Refactored code

* Ameerul /Bug 76978 Blocked advertiser list is not loading after barred one user and showing console error (#6565)

* added error handling if user is barred and wants to get blocked advertisers list

* updated ui for error message and added new component to handle errors in table

* changed mobile margin for error message

* added new icon for blocked advertisers barred

* removed commented code

* Adrienne / Removed hover styling for responsive in blocked advertisers list (#6567)

* test

* test

* test agane

* Added styling for unfocusing

* Added styling for unfocusing

* Removed hover styling for responsive

* Ameerul /Bug 77176 The Block modal keep on looping for Disable P2P user  (#6580)

* added error-modal in advertiser page to handle if advertiser is banned and user wants to block

* updated error modal has_close_icon and implemented comments

* added has_close_icon in props

* Ameerul /Bug 77339 When userA trying to block an advertiser is barred, once userA is unbarred on trying to block advertiser temporary barred error model is displayed (#6591)

* fixed issue when user is banneed and tries to block advertiser, and changed width for error modal

* fixed checking if user is barred and changed error modal styling

* Adrienne / Scrollable advertiser page when no ads in responsive (#6622)

* draft pr

* removed top margin in advertiser page ads table

Co-authored-by: Carol Sachdeva <carol@binary.com>
Co-authored-by: ameerul-deriv <103412909+ameerul-deriv@users.noreply.github.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>
Co-authored-by: vinu-deriv <100689171+vinu-deriv@users.noreply.github.com>
Co-authored-by: Farrah Mae Ochoa <82315152+farrah-deriv@users.noreply.github.com>
Co-authored-by: Likhith Kolayari <98398322+likhith-deriv@users.noreply.github.com>
Co-authored-by: Likhith Kolayari <likhith@deriv.com>
Co-authored-by: amina-deriv <84661147+amina-deriv@users.noreply.github.com>
Co-authored-by: yauheni-kryzhyk-deriv <103182683+yauheni-kryzhyk-deriv@users.noreply.github.com>
Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: maryiafrantsava-binary <103181650+maryiafrantsava-binary@users.noreply.github.com>
Co-authored-by: adrienne-deriv <103016120+adrienne-deriv@users.noreply.github.com>
Co-authored-by: balakrishna-binary <56330681+balakrishna-binary@users.noreply.github.com>
Co-authored-by: Yashim Wong <75345074+yashim-deriv@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>
Co-authored-by: Adrienne Rio <adrienne@deriv.com>
Co-authored-by: Ameerul Hady <ameerul@deriv.com>

* thisyahlen/fix for reset balance (#6630)

* fix for reset balance

* code refactor

* code refactor

* console rates fix

* Blocked advertiser hotfix (#6635)

* add: delay

* reduce delay

* set active tab to my stats on unmount in my profile

Co-authored-by: ameerul hady <ameerul@deriv.com>

* translations: 📚 sync translations with crowdin (#6637)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* Akmal / Rename Synthetic accounts into Derived (#6568)

* Rename Synthetic accounts into Derived

* Update test cases

* Fix failed test cases

* Fix: icons naming

* Fix: remove unused function

* Fix: icons.js

* Rename latest strings

* Content and style changes for derived accounts

* Content changes for MT5 dashboard

* Rename DMT5 to Deriv Mt5

* Fix test cases

* Revert "Fix test cases"

This reverts commit 74dd2fb1b095955c249d6db01a56fdf94ceb1d09.

* Revert "Rename DMT5 to Deriv Mt5"

This reverts commit f0b74d791f29005f749e85e53ac3b290a08d98a4.

* Revert "Content changes for MT5 dashboard"

This reverts commit 32e03e6c306a6fd680b22997393d25096acb10bf.

* Redo content changes

* Revert the fix

* Rename derived label to derived svg

* Change label for real account

* Revert revert 'Rename DMT5 password to Deriv MT5 password'

* Fix test cases

* Fix test case

* Change password modal title

* Fix test case

* Revert Derived SVG change

* Change DMT5 to Deriv MT5 in jurisdiction

* Add condition

* removed Dmt5 from the transfer dropdown in cashier

* fixed cashier related test cases

* Update jurisdiction modal

* Fix the whatever

* Temporarily remove test case until Deriv X part is done

* Add jurisdiction to success modal

* Fix getFormattedJurisdictionCode

* Add enter password label with jurisdiction

* Remove old test case, the value is set dynamically

* Temp fix: change derived label to synthetic for deriv x only

* Revert "Vinu/removed Dmt5 for synthetic account from the transfer dropdown in cashier"

* Fix: dxtrade label temp fix

* Fix: remp fix for dxtrade label in success modal

* Revert label for deriv x

Co-authored-by: Yashim Wong <yashim@deriv.com>
Co-authored-by: vinu-deriv <vinu@deriv.com>

* translations: 📚 sync translations with crowdin (#6651)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* carol/ React simple star rating dependency (#6652)

* fix: dependency

* fix: dependency please

Co-authored-by: adrienne-deriv <103016120+adrienne-deriv@users.noreply.github.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>
Co-authored-by: Hamid <hamid@re-work.dev>
Co-authored-by: Farzin Mirzaie <72082844+farzin-fs@users.noreply.github.com>
Co-authored-by: Niloofar Sadeghi <niloofar.sadeghi@firstsource.tech>
Co-authored-by: george-usynin-binary <heorhi@binary.com>
Co-authored-by: George Usynin <103181646+george-usynin-binary@users.noreply.github.com>
Co-authored-by: Likhith Kolayari <98398322+likhith-deriv@users.noreply.github.com>
Co-authored-by: yauheni-kryzhyk-deriv <103182683+yauheni-kryzhyk-deriv@users.noreply.github.com>
Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: Matin shafiei <matin@deriv.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>
Co-authored-by: Sui Sin <103026762+suisin-deriv@users.noreply.github.com>
Co-authored-by: Nijil Nirmal <62882794+nijil-binary@users.noreply.github.com>
Co-authored-by: Carol Sachdeva <carol@binary.com>
Co-authored-by: ameerul-deriv <103412909+ameerul-deriv@users.noreply.github.com>
Co-authored-by: vinu-deriv <100689171+vinu-deriv@users.noreply.github.com>
Co-authored-by: Farrah Mae Ochoa <82315152+farrah-deriv@users.noreply.github.com>
Co-authored-by: Likhith Kolayari <likhith@deriv.com>
Co-authored-by: amina-deriv <84661147+amina-deriv@users.noreply.github.com>
Co-authored-by: maryiafrantsava-binary <103181650+maryiafrantsava-binary@users.noreply.github.com>
Co-authored-by: balakrishna-binary <56330681+balakrishna-binary@users.noreply.github.com>
Co-authored-by: Yashim Wong <75345074+yashim-deriv@users.noreply.github.com>
Co-authored-by: Adrienne Rio <adrienne@deriv.com>
Co-authored-by: Ameerul Hady <ameerul@deriv.com>
Co-authored-by: thisyahlen <104053934+thisyahlen-deriv@users.noreply.github.com>
Co-authored-by: Akmal Djumakhodjaev <akmal@binary.com>
Co-authored-by: Yashim Wong <yashim@deriv.com>
Co-authored-by: vinu-deriv <vinu@deriv.com>

* chore: remove jurisdiction-modal

* chore: remove unnecessary files

* implementation of guide tab in tutorials (#6672)

* implementation of guide tab in tutorials

* refactored code and added debounce

* converted store from tsx to ts

* dashboard store changes

* fixed review comments

* Making Blockly workspace globally available (#6575)

* Making Blockly workspace globally available

* Restructured dashboard tab and elevated blockly workspace initialization to the top

* Fixed bot-builder tab icon typo

* Added portal target id to modal_root

* Fixed design issues and tabs with run strategy panel visibility

* repositioned import and added todo comment

* Fixed field_name error in quick strategy components

* Fixed component naming and console warnings

* Added missing bot class name to fix the run-panel height

* destructured store items

* Added dashboard-store changes in ts file

* worked on comments/suggestions

* MaryiaF/77948/refactor: implementation of new design DBot Hompage (#6679)

* MaryiaF/refactor: implementation of new design DBot Hompage

* MaryiaF/fix: code smell issues related to TS

* MaryiaF/chore: replace px to rem

* MaryiaF/chore: use Text component instead of css properties

* MaryiaF/chore: use Text component instead of css properties

* MaryiaF/chore: avoid index in the key in the .map()

* MaryiaF/refactor: dropdowns

* MaryiaF/fix: remarks related to Text and endsWith()

* MaryiaF/fix: icons of dropdown

* MaryiaF/feat: center the form

* MaryiaF/chore: remove unnecessary prop

* MaryiaF/chore: remove unneccessary prop, move mixin

* farabi/Added tutorial faq content (#6558)

* feature--dashboard-UI

* added ternary for the main content

* Rupato New Dashboard -- removed console

* updated package-lock

* package lock json changes

* new-package-lock-json

* implemented joyride and ui tour guide development

* added react-joyride

* Added chart tab in new dbot-homepage

* resolved merge conflict and added beacon disable property

* fix for screen width

* added mobx and changes in joyride config

* added updated icon.js

* Worked on bot-builder and added toolbar & toolbox within it

* Worked on bot-builder

* Worked on bot-builder and added toolbar & toolbox within it

* updated icon package

* added icon package

* Fixed icons and resequenced tabs

* added run-panel to the dashboard

* created dashboard store to manage the tab state

* added sidebar and and tutorials UI and also cardpopup functionality

* converted to typescript joyride config

* changes for type in typescript

* Removed duplicate imports

* Fixed imports

* Removed unused components and placed run stretegy button on its place

* refactored dashboard component

* fix for code smells

* made suggested changes

* resolved merge conflict package.lock.json

* regenerated package.lock.json due to merge conflict

* changed file names

* resolved merge conflict

* removed dashboard tsx file

* fix for eslint

* removed sidebar and dashboard.tsx

* added sidebar and dashboard.tsx fiels

* removed translations file

* added translations file

* fix for mobx make observable

* Update packages/bot-web-ui/src/components/toolbar/runStrategy.tsx

Co-authored-by: Matin shafiei <matin@binary.com>

* Update packages/bot-web-ui/package.json

Co-authored-by: Matin shafiei <matin@binary.com>

* Update packages/bot-web-ui/src/components/dashboard/dashboard-components/index.scss

Co-authored-by: Matin shafiei <matin@binary.com>

* Update packages/components/src/components/icon/icons.js

Co-authored-by: Matin shafiei <matin@binary.com>

* fixed review comments

* fixed review comments

* fix for prettier on circle CI

* refactored component and updated typescript related definitions

* fixed typo and added react mouseevent

* run strategy position fix

* updated types in toolbar and joyride config

* tutorial faq accordion

* tutorial faq content'

* farabi/improved tutorial faq tab

* farabi/improved tutorial-faq tab

* fixed image loading issue

* resolved comments

* chore: undo package-lock.json changes

* improved typescript

* resolved comments

Co-authored-by: rupato-deriv <rupato@deriv.com>
Co-authored-by: Sandeep <sandeep@deriv.com>
Co-authored-by: rupato-deriv <97010868+rupato-deriv@users.noreply.github.com>
Co-authored-by: Sandeep Rajput <90243468+sandeep-deriv@users.noreply.github.com>
Co-authored-by: Matin shafiei <matin@binary.com>
Co-authored-by: Farabi <farabi@Farabi-Chowdhurys-MacBook-Pro-C02X37B9JG5H-Rapid-7-Test.local>
Co-authored-by: Prince <prince@deriv.com>

* added react joyride tour configuration (#6767)

* added react joyride tour configuration

* resolved PR comments

Co-authored-by: Farabi <farabi@Farabi-Chowdhurys-MacBook-Pro-C02X37B9JG5H-Rapid-7-Test.local>

* Worked on code improvements (#6740)

* Worked on code improvements

* Worked on the improvements and suggestions 2

* bot builder improvements 3

* worked on code improvements 4

* bot builder improvements 5

* bot-builder improvemetns 6

* fix: code smells in dbot dashboard-store

* fix: constants to upper case

* bot-builder improvements

* improvement: css use rem instead of px

* fix: added a comment to fix tab indexing later with a separate card

* feat: make new dasboard tabs vertically scrollable (#6771)

* feat: make new dasboard tabs vertically scrollable

* feat: fixed height of the tab container for all the tabs and added global variable for mobile and desktop tab content height

* fix: charts width for responsive

* fixed tutorial tab sidebar to stick (#6784)

* fixed tutorial tab sidebar to stick

* removed border height

* sidebar issue fix

Co-authored-by: Farabi <farabi@Farabis-MacBook-Pro.local>
Co-authored-by: Farabi <farabi@Farabi-Chowdhurys-MacBook-Pro-LT2G9C9X0P-Rapid-7-Test.local>

* updated icons and text as per design (#6806)

Co-authored-by: Farabi <farabi@Farabi-Chowdhurys-MacBook-Pro-LT2G9C9X0P-Rapid-7-Test.local>

* Feature  dashboard tab && bot preview && joyride configuration (#6762)

* changes for dashboard features

* changed folder name

* fixed the tcard props and element error naming

* fixed review comments

* fixed review comments

* added onboarding tour guide settings in local storage

* added function to common util function

* fixed review comment

* fix for the load modal popup

* fixed review comments

* changed variable name according to the guildeline naming convention

* added localize to the components

* fixed review comments

* fixed review comments

* fixed UI and scss structure for the google drive popup

* Farabi/78937/fix--tutorial tour improvement (#6796)

* added dark theme colors for tour

* dark theme fix

* ui and content update

Co-authored-by: Farabi <farabi@Farabis-MacBook-Pro.local>
Co-authored-by: Farabi <farabi@Farabi-Chowdhurys-MacBook-Pro-LT2G9C9X0P-Rapid-7-Test.local>

* top overlapping with toolbar fixed (#6829)

Co-authored-by: Farabi <farabi@Farabi-Chowdhurys-MacBook-Pro-LT2G9C9X0P-Rapid-7-Test.local>

* farabi/fix--bot-builder-tour-design (#6836)

* added tour start or skip dialog

* updated to a reusable function

Co-authored-by: Farabi <farabi@Farabi-Chowdhurys-MacBook-Pro-LT2G9C9X0P-Rapid-7-Test.local>

* Rupato/79937/feature  add tour retrigger (#6849)

* added tour retrigger

* minor css changes and fixes

* updated

* removed TODO comment

* added variable color

* padding for dashboard import text position (#6855)

* padding for dashboard import text position

* resized height

* added cursor pointer on button icons

* finalized height deduction amount

* removed unused css

Co-authored-by: Farabi <farabi@Farabi-Chowdhurys-MacBook-Pro-LT2G9C9X0P-Rapid-7-Test.local>

* farabi/added close function on bot-builder tour (#6864)

*…
  • Loading branch information
Show file tree
Hide file tree
Showing 259 changed files with 31,375 additions and 2,804 deletions.
5 changes: 3 additions & 2 deletions packages/bot-skeleton/src/scratch/dbot-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ class DBotStore extends DBotStoreInterface {
this.is_mobile = store.is_mobile || false;
this.is_dark_mode_on = store.is_dark_mode_on || false;
this.client = store.client;
this.dashboard = store.dashboard;
this.flyout = store.flyout;
this.toolbar = store.toolbar;
this.toolbox = store.toolbox;
this.save_modal = store.save_modal;
this.load_modal = store.load_modal;
this.setContractUpdateConfig = store.setContractUpdateConfig;
this.toggleStrategyModal = store.toggleStrategyModal;
this.handleFileChange = store.handleFileChange;
this.startLoading = store.startLoading;
this.endLoading = store.endLoading;
this.setLoading = store.setLoading;

reaction(
() => this.client.loginid,
Expand Down
13 changes: 8 additions & 5 deletions packages/bot-skeleton/src/scratch/dbot.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class DBot {
*/
async initWorkspace(public_path, store, api_helpers_store, is_mobile) {
const recent_files = await getSavedWorkspaces();

return new Promise((resolve, reject) => {
__webpack_public_path__ = public_path; // eslint-disable-line no-global-assign
ApiHelpers.setInstance(api_helpers_store);
Expand All @@ -46,18 +47,13 @@ class DBot {
return;
}
this.workspace = Blockly.inject(el_scratch_div, {
grid: { spacing: 40, length: 11, colour: '#f3f3f3' },
media: `${__webpack_public_path__}media/`,
trashcan: !is_mobile,
zoom: { wheel: true, startScale: workspaceScale },
scrollbars: true,
});

this.workspace.cached_xml = { main: main_xml };
this.workspace.save_workspace_interval = setInterval(async () => {
// Periodically save the workspace.
await saveWorkspaceToRecent(Blockly.Xml.workspaceToDom(this.workspace), save_types.UNSAVED);
}, 10000);

this.workspace.addChangeListener(this.valueInputLimitationsListener.bind(this));
this.workspace.addChangeListener(event => updateDisabledBlocks(this.workspace, event));
Expand All @@ -73,12 +69,15 @@ class DBot {
// Push main.xml to workspace and reset the undo stack.
this.workspace.current_strategy_id = Blockly.utils.genUid();
Blockly.derivWorkspace.strategy_to_load = main_xml;
Blockly.mainWorkspace.strategy_to_load = main_xml;
let file_name = config.default_file_name;
if (recent_files && recent_files.length) {
const latest_file = recent_files[0];
Blockly.derivWorkspace.strategy_to_load = latest_file.xml;
Blockly.mainWorkspace.strategy_to_load = latest_file.xml;
file_name = latest_file.name;
Blockly.derivWorkspace.current_strategy_id = latest_file.id;
Blockly.mainWorkspace.current_strategy_id = latest_file.id;
}

const event_group = `dbot-load${Date.now()}`;
Expand Down Expand Up @@ -108,6 +107,10 @@ class DBot {
});
}

async saveRecentWorkspace() {
await saveWorkspaceToRecent(Blockly.Xml.workspaceToDom(this.workspace), save_types.UNSAVED);
}

/**
* Allows you to add a function that needs to be executed before running the bot. Each
* function needs to return true in order for the bot to run.
Expand Down
7 changes: 7 additions & 0 deletions packages/bot-skeleton/src/scratch/hooks/block_svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,13 @@ Blockly.BlockSvg.prototype.setCollapsed = function (collapsed) {
this.setErrorHighlighted(collapsed && this.hasErrorHighlightedDescendant());
};

export const blocksCoordinate = () => {
const during_purchase = Blockly.derivWorkspace?.getCanvas().children[1];
const after_purchase = Blockly.derivWorkspace?.getCanvas().children[2];
during_purchase?.setAttribute('transform', 'translate(720,0)');
after_purchase?.setAttribute('transform', 'translate(720,248)');
};

/**
* @deriv/bot: Add check for workspace.getCanvas() before appendChild() is called.
*/
Expand Down
5 changes: 2 additions & 3 deletions packages/bot-skeleton/src/scratch/hooks/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ Blockly.Css.CONTENT = [
'}',

'.injectionDiv {',
'height: 100%;',
'height: calc(100vh - 11rem);',
'position: relative;',
'overflow: hidden;' /* So blocks in drag surface disappear at edges */,
'touch-action: none',
'touch-action: none;',
'}',

'.blocklyNonSelectable {',
Expand Down Expand Up @@ -635,7 +635,6 @@ Blockly.Css.CONTENT = [

'.blocklyMainBackground {',
'stroke-width: 0;',
'fill: var(--general-main-1) !important',
// 'stroke: #c6c6c6;', /* Equates to #ddd due to border being off-pixel. */
'}',

Expand Down
39 changes: 20 additions & 19 deletions packages/bot-skeleton/src/scratch/hooks/trashcan.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
const trashcan_margin = 16;
const core_footer_height = 36;
export const initTrashCan = (margin = 16, height = 36) => {
/**
* Distance between trashcan and bottom edge of workspace.
* @type {number}
* @private
*/
Blockly.Trashcan.prototype.MARGIN_BOTTOM_ = margin * 2 + height; // eslint-disable-line

/**
* Distance between trashcan and bottom edge of workspace.
* @type {number}
* @private
*/
Blockly.Trashcan.prototype.MARGIN_BOTTOM_ = trashcan_margin * 2 + core_footer_height; // eslint-disable-line
/**
* Distance between trashcan and right edge of workspace.
* @type {number}
* @private
*/
Blockly.Trashcan.prototype.MARGIN_SIDE_ = margin; // eslint-disable-line

/**
* Distance between trashcan and right edge of workspace.
* @type {number}
* @private
*/
Blockly.Trashcan.prototype.MARGIN_SIDE_ = trashcan_margin; // eslint-disable-line
/**
* Inspect the contents of the trash.
* @deriv/bot: Noop for us, restore original functionality when trashcan can be inspected.
*/
Blockly.Trashcan.prototype.click = function () {};

/**
* Inspect the contents of the trash.
* @deriv/bot: Noop for us, restore original functionality when trashcan can be inspected.
*/
Blockly.Trashcan.prototype.click = function () {};
window.dispatchEvent(new Event('resize')); // trigger UI update
};
12 changes: 6 additions & 6 deletions packages/bot-skeleton/src/scratch/hooks/workspace_svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,12 +399,12 @@ Blockly.WorkspaceSvg.prototype.dispose = function (should_show_loading = false)
};

if (should_show_loading) {
const { startLoading, endLoading } = DBotStore.instance;
startLoading();
const { setLoading } = DBotStore.instance;
setLoading(true);

setTimeout(() => {
disposeFn();
endLoading();
setLoading(false);
}, 50);
} else {
disposeFn();
Expand All @@ -415,12 +415,12 @@ Blockly.WorkspaceSvg.prototype.dispose = function (should_show_loading = false)
* Dispose of all blocks in workspace, with an optimization to prevent resizes.
*/
Blockly.WorkspaceSvg.prototype.asyncClear = function () {
const { startLoading, endLoading } = DBotStore.instance;
startLoading();
const { setLoading } = DBotStore.instance;
setLoading(true);

return new Promise(resolve => {
this.clear();
endLoading();
setLoading(false);
resolve();
});
};
9 changes: 4 additions & 5 deletions packages/bot-skeleton/src/scratch/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ export const load = ({
workspace,
showIncompatibleStrategyDialog,
}) => {
const { startLoading, endLoading } = DBotStore.instance;
startLoading();
const { setLoading } = DBotStore.instance;
setLoading(true);

setTimeout(async () => {
const showInvalidStrategyError = () => {
endLoading();
setLoading(false);
const error_message = localize('XML file contains unsupported elements. Please check or modify file.');
globalObserver.emit('ui.log.error', error_message);
};
Expand Down Expand Up @@ -153,7 +153,7 @@ export const load = ({
console.error(e); // eslint-disable-line
return showInvalidStrategyError();
} finally {
endLoading();
setLoading(false);
}

return true;
Expand All @@ -176,7 +176,6 @@ export const loadBlocks = (xml, drop_event, event_group, workspace) => {
export const loadWorkspace = async (xml, event_group, workspace) => {
Blockly.Events.setGroup(event_group);
await workspace.asyncClear();

Blockly.Xml.domToWorkspace(xml, workspace);
};

Expand Down
6 changes: 3 additions & 3 deletions packages/bot-skeleton/src/scratch/xml/main.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<xml xmlns="http://www.w3.org/1999/xhtml" collection="false">
<xml xmlns="http://www.w3.org/1999/xhtml" collection="false" is_dbot="true">
<variables></variables>
<block type="trade_definition" x="0" y="0">
<statement name="TRADE_OPTIONS">
Expand Down Expand Up @@ -53,7 +53,7 @@
</block>
</statement>
</block>
<block type="during_purchase" x="770" y="0">
<block type="during_purchase" x="720" y="0">
<statement name="DURING_PURCHASE_STACK">
<block type="controls_if">
<value name="IF0">
Expand All @@ -62,7 +62,7 @@
</block>
</statement>
</block>
<block type="after_purchase" x="770" y="248">
<block type="after_purchase" x="720" y="248">
<statement name="AFTERPURCHASE_STACK">
<block type="trade_again"></block>
</statement>
Expand Down
2 changes: 2 additions & 0 deletions packages/bot-skeleton/src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ export { importExternal } from './html-helper';
export { onWorkspaceResize } from './workspace';
export { getSavedWorkspaces, saveWorkspaceToRecent, removeExistingWorkspace } from './local-storage';
export { timeSince } from './date-time-helper';
export { setColors } from '../scratch/hooks/colours';
export { blocksCoordinate } from '../scratch/hooks/block_svg';
9 changes: 6 additions & 3 deletions packages/bot-skeleton/src/utils/local-storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import LZString from 'lz-string';
import localForage from 'localforage';
import DBotStore from '../scratch/dbot-store';
import { save_types } from '../constants/save-type';

/**
* Save workspace to localStorage
* @param {String} save_type // constants/save_types.js (unsaved, local, googledrive)
Expand All @@ -11,7 +10,11 @@ import { save_types } from '../constants/save-type';
export const saveWorkspaceToRecent = async (xml, save_type = save_types.UNSAVED) => {
// Ensure strategies don't go through expensive conversion.
xml.setAttribute('is_dbot', true);
const { save_modal } = DBotStore.instance;
const {
load_modal: { updateListStrategies },
save_modal,
} = DBotStore.instance;

const workspace_id = Blockly.derivWorkspace.current_strategy_id || Blockly.utils.genUid();
const workspaces = await getSavedWorkspaces();
const current_xml = Blockly.Xml.domToText(xml);
Expand Down Expand Up @@ -43,7 +46,7 @@ export const saveWorkspaceToRecent = async (xml, save_type = save_types.UNSAVED)
if (workspaces.length > 10) {
workspaces.pop();
}

updateListStrategies(workspaces);
localForage.setItem('saved_workspaces', LZString.compress(JSON.stringify(workspaces)));
};

Expand Down
2 changes: 1 addition & 1 deletion packages/bot-skeleton/src/utils/workspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const onWorkspaceResize = () => {

const el_scratch_div = document.getElementById('scratch_div');
if (el_scratch_div) {
el_scratch_div.style.width = '100vw';
el_scratch_div.style.width = 'calc(100vw - 3.2rem)';
el_scratch_div.style.height = 'var(--bot-content-height)';
Blockly.svgResize(workspace);
}
Expand Down
19 changes: 19 additions & 0 deletions packages/bot-web-ui/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const baseConfigForPackages = require('../../jest.config.base');

module.exports = {
...baseConfigForPackages,
clearMocks: true,
moduleNameMapper: {
'\\.s(c|a)ss$': '<rootDir>/../../__mocks__/styleMock.js',
'^.+\\.svg$': '<rootDir>/../../__mocks__/styleMock.js',
'^App/(.*)$': '<rootDir>/src/app/$1',
'^Components/(.*)$': '<rootDir>/src/components/$1',
'^Constants/(.*)$': '<rootDir>/src/constants/$1',
'^Stores/(.*)$': '<rootDir>/src/stores/$1',
'^Utils/(.*)$': '<rootDir>/src/utils/$1',
},
collectCoverageFrom: ['**/*.{js,jsx,ts,tsx}', '!**/node_modules/**'],
globals: {
__webpack_public_path__: '/',
},
};
Loading

1 comment on commit 9047b46

@vercel
Copy link

@vercel vercel bot commented on 9047b46 May 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

deriv-app – ./

binary.sx
deriv-app.vercel.app
deriv-app.binary.sx
deriv-app-git-master.binary.sx

Please sign in to comment.