[GraphEditor] Rewrite AttributeItemDelegate with outside definitions for the components - #3177
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3177 +/- ##
========================================
Coverage 86.27% 86.27%
========================================
Files 81 81
Lines 12367 12367
========================================
Hits 10670 10670
Misses 1697 1697 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
cbentejac
left a comment
There was a problem hiding this comment.
Components are not, for the most part, fully attribute-agnostic: they either depend on an "attribute" property which is expected to be "shaped" like an Attribute object (which we want to avoid) or they call directly a method that makes attribute-related operations only.
Some components like ColorHue are perfectly instantiated in AttributeItemDelegate, with the slots correctly defined upon instantiation (rather than directly within the component) and this is what we should be doing with the other components as well. (there's just a minor hiccup regarding the direct reference to the "attribute" property, we should only declare and forward the value directly)
The ideal would be to have no mention whatsoever to attributes within the components, as is done in the Choice.qml and ChoiceMulti.qml files.
However the split between components is exactly what we expect (except maybe for the PushButton.qml which does really do anything beside instantiating a standard button) and this heavily improves the readability of AttributeItemDelegate.qml. Most of the hard work has already been done, so kudos on that part!
a3aae09 to
d35b1c1
Compare
9e7c9c3 to
7438401
Compare
7438401 to
70c5e56
Compare
0f07421 to
4c2b683
Compare
… slider component
…dles undefined values
4c2b683 to
27772a9
Compare
Description
This PR moves the definition of the components inside AttributeItemDelegate to AttributeControls, as externalised components, thus easing their use in a broader context than the GraphEditor.
Features list
Implementation remarks