Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nada/feat: implementation of copy ads #102

Merged
merged 13 commits into from
Jun 10, 2024
Merged

Nada/feat: implementation of copy ads #102

merged 13 commits into from
Jun 10, 2024

Conversation

nada-deriv
Copy link
Contributor

@nada-deriv nada-deriv commented Jun 6, 2024

Screen.Recording.2024-06-06.at.3.51.43.PM.mov
Screen.Recording.2024-06-06.at.11.13.49.PM.mov
Screenshot 2024-06-07 at 12 15 43 AM

Copy advert feature
Fix issue with validation in create/edit ad
Fix order completion time not passed in create/edit ad

@nada-deriv nada-deriv changed the title feat: implementation of copy ads Nada/feat: implementation of copy ads Jun 6, 2024
@coveralls
Copy link

coveralls commented Jun 6, 2024

Pull Request Test Coverage Report for Build 9401031472

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 64 of 127 (50.39%) changed or added relevant lines in 16 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-1.0%) to 74.219%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/components/Modals/CopyAdFormModal/CopyAdFormModal.tsx 6 7 85.71%
src/utils/ad-utils.ts 0 1 0.0%
src/components/CopyAdForm/CopyAdFormDisplayWrapper.tsx 6 11 54.55%
src/pages/my-ads/screens/MyAds/MyAdsTableRow/MyAdsTableRowView.tsx 18 45 40.0%
src/components/CopyAdForm/CopyAdForm.tsx 12 41 29.27%
Files with Coverage Reduction New Missed Lines %
src/hooks/api/payment-method/p2p-advertiser-payment-methods/useAdvertiserPaymentMethods.ts 1 28.57%
src/utils/ad-utils.ts 1 38.98%
Totals Coverage Status
Change from base Build 9394872012: -1.0%
Covered Lines: 4447
Relevant Lines: 5400

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 6, 2024

Pull Request Test Coverage Report for Build 9403484156

Details

  • 64 of 127 (50.39%) changed or added relevant lines in 16 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-1.0%) to 74.219%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/components/Modals/CopyAdFormModal/CopyAdFormModal.tsx 6 7 85.71%
src/utils/ad-utils.ts 0 1 0.0%
src/components/CopyAdForm/CopyAdFormDisplayWrapper.tsx 6 11 54.55%
src/pages/my-ads/screens/MyAds/MyAdsTableRow/MyAdsTableRowView.tsx 18 45 40.0%
src/components/CopyAdForm/CopyAdForm.tsx 12 41 29.27%
Files with Coverage Reduction New Missed Lines %
src/hooks/api/payment-method/p2p-advertiser-payment-methods/useAdvertiserPaymentMethods.ts 1 28.57%
src/utils/ad-utils.ts 1 38.98%
Totals Coverage Status
Change from base Build 9403467425: -1.0%
Covered Lines: 4447
Relevant Lines: 5400

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 6, 2024

Pull Request Test Coverage Report for Build 9406568005

Details

  • 64 of 127 (50.39%) changed or added relevant lines in 16 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-1.0%) to 74.219%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/components/Modals/CopyAdFormModal/CopyAdFormModal.tsx 6 7 85.71%
src/utils/ad-utils.ts 0 1 0.0%
src/components/CopyAdForm/CopyAdFormDisplayWrapper.tsx 6 11 54.55%
src/pages/my-ads/screens/MyAds/MyAdsTableRow/MyAdsTableRowView.tsx 18 45 40.0%
src/components/CopyAdForm/CopyAdForm.tsx 12 41 29.27%
Files with Coverage Reduction New Missed Lines %
src/hooks/api/payment-method/p2p-advertiser-payment-methods/useAdvertiserPaymentMethods.ts 1 28.57%
src/utils/ad-utils.ts 1 38.98%
Totals Coverage Status
Change from base Build 9403467425: -1.0%
Covered Lines: 4447
Relevant Lines: 5400

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 6, 2024

Pull Request Test Coverage Report for Build 9406999844

Details

  • 92 of 132 (69.7%) changed or added relevant lines in 17 files are covered.
  • 6 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.4%) to 74.824%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/utils/ad-utils.ts 0 1 0.0%
