Skip to content

Conversation

@mdwigley
Copy link
Member

Description

This change refactors the OnPluginEnabledChanged logic to correctly handle tri‑state checkboxes when plugins include system interfaces.

A new helper method ApplyPluginState was introduced to DRY out the duplicated logic and ensure that:

  • Non‑system descriptors are toggled according to the target state.
  • System descriptors are restored to their invariant state rather than being blindly overridden.
  • The aggregate plugin state (IsEnabled) is recalculated based on the actual descriptor states, ensuring the checkbox accurately reflects enabled, disabled, or indeterminate states.

Related Issue

Motivation and Context

Previously, the plugin checkbox could incorrectly display as fully enabled even when some system interfaces remained disabled and immutable.

This fix ensures the tri‑mode checkbox reflects the true state of all descriptors, preventing misleading UI states and improving consistency.

How Has This Been Tested?

  • Verified toggling plugins with a mix of system and non‑system interfaces.
  • Confirmed that system interfaces retain their correct state after toggling.
  • Checked that the plugin checkbox now correctly shows true, false, or null depending on the actual descriptor states.
  • Tested multiple toggle sequences to ensure no regressions in state handling.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Asset change (adds or updates icons, templates, or other assets)
  • Documentation change (adds or updates documentation)
  • Plugin change (adds or updates a plugin)

Checklist:

  • I have read the CONTRIBUTING document.
  • My change requires a change to the core logic.
    • I have linked the project issue above.
  • My change requires a change to the assets.
    • I have linked the asset issue above.
  • My change requires a change to the documentation.
    • I have linked the documentation issue above.
  • My change requires a change to a plugin.
    • I have linked the plugin issue above.

@mdwigley mdwigley self-assigned this Oct 15, 2025
@mdwigley mdwigley moved this to In review in PlugHub Timeline Oct 15, 2025
@mdwigley mdwigley merged commit c44561b into enterlucent:main Oct 15, 2025
3 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in PlugHub Timeline Oct 15, 2025
@mdwigley mdwigley deleted the issue#128-mdwigley branch October 15, 2025 02:45
@mdwigley mdwigley added the approved Change issue has been accepted for implementation label Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Change issue has been accepted for implementation

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Tri-Mode Checkbox State Not Reset with System Interfaces

1 participant