Skip to content

Conversation

@ivaylo-matov
Copy link
Contributor

PR aims to address https://jira.autodesk.com/browse/DYN-4517.
It also addresses 1. of https://autodesk.slack.com/archives/CPJ5UQW0Z/p1719284511762389 : TuneUp to not impact performance when not being actively used.

DYN-4517_Fix

  • ViewModel.IsTuneUpChecked tracks state of MenuItem.IsChecked
  • subscribes to CurrentWorkspace events only when MenuItem.IsChecked
  • RunTime switches to Manual mode when MenuItem.IsChecked
  • Branch based on Update to .NET8 #41

FYI
@QilongTang
@Ashish Ganta
@Amoursol

builds without errors
now loads in all versions from the Extensions menu
- TuneUp active only when MenuItem.IsChecked
- switches to manual model when activated
- ViewModel.IsTuneUpChecked tracks MenuItem.IsChecked
// When _Extensions is specified, TuneUpMenuItem goes to the View menu in Dynamo 3.0-
// and does not appear in Dynamo 3.1+.
// We need to specify _View for TuneUpMenuItem to be added to the Extensions menu
var extensionsMenuItem = dynamoMenuItems.Where(item => item.Header.ToString() == "_View");
Copy link
Contributor

Choose a reason for hiding this comment

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

Confused by this a bit.. we specify _View to be added to Extentions munue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You and me, brother 😁
I could not figure out why that is, might have to do with the way Dynamo loads the menus. Looking and the old master seem like this hasn't worked before either. In old demos Show TuneUp is always called from the View menu although the code was specifying _Extensions. I thought this is decent workaround for the time being as it's not a part of the ticket.

Choose a reason for hiding this comment

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

Two things:

  1. Thank you Ivo for shifting it to Extensions. This is 100% where it should live!
  2. We should make sure the coat is hardened, so if there is a proper way to do it please refactor :)

aligned to .csproj & .props in master
@reddyashish
Copy link
Contributor

@ivaylo-matov there are still 2 conflicts.

@ivaylo-matov
Copy link
Contributor Author

@reddyashish , sorry. Tried to resolve them before a couple of times, but wasn't sure if I should Commit Merge.

@reddyashish
Copy link
Contributor

LGTM. Thank you @ivaylo-matov.

@reddyashish reddyashish merged commit 2fafe30 into DynamoDS:master Jul 2, 2024
@reddyashish
Copy link
Contributor

@QilongTang Will open a new PR to publish the tuneup package.

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