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 animation categories to enable finer transitions control #941

Merged
merged 2 commits into from
Apr 26, 2022

Conversation

Guldoman
Copy link
Member

What this PR does

The following categories are implemented:

config.disabled_transitions = {
  scroll = false,
  commandview = false,
  contextmenu = false,
  logview = false,
  nagbar = false,
  tabs = false,
  tab_drag = false,
  statusbar = false,
}

Suggestions are welcome to rename them, add more or remove some.

To disable an animation, in the user module add:

config.disabled_transitions.commandview = true
config.disabled_transitions.contextmenu = true

To disable all the animations, the old method can still be used:

config.transitions = false

To enable al the animations:

config.transitions = true
config.disabled_transitions = { }

Alternative proposed by @adamharrison

To disable an animation, in the user module add:

config.transitions.commandview = false
config.transitions.contextmenu = false

To disable all the animations, the old method can still be used:

config.transitions = false

To enable al the animations:

config.transitions = { }

Closes #893.

@adamharrison
Copy link
Member

Just as a clarification on my reasoning for the alternate proposal:

  1. It keeps it in line with how config.plugins work; so that we don't have two different structures; it's just the same structure over again.
  2. We don't actually need to enable; transitions are always enabled by default; you'd either selectively disable them, or disable them entirely in your user module.

@TorchedSammy
Copy link
Contributor

even though the 2nd proposal might be in line with how plugins are, the 1st makes more sense, as config.transitions wouldn't be 2 types, and allows easier toggle between all animations disabled vs specific ones

so i say go with 1st

@adamharrison
Copy link
Member

OK, merging as-is, then.

@adamharrison adamharrison merged commit f42dbb0 into lite-xl:master Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to disable specific animations
3 participants