Skip to content

Conversation

@QilongTang
Copy link
Contributor

@QilongTang QilongTang commented Sep 23, 2022

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-3209, @mjkkirschner or a lot of Dynamo developers have noticed that in-canvas search and Node AutoComplete popup remains open during debugging of Dynamo. This is due to a bug that hidding Dynamo window calling unloaded on these two popups. I changed the code to have the handler nolonger binding to Unload event but MainWindow.Closing event and set DynamoView as mainwindow will make sure the event sequence is corrected. This PR also includes some small cleanup using pattern matching for the checks.

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

Keep Node AutoComplete popup hidden when window deactivated

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.17.0 milestone Sep 23, 2022
@QilongTang
Copy link
Contributor Author

Looks like there are a good amount of regressions, will look into this

@QilongTang
Copy link
Contributor Author

@mjkkirschner All regressions pass now, this is ready for a look

{
Application.Current.Deactivated += currentApplicationDeactivated;
Application.Current.Deactivated += CurrentApplicationDeactivated;
Application.Current.MainWindow.Closing += InCanvasSearchControl_Unloaded;
Copy link
Member

Choose a reason for hiding this comment

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

I kind of recall that Application is null in the context of Revit - what happens then?

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 think Application.Current would be null in testing and in the context of Revit, which is the purpose of the check above. Earlier the regressions failure were all about the null check so I had to fold this line in

{
RequestShowInCanvasSearch(flags);
}
RequestShowInCanvasSearch?.Invoke(flags);
Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

@mjkkirschner mjkkirschner left a comment

Choose a reason for hiding this comment

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

a few comments, but overall looks good.

@QilongTang
Copy link
Contributor Author

Addressed all comments, @mjkkirschner

@mjkkirschner
Copy link
Member

@QilongTang maybe it's just a fluke, but it looks like the tests timed out here?
https://master-5.jenkins.autodesk.com/job/Dynamo/job/DynamoSelfServe/job/pullRequestValidation/7145/

@QilongTang
Copy link
Contributor Author

@QilongTang maybe it's just a fluke, but it looks like the tests timed out here? https://master-5.jenkins.autodesk.com/job/Dynamo/job/DynamoSelfServe/job/pullRequestValidation/7145/

Not sure, last night the regressions all passed. I am re-running them

@QilongTang
Copy link
Contributor Author

@mjkkirschner After re-run the PR check, the regressions passed so I believe it is a fluke. Merging.

@QilongTang QilongTang merged commit 844b694 into master Sep 26, 2022
@QilongTang QilongTang deleted the HideAutoCompleteWindowDeactivated branch September 26, 2022 21:48
pinzart90 added a commit that referenced this pull request Sep 27, 2022
* add nunit test adapter for 2022 (#13313)

* add nunit test adapter for 2022

* update

* Update Setup.cs

* update

* Update DynamoCore.csproj

* Create System.Net.Http.dll

* update

* update

Co-authored-by: pinzart <tiberiu.pinzariu@autodesk.com>

* Filter Mouse Pressed Removed (#13319)

- removed flashing white color on mouse pressed for the filter ui element

* Fixing horizontal center (#13312)

* Update Node AutoComplete Dialog Visuals (#13329)

* Update Node AutoComplete Visuals

* Reuse style from central location

* Add editorconfig (#13233)

* Dyn5272 (#13334)

tests pass - merging this then will send cherry pick

* Dyn 5159 import export preferences (#13301)

* Import Export Settings

* Info Icons

* Indentation

* Using Dynamo View Model reference

* Moving the methods to the proper places according to their accessibility

* Handling Generic Exceptions

* updating the RaisePropertyChanged

* Extracting the import extension file as a variable

* Unique file name

* Changing the access level

* Various revisions

* Cleaning vars

* Adding Unit Test

* Adding Comments and cleaning vars

* Removing unnecessary methods

* Refactoring to get the static fields automatically

* Updating the Unit Test

* checking new settings file

* Adding validation info

* Getting First Property with the same value

* Updating valid TrustedLocations entries

* move near clipping plane further away for more depth buffer precision. (#13338)

passed here:
merging.

* Keep Node AutoComplete popup hidden when window deactivated (#13337)

* Keep Node AutoComplete popup hidden when window deactivated

* Add condition and null checks

* comments

Co-authored-by: pinzart90 <46732933+pinzart90@users.noreply.github.com>
Co-authored-by: pinzart <tiberiu.pinzariu@autodesk.com>
Co-authored-by: Deyan Nenov <dnenov@archilizer.com>
Co-authored-by: jesusalvino <96534278+jesusalvino@users.noreply.github.com>
Co-authored-by: Aaron (Qilong) <173288704@qq.com>
Co-authored-by: Aabishkar KC <aabishkar@gmail.com>
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