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

Draft for async loading #57

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

xarvic
Copy link
Collaborator

@xarvic xarvic commented Apr 12, 2023

This is a sketch for async loading of view sequences.

ViewSequence currently acts as the interface between views which do layout and strategies for loading views. This PR tries to add a way for layout views like LinearLayout to request the parts of a ViewSequencewhich would be visible while keeping the the identity for a specific view which should stay in focus.

It adds a set_focus method to the ViewSequence trait. This method can be used by sequences with a variable length to load only the elements which would be visible.
The rebuild method is changed to return a SequencePosition this marks the index of the element marked in set_focus in the rebuild sequence. Using this the container could call a method like druids scroll_area_to_view() to keep the the element in view.

This is a idea i had for some time, which i would like to discuss in the office hours. The implementation for the backend is missing and the design for SequencePosition also needs some work.

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.

1 participant