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

Delay transition #684

Merged
merged 13 commits into from
Aug 31, 2022
Merged

Delay transition #684

merged 13 commits into from
Aug 31, 2022

Conversation

darrenburns
Copy link
Member

@darrenburns darrenburns commented Aug 16, 2022

Stacked on top of #683 - review that one first.

@darrenburns darrenburns changed the base branch from css to animation-callback August 16, 2022 14:38
@darrenburns darrenburns marked this pull request as ready for review August 16, 2022 15:16
Copy link
Collaborator

@willmcgugan willmcgugan left a comment

Choose a reason for hiding this comment

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

This solution will invoke the callback during the "delay" period. The end result will be correct, in that the user will see the delay. The downside is that the animator is working during the delay period and not updating anything.

Ideally the animator would not do any work until the delay has expired.

If this looks particularly complex to implement, suggest putting in a early-out condition. i.e. if the delay hasn't expired return as early as possible.

Base automatically changed from animation-callback to css August 19, 2022 13:55
Copy link
Collaborator

@willmcgugan willmcgugan left a comment

Choose a reason for hiding this comment

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

Just one thing to consider.

src/textual/_animator.py Outdated Show resolved Hide resolved
@willmcgugan willmcgugan merged commit fe49b36 into css Aug 31, 2022
@willmcgugan willmcgugan deleted the delay-transition branch August 31, 2022 10:47
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