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 support for env variable TEXTUAL_ANIMATIONS #4062

Merged
merged 17 commits into from
Feb 19, 2024

Commits on Jan 23, 2024

  1. Configuration menu
    Copy the full SHA
    d1d6fe2 View commit details
    Browse the repository at this point in the history
  2. Restrict when animations happen.

    Go over 'all' (as far as I can tell) animations in Textual. Most of them should only run when the env variable TEXTUAL_ANIMATIONS is set to FULL.
    A few animations may run on the level BASIC, which are animations that don't delay content appearing:
     - indeterminate progress bars
     - loading indicators
     - button presses
     - tab underlines
     - switch toggles
     - all (?) types of scrolling.
    
    These animations are completely disabled when the env var is NONE.
    
    The indeterminate progress bar displays a full, static bar and the loading indicator displays a string 'Loading...'.
    
    Many animation-related methods also grew a keyword parameter 'animate_on_level' that establishes the minimum level for said animation to take place.
    rodrigogiraoserrao committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    136da2f View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2024

  1. Use 'SHOW_ANIMATIONS' from original namespace.

    By using 'constants.SHOW_ANIMATIONS' instead of importing the constant directly we make it easier to patch for testing.
    
    See: https://mathspp.com/blog/til/patching-module-globals-with-pytest
    rodrigogiraoserrao committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    fda29ea View commit details
    Browse the repository at this point in the history
  2. Add 'App.show_animations'.

    The original issue (#3992) asked for a property on 'App' that allows controlling whether that app's animations should be played or not.
    rodrigogiraoserrao committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    37e7668 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    98d4fd2 View commit details
    Browse the repository at this point in the history
  4. Add tests for 'basic' animations.

    Check that animations that should happen on the BASIC level do happen at that level and don't happen on the NONE level.
    rodrigogiraoserrao committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    ef55ab3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    023bb33 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    89844e8 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    add06b6 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2024

  1. Configuration menu
    Copy the full SHA
    66f3ec6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    13c1815 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2024

  1. Configuration menu
    Copy the full SHA
    15b2063 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    264a985 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    350d53b View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2024

  1. Move AnimationLevel to _types.

    See review comment: #4062 (comment).
    rodrigogiraoserrao committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    14f83e5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6b1e166 View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2024

  1. Configuration menu
    Copy the full SHA
    5cb2471 View commit details
    Browse the repository at this point in the history