Skip to content
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

Fix detection of upgraded SelectedItem for Types #279

Merged
merged 1 commit into from
Jun 13, 2020

Conversation

adecler
Copy link
Member

@adecler adecler commented Jun 12, 2020

Issues addressed by this PR

Closes #278

PR #263 broke the ability for the CreateObject component to add and remove inputs. The reason is that we lost the ability to easily know if the SelectedItem was upgraded by the Versioning engine since it is now black-boxed inside the FromJson method. So, in that PR, I tried to detect an upgrade by comparing the inputs and outputs. The problem is that I forgot the case of CreateObject where inputs can be modified by the user.

I have now overridden in CrerateObject the check done in Caller. If the SelectedItem is a type, I just make sure that all the component inputs can still be found as property of the object.

This component is getting messy and too fragile for my liking so I will review it properly next quarter with the general review of the UI. But this PR focuses on fixing the problematic bug before the release of the beta installer.

Test files

See issue

@adecler adecler added the type:bug Error or unexpected behaviour label Jun 12, 2020
@adecler adecler self-assigned this Jun 12, 2020
Copy link

@kThorsager kThorsager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes the issue and no components were missing when opening a generic big script

LGTM

Copy link
Contributor

@IsakNaslundBh IsakNaslundBh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes make sense to me, and have tested older versing scripts that have been running with no issue.

Also, looking at the code, the changes make sense.

Approved

Copy link
Contributor

@FraserGreenroyd FraserGreenroyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, couldn't find anything amiss.

@adecler
Copy link
Member Author

adecler commented Jun 13, 2020

/azp run BHoM_UI.CheckInstaller

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adecler adecler merged commit 174bea7 into master Jun 13, 2020
@adecler adecler deleted the BHoM_UI-#278-CreateObjectComponentFix branch June 13, 2020 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error or unexpected behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BHoM_UI: Dynamic input problems
4 participants