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-2471 / Kate / DND console error #17859

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

Conversation

kate-deriv
Copy link
Contributor

@kate-deriv kate-deriv commented Dec 19, 2024

Changes:

Reasons:
TrackJS {"message":"Invariant failed"} was caused by react-beautiful-dnd library, that is used for trade types drag-and-drop functionality. In all logs users were changing the order of trade types and get an error. In dev mode on localhost it's possible to reproduce it and get 'Droppable: unsupported nested scroll container detected.A Droppable can only have one scroll parent (which can be itself)Nested scroll containers are currently not supported.'.
Solutions:
There are 3 ways of solving the issue:

  1. To find all parents containers with overflow css property equal to scroll/auto and make them not scrollable. According to the library documentation it's possible to have only 1 scrollable parent, so in my implementation it's action-sheet--content trade-types-dialog__content, because we want to leave trade types scrollable on small screens.
  2. Replace library with the new one. react-beautiful-dnd library will be deprecated in 2025 (link1 and link2), so sooner or earlier we need to migrate to another library.
  3. Remove warnings and errors from the library (link). with the command window['__react-beautiful-dnd-disable-dev-warnings'] = true; . Not recommended

Screenshots:

Screenshot 2024-12-19 at 11 04 50 AM Screenshot 2024-12-19 at 11 05 06 AM

Screenshot of the error on localhost
Screenshot 2024-12-17 at 11 45 43 AM

Copy link

vercel bot commented Dec 19, 2024

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

Name Status Preview Updated (UTC)
deriv-app ✅ Ready (Inspect) Visit Preview Dec 19, 2024 8:21am

@coveralls
Copy link

coveralls commented Dec 19, 2024

Pull Request Test Coverage Report for Build 12408672835

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 53.917%

Totals Coverage Status
Change from base Build 12407631215: 0.002%
Covered Lines: 33033
Relevant Lines: 57094

💛 - Coveralls

Copy link
Contributor

github-actions bot commented Dec 19, 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/17859](https://github.com/deriv-com/deriv-app/pull/17859)
- **URLs**:
    - **w/ App ID + Server**: https://deriv-app-git-fork-kate-deriv-kate-dtra-2471dndlibraryre-e70b2a.binary.sx?qa_server=red.derivws.com&app_id=24041
    - **Original**: https://deriv-app-git-fork-kate-deriv-kate-dtra-2471dndlibraryre-e70b2a.binary.sx
- **App ID**: `24041`

Copy link
Contributor

github-actions bot commented Dec 19, 2024

🚨 Lighthouse report for the changes in this PR:

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

Lighthouse ran with https://deriv-app-git-fork-kate-deriv-kate-dtra-2471dndlibraryre-e70b2a.binary.sx/

Copy link
Contributor

github-actions bot commented Dec 19, 2024

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