-
Notifications
You must be signed in to change notification settings - Fork 6
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
Update to the new version of the CreateObject component #426
Conversation
Quoting the other comment BHoM/BHoM_UI#147 (comment) |
This is now ready for review |
|
||
namespace BH.UI.Grasshopper.Components | ||
{ | ||
public class CreateObjectComponent : CallerComponent | ||
public class CreateObjectComponent : CallerComponent, IGH_VariableParameterComponent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is no need to inherit from IGH_VariableParameterComponent
.
CallerComponent
already does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm weird, I remember having to add this after having problems with the inputs not updating correctly. But you're right it shouldn't need to be there. It doesn't do any damage either way so I guess its fine :-p
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested together with https://github.com/BHoM/BHoM_UI/pull/147/filesa and same feelings!
Some comments on the code side
/**** Override Methods ****/ | ||
/*******************************************/ | ||
|
||
public override bool CanRemoveParameter(GH_ParameterSide side, int index) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very much related to https://github.com/BHoM/BHoM_UI/pull/147/files#r341051725 for the missing CanCreateParameter
.
It may be annoying from a UX perspective to erroneously remove an input, realising it after a series of operation, and could not CTRL + Z anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we discussed the idea of adding a 'reset' button in the context menu but I like your idea of the full list in the context menu better. Especially when considering the fact that it allows us to not have the base properties by default (except Name
I guess)
Approving in the light of BHoM/BHoM_UI#147 (comment) Please, do not merge this. |
@epignatelli , not a big deal as we will discus soon anyway but not actually approved :-p |
NOTE: Depends on
BHoM/BHoM_UI#147
Issues addressed by this PR
See BHoM/BHoM_UI#147 for more details