InputSystem icon indicating copy to clipboard operation
InputSystem copied to clipboard

CHANGE: prevent editing of composite parts

Open smnwttbr opened this issue 9 months ago • 1 comments

Description

When deleting parts of a composite action, the deletion of the last part raises an exception.

Changes made

Preventing changes to a composite part via context menu and commands.

Notes

We decided to do this as it does not make sense from a user perspective to modify a composite action. Composite actions are created and configured with the appropriate parts using menu items, which create create the composite using pre-determined patterns. The user is already prevented from adding parts to the composite by the absence of the '+' menu, so it makes sense to remove the corresponding cut/paste/delete items.

Checklist

Before review:

  • [x] Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • FogBugz ticket attached, example ([case %number%](https://issuetracker.unity3d.com/issues/...)).
    • FogBugz is marked as "Resolved" with next release version correctly set.
  • [ ] 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:

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

smnwttbr avatar May 10 '24 02:05 smnwttbr

Still looking at it but my initial thoughts are that deletion, duplication and the context menu should all be available. For composites you can have different bindings for the same action that you might no longer need, for example WASD and arrow keys under one action, just like in our own ProjectWideActions asset. With these changes you can no longer delete or create them. How were the extra bindings created? Duplication I assume. Why isn't there a direct way to just create one? I don't know but in my opinion there should be one. Which kinda questions the whole need for these changes

And the context menu should instead grey out options instead of being blocked from showing up entirely if we decide that this change is needed. A greyed out context menu at least signals that the action being blocked is intentional while a right-click that does nothing may appear as a bug

Pauliusd01 avatar May 10 '24 12:05 Pauliusd01