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

Add an artificial delay to FiatCurrencySettings page #133

Merged
merged 2 commits into from
Nov 3, 2022

Conversation

erdemyerebasmaz
Copy link
Collaborator

@erdemyerebasmaz erdemyerebasmaz commented Oct 6, 2022

This PR addresses #132

Initially, I assumed we were not displaying a loader while the fiat currency data is being loaded. However, it seems drag_and_drop_list dependency has a performance issue with displaying large lists which blocks the UI thread.

Since fiat currency data is loaded almost immediately, the UI thread is blocked on the page that's navigating to FiatCurrencySettings until DragAndDropList is ready to display it's items. This behavior hid critical UI feedback, page route animation & loading animation from the user.

An artificial delay of 800ms is added to render page route animation + few spins of loader first before UI thread is blocked as a workaround.

Here's a video showing the UI behavior w/ & w/o the solution:

VN20221006_132406.mp4

@erdemyerebasmaz
Copy link
Collaborator Author

erdemyerebasmaz commented Oct 6, 2022

One other suggestion is using DragAndDropList for selected currencies only and ListView for the unselected fiat currencies since we're only using drag & drop operations on selected currencies.

However, it has it's own set of issues:

SVID_20221010_112430_1.mp4

These issues do exist on using a single DragAndDropList but not encountered due to the sheer size of the list.

@erdemyerebasmaz erdemyerebasmaz merged commit 480a0eb into main Nov 3, 2022
@erdemyerebasmaz erdemyerebasmaz deleted the drag_and_drop_list_ui_thread_workaround branch November 24, 2022 11:48
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.

2 participants