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

Dynamo Default Python engine selection using child MenuItems #11088

Merged
merged 4 commits into from
Sep 2, 2020

Conversation

QilongTang
Copy link
Contributor

@QilongTang QilongTang commented Sep 1, 2020

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

Make default Python option picking similar to Number Format. The dynamic collection binding to menuitems solution did not work for me, so I had to hard code the child menu items. This is not ideal but remain consistent with Dynamo UX. There is still some clean up to do.
DefaultPythonEngine

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

Reviewers

@DynamoDS/dynamo

FYIs

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

@QilongTang
Copy link
Contributor Author

@Amoursol Can you confirm this is the expected behavior you want? If yes, I will try to clean up some code since old UI code will need to be removed as part of this.

@Amoursol
Copy link
Contributor

Amoursol commented Sep 1, 2020

LGTM @QilongTang, thank you for updating this - looks much more cohesive now :)

@QilongTang QilongTang changed the title [WIP] Dynamo Default Python engine selection using child MenuItems Dynamo Default Python engine selection using child MenuItems Sep 2, 2020
@QilongTang QilongTang marked this pull request as ready for review September 2, 2020 04:13
@QilongTang QilongTang requested a review from mmisol September 2, 2020 04:13
@QilongTang QilongTang added this to the 2.8 milestone Sep 2, 2020
@QilongTang
Copy link
Contributor Author

@mmisol Any comments?

@mmisol
Copy link
Collaborator

mmisol commented Sep 2, 2020

@QilongTang I guess there was no way to make this dynamic, right? Is that why this is going to 2.8 and not master? Is the plan to create a task to improve this?

@QilongTang
Copy link
Contributor Author

@mmisol Unfortunately I dont have the purely dynamic way working for me either. For master, I am open for discussion, maybe because my WPF knowledge is not sufficient but I saw examples online about dynamically create child menuItems, I just failed to leverage it. I plan to cherry-pick this into master as well but I dont know how practical another Jira task would be. What do you think?

@mmisol
Copy link
Collaborator

mmisol commented Sep 2, 2020

Thanks for the context @QilongTang . Maybe we can file a task , but in any case this is probably going to be done whenever we remove the Python engines from Core, so it would be hard to miss anyway.

I'll review based in the fact these changes will go to master as well.

src/DynamoCoreWpf/UI/Converters.cs Outdated Show resolved Hide resolved
src/DynamoCoreWpf/UI/Converters.cs Outdated Show resolved Hide resolved
src/DynamoCoreWpf/Views/Core/DynamoView.xaml Outdated Show resolved Hide resolved
src/DynamoCore/Configuration/PreferenceSettings.cs Outdated Show resolved Hide resolved
@QilongTang
Copy link
Contributor Author

@mmisol I was thinking the same thing, I think these options will be removed next year after Global launch.

Copy link
Collaborator

@mmisol mmisol left a comment

Choose a reason for hiding this comment

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

Thanks @QilongTang . Looks good to me

@QilongTang
Copy link
Contributor Author

@mmisol Thanks for the review. This should be the last task of RC2.8.0. Will do some testing tomorrow to wrap up release.

@QilongTang QilongTang merged commit 443e9e5 into RC2.8.0_master Sep 2, 2020
@QilongTang QilongTang deleted the SelectDefaultPythonEngine branch September 2, 2020 21:08
QilongTang added a commit that referenced this pull request Sep 2, 2020
* minimal changes for child menu items

* Code Clean up

* Comments

* Comments
QilongTang added a commit that referenced this pull request Sep 3, 2020
…#11096)

* minimal changes for child menu items

* Code Clean up

* Comments

* Comments
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