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

Update Run Status Message to Run Blocked during File Trust Warning #12953

Merged
merged 5 commits into from
Jun 3, 2022

Conversation

QilongTang
Copy link
Contributor

Please Note:

  1. Before submitting the PR, please review How to Contribute to Dynamo
  2. Dynamo Team will meet 1x a month to review PRs found on Github (Issues will be handled separately)
  3. PRs will be reviewed from oldest to newest
  4. If a reviewed PR requires changes by the owner, the owner of the PR has 30 days to respond. If the PR has seen no activity by the next session, it will be either closed by the team or depending on its utility will be taken over by someone on the team
  5. PRs should use either Dynamo's default PR template or one of these other template options in order to be considered for review.
  6. PRs that do not have one of the Dynamo PR templates completely filled out with all declarations satisfied will not be reviewed by the Dynamo team.
  7. PRs made to the DynamoRevit repo will need to be cherry-picked into all the DynamoRevit Release branches that Dynamo supports. Contributors will be responsible for cherry-picking their reviewed commits to the other branches after a LGTM label is added to the PR.

Purpose

Per https://jira.autodesk.com/browse/DYN-4998, update run status message.

After:
image

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

Update Run Status Message to Run Blocked during File Trust Warning

Reviewers

@DynamoDS/dynamo

FYIs

(FILL ME IN, Optional) Names of anyone else you wish to be notified of

@QilongTang QilongTang added this to the 2.15.0 milestone Jun 2, 2022
@@ -20,8 +20,10 @@ public class RunSettings : NotificationObject
private RunType runType;
private bool runEnabled;
private bool runTypesEnabled;
private bool runTypesComboBoxToolTipIsEnabled;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is not used for now

{
HomeSpace.RunSettings.ForceAutomaticWithoutRun = true;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@RobertGlobant20 I included a minimal fix for now and plan to rethink about this boolean with you a bit to cover the periodic run mode as well

if(!PreferenceSettings.TrustedLocations.Contains(directoryName) && DynamoModel.IsTestMode == false)
{
HomeSpace.RunSettings.ForceAutomaticWithoutRun = true;
bShowFileTrustWarning = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

So we do not need to set bShowFileTrustWarning true anymore?

Copy link
Contributor Author

@QilongTang QilongTang Jun 2, 2022

Choose a reason for hiding this comment

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

This boolean can be skipped since it is a local one, after adjusting the order we no longer need it

Copy link
Contributor

@RobertGlobant20 RobertGlobant20 left a comment

Choose a reason for hiding this comment

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

LGTM just consider that if ForceAutomaticWithoutRun is changed to be static, then some parts will need to be updated.

@@ -265,6 +265,12 @@ void hwm_EvaluationCompleted(object sender, EvaluationCompletedEventArgs e)
/// </summary>
internal void UpdateRunStatusMsgBasedOnStates()
{
if ((bool)((Model as HomeWorkspaceModel)?.RunSettings.ForceAutomaticWithoutRun))
Copy link
Member

Choose a reason for hiding this comment

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

won't this cast fail if Model is a customWorkspaceModel? Or will null cast to false?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mjkkirschner I did confirm that this function is bind to graph evaluation so the above case would not happen

@QilongTang
Copy link
Contributor Author

@RobertGlobant20 @zeusongit I am going to merge this so the code is synced between us when we work on all following improvements

@QilongTang QilongTang merged commit d1477f3 into master Jun 3, 2022
@QilongTang QilongTang deleted the UpdateRunStatusMessage branch June 3, 2022 12:38
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.

4 participants