src/components/CopyAdForm/CopyAdForm.tsx 30 41 73.17%
src/pages/my-ads/screens/MyAds/MyAdsTableRow/MyAdsTableRowView.tsx 19 47 40.43%
Files with Coverage Reduction New Missed Lines %
src/hooks/api/payment-method/p2p-advertiser-payment-methods/useAdvertiserPaymentMethods.ts 1 28.57%
src/utils/ad-utils.ts 1 38.98%
src/components/BuySellForm/BuySellAmount/index.ts 2 33.33%
src/components/BuySellForm/BuySellData/index.ts 2 33.33%
Totals Coverage Status
Change from base Build 9403467425: -0.4%
Covered Lines: 4476
Relevant Lines: 5409

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 6, 2024

Pull Request Test Coverage Report for Build 9407262061

Details

  • 97 of 132 (73.48%) changed or added relevant lines in 17 files are covered.
  • 6 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.3%) to 74.905%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/utils/ad-utils.ts 0 1 0.0%
src/components/CopyAdForm/CopyAdForm.tsx 35 41 85.37%
src/pages/my-ads/screens/MyAds/MyAdsTableRow/MyAdsTableRowView.tsx 19 47 40.43%
Files with Coverage Reduction New Missed Lines %
src/hooks/api/payment-method/p2p-advertiser-payment-methods/useAdvertiserPaymentMethods.ts 1 28.57%
src/utils/ad-utils.ts 1 38.98%
src/components/BuySellForm/BuySellAmount/index.ts 2 33.33%
src/components/BuySellForm/BuySellData/index.ts 2 33.33%
Totals Coverage Status
Change from base Build 9403467425: -0.3%
Covered Lines: 4481
Relevant Lines: 5409

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 6, 2024

Pull Request Test Coverage Report for Build 9407266613

Details

  • 97 of 132 (73.48%) changed or added relevant lines in 17 files are covered.
  • 6 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.3%) to 74.905%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/utils/ad-utils.ts 0 1 0.0%
src/components/CopyAdForm/CopyAdForm.tsx 35 41 85.37%
src/pages/my-ads/screens/MyAds/MyAdsTableRow/MyAdsTableRowView.tsx 19 47 40.43%
Files with Coverage Reduction New Missed Lines %
src/hooks/api/payment-method/p2p-advertiser-payment-methods/useAdvertiserPaymentMethods.ts 1 28.57%
src/utils/ad-utils.ts 1 38.98%
src/components/BuySellForm/BuySellAmount/index.ts 2 33.33%
src/components/BuySellForm/BuySellData/index.ts 2 33.33%
Totals Coverage Status
Change from base Build 9403467425: -0.3%
Covered Lines: 4481
Relevant Lines: 5409

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 6, 2024

Pull Request Test Coverage Report for Build 9407297662

Details

  • 97 of 132 (73.48%) changed or added relevant lines in 17 files are covered.
  • 6 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.3%) to 74.905%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/utils/ad-utils.ts 0 1 0.0%
src/components/CopyAdForm/CopyAdForm.tsx 35 41 85.37%
src/pages/my-ads/screens/MyAds/MyAdsTableRow/MyAdsTableRowView.tsx 19 47 40.43%
Files with Coverage Reduction New Missed Lines %
src/hooks/api/payment-method/p2p-advertiser-payment-methods/useAdvertiserPaymentMethods.ts 1 28.57%
src/utils/ad-utils.ts 1 38.98%
src/components/BuySellForm/BuySellAmount/index.ts 2 33.33%
src/components/BuySellForm/BuySellData/index.ts 2 33.33%
Totals Coverage Status
Change from base Build 9403467425: -0.3%
Covered Lines: 4481
Relevant Lines: 5409

💛 - Coveralls

@nada-deriv nada-deriv marked this pull request as ready for review June 7, 2024 04:31
Comment on lines +93 to +94
const labelSize = isMobile ? 'sm' : 'xs';
const valueSize = isMobile ? 'md' : 'sm';
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to start to consider the tablet view.

Suggested change
const labelSize = isMobile ? 'sm' : 'xs';
const valueSize = isMobile ? 'md' : 'sm';
const labelSize = isDesktop ? 'xs' : 'sm';
const valueSize = isDesktop ? 'sm' : 'md';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

since this uses the same components as the ones in create/edit ad it might break the existing ones.

Copy link
Contributor

Choose a reason for hiding this comment

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

probs we need to create another card to check the responsive sizings for the whole of v2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah.. also we might need design.. because for the copy ads i tried the mobile design for tablet and it looks really bad..

@coveralls
Copy link

