Make it easier to reorder AssetGroup and AssetFilter.#67
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces functionality to allow reordering of AssetGroup and AssetFilter items by specific offsets via new "Move Up By" and "Move Down By" menu options.
- Added new events and methods to compute movable options based on the current index.
- Updated UI elements (views) and undo history registration messages to support offset-based movement.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Assets/SmartAddresser/Editor/Core/Tools/Addresser/Shared/AssetGroups/AssetFilterViewPresenter.cs | Introduced MoveUpBy and MoveDownBy methods and hooked up new view events. |
| Assets/SmartAddresser/Editor/Core/Tools/Addresser/Shared/AssetGroups/AssetGroupPanelPresenter.cs | Added MoveUpByGroup and MoveDownByGroup methods along with corresponding event handlers. |
| Assets/SmartAddresser/Editor/Core/Tools/Addresser/Shared/AssetGroups/AssetFilterView.cs | Added new menu items and events for offset-based filter movement. |
| Assets/SmartAddresser/Editor/Core/Tools/Addresser/Shared/AssetGroups/AssetGroupPanelView.cs | Added new menu items, event properties, and disposable management for offset-based group movement. |
Comments suppressed due to low confidence (4)
Assets/SmartAddresser/Editor/Core/Tools/Addresser/Shared/AssetGroups/AssetFilterViewPresenter.cs:106
- Consider adding a validation to ensure that the offset 'd' is greater than zero to guard against accidental negative moves.
private void MoveUpBy(int d)
Assets/SmartAddresser/Editor/Core/Tools/Addresser/Shared/AssetGroups/AssetFilterViewPresenter.cs:130
- Consider verifying that 'd' is a positive number before proceeding, similar to the check in MoveUpBy, to ensure robustness.
private void MoveDownBy(int d)
Assets/SmartAddresser/Editor/Core/Tools/Addresser/Shared/AssetGroups/AssetGroupPanelPresenter.cs:189
- It may be beneficial to add a check confirming that 'd' is greater than zero in MoveUpByGroup to avoid potential misuse.
void MoveUpByGroup(int d)
Assets/SmartAddresser/Editor/Core/Tools/Addresser/Shared/AssetGroups/AssetFilterView.cs:129
- Consider adding unit tests to verify that GetMoveUpByOptions returns the correct range of options based on the current filter index.
var moveUpByList = GetMoveUpByOptions?.Invoke();
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#64
確認事項