Skip to content

Add custom fly-to duration slider#228

Open
alexanderbock wants to merge 2 commits into
masterfrom
feature/custom-fly-to
Open

Add custom fly-to duration slider#228
alexanderbock wants to merge 2 commits into
masterfrom
feature/custom-fly-to

Conversation

@alexanderbock

Copy link
Copy Markdown
Member

Adds a new optional slider to the Navigation Settings menu that can control whether to provide a custom duration:

After:
image

Before:
image

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a user-configurable “Override Fly-to Duration” setting to the Navigation Settings popout, storing the preference in local Redux state and applying it when executing navigation.flyTo.

Changes:

  • Extend LocalState with menus.navigation.flyToOverrideDuration (enabled + duration) and add reducers to update it.
  • Add a checkbox + slider + numeric input to Navigation Settings to control the override.
  • Apply the override duration in NodeNavigationButton when triggering Fly navigation.
  • Add the new English translation key for the settings label.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/redux/local/localSlice.ts Adds local Redux state + actions for fly-to duration override.
src/panels/NavigationPanel/NavigationSettings.tsx Adds UI controls (checkbox + slider + numeric input) to manage the override.
src/components/NodeNavigationButton/NodeNavigationButton.tsx Uses the override duration when calling luaApi.navigation.flyTo.
public/locales/en/panel-navigation.json Adds the translation string for the new setting label.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/panels/NavigationPanel/NavigationSettings.tsx
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@alexanderbock

Copy link
Copy Markdown
Member Author

Needs an info button to explain the interaction with the speed scale slider

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