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

Workspace References refactoring #13078

Merged
merged 4 commits into from
Jul 5, 2022
Merged

Conversation

reddyashish
Copy link
Contributor

@reddyashish reddyashish commented Jun 30, 2022

Purpose

This PR is to refactor some of the code related to workspace references view extension.

Task: https://jira.autodesk.com/browse/DYN-5028

In the current workflow, the workspace references are computed when a workspace is saved(to serialize the new data) and when the data needs to be updated on the view extension. To avoid doing it twice, a new flag is introduced that would control the workspace references computation. After this change, if the user clicks on "recalculate" button, the references would be computed only if the workspace has unsaved changes. On the other hand, if the user saves the workspace, the references are computed during serialization, saved in a list and that list is displayed in the view extension.
When a workspace is opened, we want to compute the references even though there are no saved changes. This can done by using the 'ForceComputeWorkspaceReferences' flag. The same is the case when the view extension is opened using the menu item or when a new package is loaded after downloading the missing package references.

Also cleaned up some of the related code.

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated

Release Notes

Workspace References refactoring

Reviewers

@QilongTang @zeusongit @aparajit-pratap @mjkkirschner

@@ -283,7 +287,6 @@ private void DownloadPackage(object sender, RoutedEventArgs e)
internal void DownloadSpecifiedPackageAndRefresh(PackageDependencyInfo info)
{
packageInstaller.DownloadAndInstallPackage(info);
DependencyRegen(currentWorkspace);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not needed as the DependencyRegen is being called after the package is loaded

@QilongTang
Copy link
Contributor

Thanks for the PR clarification, good stuff

@QilongTang QilongTang added this to the 2.16.0 milestone Jul 1, 2022
Copy link
Contributor

@zeusongit zeusongit left a comment

Choose a reason for hiding this comment

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

LGTM

@reddyashish reddyashish merged commit cd202f3 into DynamoDS:master Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants