Aspid.MVVM 1.1.0#25
Conversation
fix(virtualized-list): guard null views/coroutine and fix listener leak
…ctness fix(converters): guard division-by-zero and float precision in numeric converters
…-slot fix(collections): ignore empty filter slots in OrCompositeCollectionFilter
…nteractable fix(binders): repair custom-interactable command binder constructors
…double-conversion fix(binders): avoid double conversion in GraphicColorComponent binders
Co-authored-by: Vladislav Panin <VPDPersonal@users.noreply.github.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(binders): material color, sprite leak and layout dirty in visual binders
- Add CHANGELOG.ru.md and MIGRATION.ru.md (full Russian translations) - Remove redundant editor version (6000.4.0f1) from Highlights section - Remove package id rename entry from Changed section (already in package.json history)
docs(release): prepare 1.1.0 changelog, migration and package metadata
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace the com.aspid.fasttools git-UPM dependency with an embedded tech.aspid.fasttools package (file:) - Update manifest.json and packages-lock.json accordingly
…mples - Add numbered samples 03–06 demonstrating core MVVM scenarios
- Relocate the package from Assets/Aspid/MVVM/ to Packages/tech.aspid.mvvm/, mirroring the embedded tech.aspid.fasttools layout - Rename Samples/ -> Samples~/ so samples ship via Package Manager instead of being indexed in the dev project - Bump version to 1.1.0-beta.1 and repoint changelogUrl to the new package path - Update path references in CLAUDE.md, Readme.md, MIGRATION.md and MIGRATION.ru.md
build(package): embed Aspid.MVVM as local UPM package (1.1.0-beta.1)
- Add embedded packages-lock entry for tech.aspid.mvvm (Unity-generated after the Assets -> Packages move) - Add "unityRelease": "0f1" to package.json and normalize the author block
…ed package - Readme: replace single release badge with Stable (upm) and Preview (upm-preview) package-json badges, matching Aspid.FastTools - release.yml: point PACKAGE_PATH / CHANGELOG_PATH at the embedded Packages/tech.aspid.mvvm location (was the stale Assets/Aspid/MVVM) - CHANGELOG (EN/RU): stamp the 1.1.0 work as [1.1.0-beta.1] so the workflow can extract release notes; correct the package move to embedded UPM, FastTools embedding, samples and badge entries
ci(release): add preview badge, fix workflow paths, refresh changelog
… 6.0+ - Add a preview-only Integration section with the upm-preview Git URL (branch + immutable upm-preview/<version> tag), matching Aspid.FastTools; stable 1.0.x still installs the usual way (Asset Store / Releases) - Update the Unity badge from 2022.3+ to 6.0+ to match package.json (unity 6000.0) and the CHANGELOG, and link it to the Asset Store
docs(readme): add preview UPM install section and bump Unity badge to 6.0+
🔍 Code review —
|
Fixes surfaced by the max-effort review of PR #25 (Aspid.MVVM 1.1.0): - CollectionViewModelBinder: rebuild positional views on Move (the sibling-index swap was wrong for moves of distance > 1) and guard the view array against out-of-range; dedup the four granular hooks into RebuildFromCollection. - ImageSpriteBinder/Mono: clear Image.sprite on unbind so it no longer references the destroyed generated sprite; share a CreateSprite helper. - RendererMaterialColorSwitcherBinder: cache the materials array to drop the per-value Material[] allocation. - OrCompositeCollectionFilter: an all-empty filter now passes all items (consistent with And), implemented allocation-free. - VirtualizedList: OnMove window check uses < (matching OnAdded/OnRemoved); window-gate batch add/remove instead of unconditional Refresh. - ToCultureStringExtensions: delegate the overloads to the existing ToCultureInfo helper. - ObservableListViewModelBinder twins: extract shared view-list bookkeeping into ObservableListViewModelBinderHelper. Authored without an in-Editor Unity compile; verify by compiling in Unity.
Address review feedback on this PR: - Move ObservableListViewModelBinderHelper and the sprite CreateSprite helper into their own files (ObservableListViewModelBinderHelper.cs, SpriteBinderHelper.cs) instead of living inside a binder class. - Call base.OnUnbound() in RendererMaterialColorSwitcherBinder — the override added earlier in this PR was silently dropping the base-class cleanup; also add it to ImageSpriteBinder/Mono to follow the codebase convention. - Guard CollectionViewModelBinder.OnReplace against an out-of-range index, mirroring the OnAdded guard. - Add missing trailing newlines on touched files.
fix: resolve code-review findings in binders and collections
Summary
Aspid.MVVM 1.1.0 is a large release: the inspector stack is rewritten on top of UI Toolkit, Bindable Properties and
ValueViewModelare introduced,GeneralViewis merged intoMonoView, new binder families ship (AudioSource / LayoutGroup / Dropdown / Selectable / Object Name / OneWayToSource),ViewModelDebugPanelis rebuilt on UI Toolkit, anAspid.MVVM Settingswindow prototype lands, virtual binder fields andHeaderGroupattributes are added, the Unity project is relocated intoAspid.MVVM/, the UPM package is renamedcom.aspid.mvvm→tech.aspid.mvvmand promoted to an embedded local package underPackages/tech.aspid.mvvm, the generators and the analyzer are extracted into submodules (Aspid.Collections ships as a UPM git package, Aspid.FastTools is embedded underPackages/tech.aspid.fasttools), the minimum supported Unity is raised to6000.0, and a release workflow publishing stable (upm) and preview (upm-preview) UPM subtrees is added (the README carries matching Stable / Preview badges and a preview install section).Full change list and migration rules — see
CHANGELOG.md(section[1.1.0-beta.1]) andMIGRATION.md.Highlights
MonoBinder/MonoView/MonoViewModeleditor inspectors rewritten on UI Toolkit /VisualElement.ViewModelDebugPanelon UI Toolkit: tabs, persistent search,RelayCommand, bindable / auto-properties.Aspid.MVVM Settingswindow prototype (AspidToggle, shared USS styling).NotifyCanExecuteChangedAll(), keyword fields for set-methods, virtualMonoBinder[]slots auto-emitted forIView<TViewModel>members (opt out via[View(AutoBinderFields = false)]).HeaderGroupAttribute/HeaderGroupStartAttribute/HeaderGroupEndAttribute— named, collapsible inspector foldouts for binders and VM members.GeneralViewmerged intoMonoView;MonoViewis now non-abstract, with its own serialized binders list and[RequireBinder]validation.OneWayToSourceComponentBinders,AnyReverseBinderwith nullable support, extended InputField set.OnReplace/OnMove, batchReplaceunrolled into per-itemOnReplace,BindSafely/UnbindSafelyenriched withowner/memberName/ bindable Id.Aspid.FastToolsintegrated; many editor visuals migrated to FastTools equivalents.Aspid.MVVM.Generators,Aspid.MVVM.Analyzers,Aspid.MVVM.Unity.Generators.Aspid.Collections(tech.aspid.collections) is consumed as a UPM git package;Aspid.FastToolsis embedded as a local UPM package (tech.aspid.fasttools).Aspid.MVVM/; the UPM package is renamedcom.aspid.mvvm→tech.aspid.mvvm, promoted to an embedded local package underPackages/tech.aspid.mvvm, and ships its ownpackage.jsonwithunity = 6000.0andversion = 1.1.0-beta.1.upm(stable) andupm-previewbranches with immutableupm/<version>tags, generator-DLL drift verification and CHANGELOG-driven release notes. The README carries matching Stable / Preview version badges and a preview install (#upm-preview) section.XmlDocConventions.mdadded.Breaking changes
com.aspid.mvvm→tech.aspid.mvvm. Consumers must update the dependency key in theirPackages/manifest.json(the old id will no longer resolve).6000.0.MonoViewis no longerabstract— it is a concrete component with its own serialized binders list and[RequireBinder]validation.MonoView.Dispose()no longer destroys the host GameObject — it only callsDeinitialize(). Destroy the GameObject manually viaObject.Destroy(gameObject)when needed.MonoBinder.Bind()no longer throws when called on an already-bound binder — it writes aDebug.LogErrorand returns instead.[AddComponentMenu]paths reorganized (e.g.Collections/Observable List Binder - ViewModel→Collection/Observable List Binder – ViewModel).AddComponentContextMenuAttribute,AddPropertyContextMenuAttribute; replaced byAddBinderContextMenuAttribute/AddBinderContextMenuByTypeAttributewith a new signature (Path = "...")..metaGUIDs preserved, so prefabs and scenes keep working — game code referencing the old names will not compile):ViewModelObservableListMonoBinder→ObservableListViewModelMonoBinderViewModelObservableListBinder→ObservableListViewModelBinderViewModelObservableDictionaryBinder→ObservableDictionaryViewModelBinderViewModelCollectionMonoBinder→CollectionViewModelMonoBinderEnumMonoBinderEditorBase→EnumMonoBinderEditorLinked submodule PRs
tech.aspid.collections), bumped to currentmain.Test plan
6000.0LTS (the new minimum) — compiles cleanly, Edit / Play Mode tests are green.6000.3.0f1+) — compiles cleanly.ViewModelDebugPanel— search / tabs /RelayCommand/ bindable properties all functional.MonoView/MonoBinder/MonoViewModelinspectors render via UI Toolkit; drag & drop of unassigned binders works.HeaderGroupcollapses inspector fields; virtual binder fields appear automatically forIView<TViewModel>members.MIGRATION.mdagainst a downstream package consumer.dotnet testforAspid.MVVM.Generators.TestsandAspid.MVVM.Analyzers.Testsis green.v1.1.0-beta.1tag — theupm-previewbranch andupm-preview/1.1.0-beta.1tag receive the expected package contents.