Skip to content

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

Open
ivaylo-matov wants to merge 16 commits intoDynamoDS:masterfrom
ivaylo-matov:DYN-8951-Group-styles-extended-Opt2_
Open

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

Conversation

@ivaylo-matov
Copy link
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
Copy link

@github-actions github-actions bot left a comment

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

Copy link
Contributor

Copilot AI left a comment

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.

@ivaylo-matov
Copy link
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

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.

2 participants