coveralls commented Jun 7, 2024

Pull Request Test Coverage Report for Build 9412383731

Details

  • 97 of 132 (73.48%) changed or added relevant lines in 17 files are covered.
  • 6 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.3%) to 74.905%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/utils/ad-utils.ts 0 1 0.0%
src/components/CopyAdForm/CopyAdForm.tsx 35 41 85.37%
src/pages/my-ads/screens/MyAds/MyAdsTableRow/MyAdsTableRowView.tsx 19 47 40.43%
Files with Coverage Reduction New Missed Lines %
src/hooks/api/payment-method/p2p-advertiser-payment-methods/useAdvertiserPaymentMethods.ts 1 28.57%
src/utils/ad-utils.ts 1 38.98%
src/components/BuySellForm/BuySellAmount/index.ts 2 33.33%
src/components/BuySellForm/BuySellData/index.ts 2 33.33%
Totals Coverage Status
Change from base Build 9403467425: -0.3%
Covered Lines: 4481
Relevant Lines: 5409

💛 - Coveralls

const CopyAdForm = ({
formValues,
isModalOpen,
onClickCancel,
Copy link
Contributor

Choose a reason for hiding this comment

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

can't we use the onRequestClose for this? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i have removed the prop. its not needed.

@coveralls
Copy link

coveralls commented Jun 10, 2024

Pull Request Test Coverage Report for Build 9444143006

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 97 of 132 (73.48%) changed or added relevant lines in 17 files are covered.
  • 15 unchanged lines in 7 files lost coverage.
  • Overall coverage decreased (-0.4%) to 74.899%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/utils/ad-utils.ts 0 1 0.0%
src/components/CopyAdForm/CopyAdForm.tsx 35 41 85.37%
src/pages/my-ads/screens/MyAds/MyAdsTableRow/MyAdsTableRowView.tsx 19 47 40.43%
Files with Coverage Reduction New Missed Lines %
src/hooks/api/payment-method/p2p-advertiser-payment-methods/useAdvertiserPaymentMethods.ts 1 28.57%
src/pages/advertiser/screens/Advertiser/Advertiser.tsx 1 86.11%
src/utils/ad-utils.ts 1 38.98%
src/components/BuySellForm/BuySellAmount/index.ts 2 33.33%
src/components/BuySellForm/BuySellData/index.ts 2 33.33%
src/components/BuySellForm/BuySellPaymentSection/BuySellPaymentSection.tsx 3 87.18%
src/components/BuySellForm/BuySellForm.tsx 5 82.26%
Totals Coverage Status
Change from base Build 9403467425: -0.4%
Covered Lines: 4489
Relevant Lines: 5419

💛 - Coveralls

Copy link

Preview Link: https://nada-FEQ-2197-copy-a.deriv-p2p-app.pages.dev

Name Result
Build status Completed ✅
Preview URL Visit Preview
Action URL Visit Action

@coveralls
Copy link

coveralls commented Jun 10, 2024

Pull Request Test Coverage Report for Build 9445264013

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 97 of 132 (73.48%) changed or added relevant lines in 17 files are covered.
  • 15 unchanged lines in 7 files lost coverage.
  • Overall coverage decreased (-0.4%) to 74.899%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/utils/ad-utils.ts 0 1 0.0%
src/components/CopyAdForm/CopyAdForm.tsx 35 41 85.37%
src/pages/my-ads/screens/MyAds/MyAdsTableRow/MyAdsTableRowView.tsx 19 47 40.43%
Files with Coverage Reduction New Missed Lines %
src/hooks/api/payment-method/p2p-advertiser-payment-methods/useAdvertiserPaymentMethods.ts 1 28.57%
src/pages/advertiser/screens/Advertiser/Advertiser.tsx 1 86.11%
src/utils/ad-utils.ts 1 38.98%
src/components/BuySellForm/BuySellAmount/index.ts 2 33.33%
src/components/BuySellForm/BuySellData/index.ts 2 33.33%
src/components/BuySellForm/BuySellPaymentSection/BuySellPaymentSection.tsx 3 87.18%
src/components/BuySellForm/BuySellForm.tsx 5 82.26%
Totals Coverage Status
Change from base Build 9403467425: -0.4%
Covered Lines: 4489
Relevant Lines: 5419

💛 - Coveralls

@farrah-deriv farrah-deriv merged commit 31ab10f into deriv-com:master Jun 10, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants