Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 13077 Add missed events to ToolStripDesigner #13093

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LeafShi1
Copy link
Member

@LeafShi1 LeafShi1 commented Mar 7, 2025

Fixes #13077

Proposed changes

  • Update the ToolStripDesigner following by VS repo

Customer Impact

  • The "Type Here" item can be show in MenuStrip control and ToolStrip control in DemoConsole application

Regression?

  • No

Risk

  • Minimal

Screenshots

Before

image

After

AfterChange

Test methodology

  • Manually

Test environment(s)

  • .net 10.0.0-preview.3.25154.11
Microsoft Reviewers: Open in CodeFlow

@LeafShi1 LeafShi1 requested a review from a team as a code owner March 7, 2025 09:52
@LeafShi1 LeafShi1 force-pushed the Issue_13077_Fix_Update_ToolStripDesigner branch from 058748a to 5b7a4f5 Compare March 10, 2025 01:18
@LeafShi1 LeafShi1 added the waiting-review This item is waiting on review by one or more members of team label Mar 10, 2025

Choose a reason for hiding this comment

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

PR Overview

This pull request updates the ToolStripDesigner to add missing event-handling and improve event subscription and disposal logic, addressing issue #13077.

  • Added missing UndoEngine field and its event subscriptions.
  • Updated and refactored event hook-ups and unsubscriptions for the overflow drop-down and related components.
  • Cleaned up array initializations and simplified property implementations.

Reviewed Changes

File Description
src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/ToolStripDesigner.cs Updates to event subscription, disposal routines, and minor code cleanups to match the VS repository changes

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/ToolStripDesigner.cs:996

  • [nitpick] Consider clarifying this comment to explain what 'DummyItem' refers to, for improved readability.
// We are DummyItem to the ToolStrip.
Copy link

codecov bot commented Mar 10, 2025

Codecov Report

Attention: Patch coverage is 57.60870% with 39 lines in your changes missing coverage. Please review.

Project coverage is 61.33731%. Comparing base (eaaf38c) to head (d4f90c1).
Report is 29 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #13093         +/-   ##
===================================================
+ Coverage   61.28341%   61.33731%   +0.05389%     
===================================================
  Files           1541        1543          +2     
  Lines         158281      158393        +112     
  Branches       14743       14754         +11     
===================================================
+ Hits           97000       97154        +154     
+ Misses         60584       60543         -41     
+ Partials         697         696          -1     
Flag Coverage Δ
Debug 61.33731% <57.60870%> (+0.05389%) ⬆️
integration 10.73083% <0.00000%> (-0.00690%) ⬇️
production 39.22659% <57.60870%> (+0.07643%) ⬆️
test 95.67698% <ø> (+0.00418%) ⬆️
unit 36.64961% <57.60870%> (+0.07677%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Tanya-Solyanik Tanya-Solyanik added waiting-author-feedback The team requires more information from the author and removed waiting-review This item is waiting on review by one or more members of team labels Mar 11, 2025
@LeafShi1 LeafShi1 added waiting-review This item is waiting on review by one or more members of team and removed waiting-author-feedback The team requires more information from the author labels Mar 12, 2025
_undoEngine.Undoing += OnUndoing;
_undoEngine.Undone += OnUndone;
}
}

Copy link
Member

Choose a reason for hiding this comment

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

        _undoEngine?? = GetService(typeof(UndoEngine)) as UndoEngine;

        if (_undoEngine is not null)
        {
            _undoEngine.Undoing += OnUndoing;
            _undoEngine.Undone += OnUndone;
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-review This item is waiting on review by one or more members of team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missed the "Type Here" item for the MenuStrip control in the DemoConsole application
3 participants