Skip to content

DYN-9063: New ui preferences toggle#16310

Closed
chubakueno wants to merge 6 commits into
DynamoDS:masterfrom
chubakueno:feature/DYN-9063
Closed

DYN-9063: New ui preferences toggle#16310
chubakueno wants to merge 6 commits into
DynamoDS:masterfrom
chubakueno:feature/DYN-9063

Conversation

@chubakueno

Copy link
Copy Markdown
Contributor

Purpose

Add a toggle to use the new UI.

2025-06-18.01-38-09.mp4

Declarations

Check these if you believe they are true

  • 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
  • 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
  • This PR contains no files larger than 50 MB
  • This PR introduces new feature code involve network connecting and is tested with no-network mode.

Release Notes

Add a toggle to use the new UI.

Reviewers

@johnpierson
@BogdanZavu

FYIs

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9063

@zeusongit

Copy link
Copy Markdown
Contributor

Can you add some tests?

@zeusongit zeusongit requested a review from Copilot June 19, 2025 05:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

Adds a user preference to enable a new floating UI for node autocomplete and wires it through settings, UI, commands, and public APIs.

  • Introduce MLEnableNewUI in PreferenceSettings (with default true) and expose it via public API.
  • Add a toggle in the Preferences dialog (XAML + view model + resources) for the new UI.
  • Update command and extension code to route autocomplete execution based on the new setting.

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/DynamoCore/Configuration/PreferenceSettings.cs Add MLEnableNewUI property with default initialization
src/DynamoCoreTests/Configuration/PreferenceSettingsTests.cs Assert new setting is included in settings serialization
src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml Insert toggle button and tooltip for “Enable New UI”
src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs Add MLEnableNewUIIsChecked VM property and property-change case
src/DynamoCoreWpf/Commands/PortCommands.cs Use MLEnableNewUI to choose between cluster and legacy UI
src/NodeAutoCompleteViewExtension/NodeAutoCompleteViewExtension.cs Remove original gating without replacing it with the new toggle
src/DynamoCoreWpf/Properties/Resources.resx Add string and tooltip resources
src/DynamoCoreWpf/Properties/Resources.en-US.resx Mirror new resources (remove extraneous entry)
src/DynamoCoreWpf/PublicAPI.Unshipped.txt Expose new VM property getters/setters
src/DynamoCore/PublicAPI.Unshipped.txt Expose new PreferenceSettings.MLEnableNewUI get/set
Files not reviewed (1)
  • src/DynamoCoreWpf/Properties/Resources.Designer.cs: Language not supported
Comments suppressed due to low confidence (2)

src/DynamoCoreWpf/Properties/Resources.en-US.resx:4166

  • The resource entry named String appears extraneous and may conflict with other keys. It looks unintended—please remove this redundant <data> element.
  <data name="String" xml:space="preserve">

src/DynamoCoreWpf/Commands/PortCommands.cs:35

  • [nitpick] Consider adding unit tests for NodeAutoCompleteCommand to verify that it invokes AutoCompleteCluster or AutoComplete correctly based on the MLEnableNewUI setting.
                    autoCompleteCommand ??= new DelegateCommand(

Comment thread src/NodeAutoCompleteViewExtension/NodeAutoCompleteViewExtension.cs
Comment thread src/DynamoCoreWpf/Commands/PortCommands.cs
@johnpierson johnpierson self-requested a review June 20, 2025 04:54

@johnpierson johnpierson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The toggle was already added in this PR: #16284

For 9063, lets rebase your branch from master, and only do the disabling (greying out) of the preferences items.

var dynamoViewModel = viewLoadedParams.DynamoWindow.DataContext as DynamoViewModel;

if (dynamoViewModel.IsDNAClusterPlacementEnabled)
DependencyView = new NodeAutoCompleteView(this, viewLoadedParams);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So the side panel only makes sense for the cluster so I guess it should continue to be dependent on IsDNAClusterPlacementEnabled ?
If so then I guess we should hide the button in the bar that makes the side panel visible as well.

/// <summary>
/// Enable New UI for cluster node autocomplete
/// </summary>
public bool MLEnableNewUI { get; set; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ideally we should not add anything to the api related to this. This new button will be obsolete once the new experience becomes the default one and we retire the other one.

@BogdanZavu

Copy link
Copy Markdown
Contributor

I made some comments but otherwise is working as expected. Let's clarify that and then LGTM!

@chubakueno chubakueno closed this Jun 20, 2025
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.

5 participants