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

[DTRA]Ahmad/ Hour Picker and Other fixes #17168

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

ahmadtaimoor-deriv
Copy link
Contributor

@ahmadtaimoor-deriv ahmadtaimoor-deriv commented Oct 14, 2024

Changes:

In this PR, an hour picker is created that is responsible for handling the hour and mins as per trade type and symbol. with previous implementation , an unusual behavior was found with wheelpicker. It is extracted out from other implementation .

With that the expiry time of the trade-type and symbol is also fixed . It was identified by QA . Now the expiry-time is as per the market and trade-type (same as V1)

Also it was noticed that the if there is an error in for eg Rise-Fall and we move to Higher-lower , it would show empty-wheelpicker. This is also fixed.

Also the possible error are shown on the datepicker when selecting date just so that we can cater some conditions there . A snackbar would be shown for that

Copy link

vercel bot commented Oct 14, 2024

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

Name Status Preview Updated (UTC)
deriv-app ✅ Ready (Inspect) Visit Preview Oct 16, 2024 3:29pm

@ahmadtaimoor-deriv ahmadtaimoor-deriv marked this pull request as draft October 14, 2024 03:26
@ahmadtaimoor-deriv ahmadtaimoor-deriv changed the title Ahmad/ Hour Picker and Other fixes [DTRA]Ahmad/ Hour Picker and Other fixes Oct 14, 2024
@coveralls
Copy link

coveralls commented Oct 14, 2024

Pull Request Test Coverage Report for Build 11368500251

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

  • 57 of 75 (76.0%) changed or added relevant lines in 6 files are covered.
  • 1100 unchanged lines in 40 files lost coverage.
  • Overall coverage increased (+0.07%) to 53.678%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/trader/src/AppV2/Components/TradeParameters/Duration/duration.tsx 1 4 25.0%
packages/trader/src/AppV2/Components/TradeParameters/Duration/day.tsx 18 33 54.55%
Files with Coverage Reduction New Missed Lines %
packages/account/src/Sections/Verification/ProofOfIdentity/onfido.jsx 1 5.56%
packages/wallets/src/components/DerivAppsSection/DerivAppsGetAccount.tsx 1 80.6%
packages/trader/src/AppV2/Components/TradeParameters/Duration/day.tsx 1 71.11%
packages/trader/src/AppV2/Components/TradeParameters/Duration/chips.tsx 1 92.86%
packages/account/src/Sections/Profile/PersonalDetails/verify-button.tsx 1 95.38%
packages/core/src/Utils/Analytics/index.ts 1 0.0%
packages/cashier/src/modules/cashier-onboarding/components/cashier-onboarding-side-notes/cashier-onboarding-side-note-fiat.tsx 1 71.43%
packages/wallets/src/features/accounts/modules/ManualService/components/DrivingLicenseUpload/DrivingLicenseUpload.tsx 1 0.0%
packages/cashier/src/components/cashier-locked/cashier-locked-provider.tsx 1 84.34%
packages/wallets/src/features/accounts/modules/ManualService/components/PassportUpload/PassportUpload.tsx 1 0.0%
Totals Coverage Status
Change from base Build 11292855579: 0.07%
Covered Lines: 34782
Relevant Lines: 60313

💛 - Coveralls

Copy link
Contributor

github-actions bot commented Oct 14, 2024

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

Click here to copy & paste above information.
- **PR**: [https://github.com/deriv-com/deriv-app/pull/17168](https://github.com/deriv-com/deriv-app/pull/17168)
- **URLs**:
    - **w/ App ID + Server**: https://deriv-app-git-fork-ahmadtaimoor-deriv-fdurationfix.binary.sx?qa_server=red.derivws.com&app_id=31481
    - **Original**: https://deriv-app-git-fork-ahmadtaimoor-deriv-fdurationfix.binary.sx
- **App ID**: `31481`

Copy link
Contributor

github-actions bot commented Oct 14, 2024

🚨 Lighthouse report for the changes in this PR:

Category Score
🔺 Performance 27
🟧 Accessibility 70
🟢 Best practices 92
🟧 SEO 77
🟧 PWA 78

Lighthouse ran with https://deriv-app-git-fork-ahmadtaimoor-deriv-fdurationfix.binary.sx/

new Date((response?.proposal?.date_expiry as number) * 1000)
.toISOString()
.split('T')[1]
.substring(0, 8)
Copy link
Contributor

Choose a reason for hiding this comment

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

.split('T')[1].substring(0, 8) doesn't seems to be super safe, but I can't suggest something

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean you can ignore my comment

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 think it won't be an unsafe unless the response?.proposal?.date_expiry is something invalid like undefined . And so I already added check to see if response?.proposal?.date_expiry is valid.

Copy link
Contributor

Generating Lighthouse report...

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