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

FIX: Arrow key navigation of Input Actions after Action rename. #2082

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

tspiller
Copy link
Collaborator

@tspiller tspiller commented Dec 9, 2024

Description

ActionsTreeView should use RefreshItems in Unity 6000.0 onwards to have the same behaviour as ActionMapsView. This allows keyboard navigation after renaming.
It is not a perfect fix, as the limitations of UIToolkit and InputSystem refresh mean that the action will still lose focus occasionally. However this is the current behaviour of Action Maps and Actions should match that as closely as possible.

Testing status & QA

Local Testing.
Added new CanRenameAction test.

Overall Product Risks

Complexity: Low
Halo Effect: None

Comments to reviewers

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

After merge:

  • Create forward/backward port if needed. If you are blocked from creating a forward port now please add a task to ISX-1444.

Copy link
Collaborator

@ekcoh ekcoh left a comment

Choose a reason for hiding this comment

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

Changes LGTM, thanks for adding a corresponding test case to prevent future regression.

@@ -173,5 +189,51 @@ public IEnumerator CanDeleteActionMap()
Assert.That(m_Window.currentAssetInEditor.actionMaps[0].name, Is.EqualTo("First Name"));
Assert.That(m_Window.currentAssetInEditor.actionMaps[1].name, Is.EqualTo("Third Name"));
}

[UnityTest]
public IEnumerator CanRenameAction()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Awesome you've added a proper editor test for this. Thank you!

@tspiller tspiller force-pushed the isxb-1024-action-navigation-after-rename branch from 6181acc to 249949b Compare December 10, 2024 10:08
Copy link
Collaborator

@Pauliusd01 Pauliusd01 left a comment

Choose a reason for hiding this comment

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

Context menu messes up if you right click in rename mode. (Double click on an action to enter rename mode -> rightclick)

10.12.2024.-.Unity.67.mp4

@Pauliusd01
Copy link
Collaborator

Pauliusd01 commented Dec 10, 2024

If you duplicate while in rename mode that action stays in rename mode instead of cancelling it

10.12.2024.-.Unity.68.mp4

@Pauliusd01
Copy link
Collaborator

Odd behaviour after renaming a map -> action and then action again

10.12.2024.-.Unity.69.mp4

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.

3 participants