Skip to content

related to issue 10466: add short cut ↑, ↓, ←, → to demo console #13513

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

Merged
merged 2 commits into from
Jun 9, 2025

Conversation

Epica3055
Copy link
Member

@Epica3055 Epica3055 commented May 23, 2025

related to #10466

Proposed changes

  • Add ↑, ↓, ←, → shortcut
  • Some minor code refactoring

After

pull_13513

Test methodology

manually

Microsoft Reviewers: Open in CodeFlow

Copy link

codecov bot commented May 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.59837%. Comparing base (b0b0e10) to head (f3e4a5c).
Report is 20 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #13513         +/-   ##
===================================================
+ Coverage   76.59791%   76.59837%   +0.00046%     
===================================================
  Files           3230        3230                 
  Lines         639165      639165                 
  Branches       47297       47297                 
===================================================
+ Hits          489587      489590          +3     
+ Misses        146007      145999          -8     
- Partials        3571        3576          +5     
Flag Coverage Δ
Debug 76.59837% <ø> (+0.00046%) ⬆️
integration 18.79061% <ø> (+0.01225%) ⬆️
production 51.00521% <ø> (+0.00104%) ⬆️
test 97.40411% <ø> (ø)
unit 48.39886% <ø> (+0.01326%) ⬆️

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.

@LeafShi1 LeafShi1 requested a review from Copilot May 23, 2025 10:37
Copy link
Contributor

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

Adds arrow key move shortcuts to the demo console’s design surface and cleans up the initialization loop.

  • Extend the DoAction mapping to include KEYMOVE↑/↓/←/→ commands
  • Hook arrow key Up/Down/Left/Right in MainForm to invoke move actions
  • Refactor InitFormDesigner to use a single loop and unified variable naming

Reviewed Changes

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

File Description
src/test/integration/DesignSurface/DesignSurfaceExt/DesignSurfaceExt.cs Added KEYMOVEUP, KEYMOVEDOWN, KEYMOVELEFT, KEYMOVERIGHT to the DoAction switch
src/test/integration/DesignSurface/DemoConsole/MainForm.cs Consolidated two loops into one, renamed isurf to designSurfaceExtended, and wired up KeyUp handlers for arrow keys
Comments suppressed due to low confidence (1)

src/test/integration/DesignSurface/DesignSurfaceExt/DesignSurfaceExt.cs:353

  • [nitpick] No automated tests verify the new arrow-key commands in DoAction. Add unit or integration tests to ensure KEYMOVEUP, KEYMOVEDOWN, KEYMOVELEFT, and KEYMOVERIGHT are correctly handled.
"KEYMOVEUP" => MenuCommands.KeyMoveUp,

LeafShi1
LeafShi1 previously approved these changes May 26, 2025
Copy link
Member

@LeafShi1 LeafShi1 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@ricardobossan ricardobossan left a comment

Choose a reason for hiding this comment

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

All LGTM!

@Epica3055 Epica3055 merged commit 5936761 into main Jun 9, 2025
8 checks passed
@Epica3055 Epica3055 deleted the Issue_10466_ShortCut1 branch June 9, 2025 01:26
@Olina-Zhang
Copy link
Member

Verified in the latest main branch of Winforms repo, now in demo console app, it supports ↑, ↓, ←, → keyboard to move control:

GH13513verify.mp4

@Olina-Zhang Olina-Zhang added this to the 10 Preview6 milestone Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants