Skip to content

Conversation

@maryia-deriv
Copy link
Contributor

@maryia-deriv maryia-deriv commented Nov 17, 2023

Changes:

To implement new Swipeable notifications for trade statuses.

Requirements:

  1. On the main DTrader page in Responsive:

    • User buys a contract -> old grey ‘The purchase XXX has been completed’ notification should not appear, and a new grey ‘Trade opened’ notification should appear with respective ‘Stake’
    • User sells a contract -> old ‘Contract sold’ notification should not appear, and a new ‘Trade closed’ notification should appear with respective PnL
    • User cancels a Multipliers contract -> old ‘Contract canceled’ notification should not appear, and a new ‘Trade closed’ notification should appear with respective PnL
    • The contract is lost -> a new light-red ‘Trade closed’ notification should appear with respective negative PnL
    • The contract is won -> a new light-green ‘Trade closed’ notification should appear with respective positive PnL
    • The contract has 0.00 PnL -> a new light-green ‘Trade closed’ notification should appear with 0.00 PnL
  2. Display no more than 3 notifications at a time

  3. Redirect to C.Details on click

  4. Automatic disappearance after 3 seconds

  5. Animation:

    • Appears: from the left
    • on left swipe: disappears to the left
    • on right swipe: disappears to the right
    • Automatic disappearance: to the left
  6. Timestamp should Not be displayed on ‘Trade opened’ notifications

  7. Timestamp should be displayed on ‘Trade closed’ notifications only:

    • ‘now’ should be displayed on the notification instead of ‘XXs ago’ when an event it describes (sell/cancel/winning/losing the contract) happened less than 10 seconds ago (<= 9 seconds ago)
    • time should show ‘XXs ago’ only starting from 10 seconds and continue counting up
  8. ‘Stake’ should be shown in ‘Trade opened’ notification regardless of whether a user selected stake or payout. Stake should not have a sign '+' before the amount.

  9. Users should still get ‘Contract sold’ old notification in Reports and C.Details when they sell a contract both in mobile and desktop, and on the main DTrader page only in desktop

  10. Users should still get ‘Contract canceled’ old notification in Reports and C.Details when they cancel a Multipliers contract both in mobile and desktop, and on the main DTrader page only in desktop

  11. New notifications should not appear on desktop

Screenshots:

Screenshot 2023-11-24 at 10 11 53 AM

Additional changes:

  • Fix for the Stake amount for Multipliers with Deal Cancellation in the notification.

@vercel
Copy link

vercel bot commented Nov 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
deriv-app ✅ Ready (Inspect) Visit Preview Dec 7, 2023 7:40am

@github-actions
Copy link
Contributor

github-actions bot commented Nov 17, 2023

A production App ID was automatically generated for this PR. (log)

Click here to copy & paste above information.
- **PR**: [https://github.com/binary-com/deriv-app/pull/11551](https://github.com/binary-com/deriv-app/pull/11551)
- **URLs**:
    - **w/ App ID + Server**: https://deriv-app-git-fork-maryia-deriv-maryia-dtra-445contract-d377ed.binary.sx?qa_server=red.derivws.com&app_id=23879
    - **Original**: https://deriv-app-git-fork-maryia-deriv-maryia-dtra-445contract-d377ed.binary.sx
- **App ID**: `23879`

@github-actions
Copy link
Contributor

github-actions bot commented Nov 17, 2023

🚨 Lighthouse report for the changes in this PR:

Category Score
🔺 Performance 15
🟧 Accessibility 75
🟢 Best practices 92
🟢 SEO 92
🟧 PWA 80

Lighthouse ran with https://deriv-app-git-fork-maryia-deriv-maryia-dtra-445contract-d377ed.binary.sx/

heorhi-deriv
heorhi-deriv previously approved these changes Dec 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2023

❌ Smoke test run (2) failed. See logs for details: Visit Action

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2023

❌ Smoke test run (1) failed. See logs for details: Visit Action

@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2023

❌ Smoke test run (1) failed. See logs for details: Visit Action

@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2023

❌ Smoke test run (2) failed. See logs for details: Visit Action

@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2023

❌ Smoke test run (2) failed. See logs for details: Visit Action

@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2023

❌ Smoke test run (1) failed. See logs for details: Visit Action

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
24.9% 24.9% Duplication

@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2023

❌ Smoke test run (2) failed. See logs for details: Visit Action

@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2023

❌ Smoke test run (2) failed. See logs for details: Visit Action

@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2023

❌ Smoke test run (1) failed. See logs for details: Visit Action

@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2023

❌ Smoke test run (1) failed. See logs for details: Visit Action

@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2023

❌ Smoke test run (2) failed. See logs for details: Visit Action

@balakrishna-deriv balakrishna-deriv merged commit e77245a into deriv-com:master Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants