Skip to content

DYN-8951: As a standards manager, I want to be able to customize the OOTB node group styles#16969

Merged
jasonstratton merged 16 commits into
DynamoDS:masterfrom
ivaylo-matov:DYN-8951-Group-styles-extended-Opt2_
Mar 23, 2026
Merged

DYN-8951: As a standards manager, I want to be able to customize the OOTB node group styles#16969
jasonstratton merged 16 commits into
DynamoDS:masterfrom
ivaylo-matov:DYN-8951-Group-styles-extended-Opt2_

Conversation

@ivaylo-matov

Copy link
Copy Markdown
Contributor

Purpose

This PR addresses DYN-8951 as well as DYN-9872. The proposed changes allow users to customize or delete OOTB node group styles, instead of being limited to adding new custom styles.

Changes:

  • Preferences UI updates for Group Styles:
    • default styles are now editable/removable
    • added a Reset Styles button with tooltip and visibility bound to reset availability
  • Group style state/restore logic:
    • added CanResetGroupStyles and ResetCustomGroupStyles in PreferencesViewModel
    • added GroupStyleItem.CloneDefaultGroupStyleItems() to restore clean defaults
    • PreferencesViewModel no longer recreates default styles when the list is empty
    • DynamoModel creates default styles only for brand-new settings
  • Context menu behavior improvements:
    • Group Style submenu is disabled when no group styles exist
    • separator is only shown when both default and custom styles are present
  • Resources/API updates:
    • added localized strings for reset button/tooltip
  • Unit tests

Declarations

Check these if you believe they are true

Release Notes

Users can now edit and remove default node group styles, and reset all group styles back to defaults from Preferences.

Reviewers

@zeusongit
@DynamoDS/eidos

FYIs

@dnenov
@johnpierson

Copilot AI review requested due to automatic review settings March 18, 2026 14:11

@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-8951

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

Enables customization/removal of out-of-the-box (default) node group styles and adds a “Reset Styles” flow to restore Dynamo’s default group styles, including UI and context-menu behavior updates.

Changes:

  • Updates Preferences UI to allow editing/removing default group styles and adds a Reset Styles button with localized strings.
  • Adjusts group-style persistence/restore logic (avoid recreating defaults when list is empty; create defaults only for brand-new settings).
  • Improves group context-menu behavior (disable Group Style submenu when empty; only show separator when needed) and adds WPF tests.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
test/DynamoCoreWpfTests/GroupStylesTests.cs Adds unit/UI tests for reset behavior and disabled submenu behavior.
src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml Enables editing/removal UI for default styles and adds Reset Styles button + tooltip.
src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml.cs Implements Reset Styles click handler + analytics event.
src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs Adds reset capability flags/logic and default-style matching helper.
src/DynamoCoreWpf/Views/Core/AnnotationView.xaml.cs Allows disabling submenu item and prevents hover-open when disabled.
src/DynamoCoreWpf/ViewModels/Core/AnnotationViewModel.cs Adds helper for whether Group Style submenu should be enabled; separator logic change.
src/DynamoCore/Configuration/GroupStyleItem.cs Adds cloning helper to restore clean default style items.
src/DynamoCore/Configuration/PreferenceSettings.cs Ensures group styles list is non-null on load and de-dupes entries.
src/DynamoCore/Models/DynamoModel.cs Seeds default group styles only for brand-new preference settings.
src/DynamoCoreWpf/Properties/Resources.resx Adds localized Reset Styles button text + tooltip.
src/DynamoCoreWpf/Properties/Resources.en-US.resx Adds en-US Reset Styles button text + tooltip.
src/DynamoCoreWpf/Properties/Resources.Designer.cs Regenerated resource accessors for new strings.
src/DynamoCoreWpf/PublicAPI.Unshipped.txt Tracks new public resource properties in API surface.
Files not reviewed (1)
  • src/DynamoCoreWpf/Properties/Resources.Designer.cs: Language not supported

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs
Comment thread src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs
Comment thread src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml.cs Outdated
Comment thread src/DynamoCoreWpf/ViewModels/Core/AnnotationViewModel.cs
Comment thread src/DynamoCore/Models/DynamoModel.cs Outdated
Comment thread src/DynamoCoreWpf/Properties/Resources.resx Outdated
Comment thread src/DynamoCoreWpf/Properties/Resources.en-US.resx Outdated
@ivaylo-matov

Copy link
Copy Markdown
Contributor Author

on sonarQube's new issue - CreateSubmenuItem can’t be static in this case. It depends on the instance behavior of WrapWithMenuBorder and GroupContextMenuPopup. I’m keeping it as an instance method.

@sonarqubecloud

Copy link
Copy Markdown

@jasonstratton jasonstratton 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.

Looks good!

@jasonstratton
jasonstratton merged commit 5276097 into DynamoDS:master Mar 23, 2026
26 of 29 checks passed
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