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

Ready for Review - [MouseJump] move "common" classes into separate project #34333

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

Conversation

mikeclayton
Copy link
Contributor

@mikeclayton mikeclayton commented Aug 17, 2024

Summary of the Pull Request

This is an attempt to break PR #33486 ([Mouse Jump] - Customisable appearance - borders, margins, colours) down into smaller chunks because it's gotten unmanageable due to its age and number of commits (currently 37 commits / 205 files changed and 25 merge conflicts).

This PR just moves the files in the "MouseJumpUI\Common" folder into a separate *.csproj project so that it can eventually be referenced by the SettingsUI project to draw a sample preview image when style settings are changed. There's no functionality changes in the code, just a move of the existing classes into a separate project (and updating the namespaces), so it'll hopefully be a lot easier to review than #33486, which can eventually be cancelled.

A separate follow-up PR will re-implement the Settings UI changes to close PR #33486 and Issue #27511.

PR Checklist

Detailed Description of the Pull Request / Additional comments

This PR moves all of the code currently held in the MouseJumpUI project under "src\modules\MouseUtils\MouseJumpUI\Common" into a new project "MouseJump.Common". This will allow the project to be referenced from the SettingsUI project in a follow-up PR as part of the work to implement customisable style settings.

Validation Steps Performed

  • Workflow tests
    • Automated tests passing locally
    • Minimal actions workflow (spelling check) passing for PR
    • Full actions workflow (msbuild) passing for PR
  • UI tests
  • Lifecycle tests
    • Starting PowerToys Runner launches MouseJumpUI.exe when enabled, and not when disabled
    • Enabling / disabling Mouse Jump in settings starts / stops MouseJumpUI.exe
    • Exiting PowerToys Runner stops MouseJumpUI.exe
    • Killing runner exe via Task Manager stops MouseJumpUI.exe
    • Stopping Visual Studio local debug run stops MouseJumpUI.exe
      • note - runner needs to be in non-admin mode otherwise Visual Studio debugger disconnects at launch
    • Hotkey and size settings are automatically reloaded when config file is modified from Settings UI
    • Hotkey and size settings are automatically reloaded when config file is modified manually (e.g. in notepad) while runner and MouseJumpUI.exe are running
  • Internal Test Suite
    • Enable Mouse Jump. Then:
    • Press the activation shortcut and verify the screens preview appears.
    • Change activation shortcut and verify that new shortcut triggers Mouse Jump.
    • Click around the screen preview and ensure that mouse cursor jumped to clicked location.
    • Reorder screens in Display settings and confirm that Mouse Jump reflects the change and still works correctly.
    • Change scaling of screens and confirm that Mouse Jump still works correctly.
    • Unplug additional monitors and confirm that Mouse Jump still works correctly.
    • Disable Mouse Jump and verify that the module is not activated when you press the activation shortcut.

@mikeclayton mikeclayton marked this pull request as draft August 17, 2024 19:31
Clayton added 5 commits August 17, 2024 21:19
… the checks

# Conflicts:
#	src/modules/MouseUtils/MouseJump.Common.UnitTests/MouseJump.Common.UnitTests.csproj
# Conflicts:
#	src/modules/MouseUtils/MouseJump.Common.UnitTests/MouseJump.Common.UnitTests.csproj

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@mikeclayton
Copy link
Contributor Author

mikeclayton commented Aug 22, 2024

So it looks like adding <UseWinforms>true</UseWinForms> to MouseJump.Common.csproj has fixed the problem with verifyDepsJsonLibraryVersions.ps1 detecting a different version of System.Drawing.Common.dll being referenced in MouseJump.Common versus all the other modules.

I'm not keen on it as a fix as MouseJump.Common only really needs a reference to System.Drawing.Common and not the whole WinForms, but I can't work out how to get the build to use the right version of System.Drawing.Common, so this might have to do for now :-S...

@mikeclayton mikeclayton marked this pull request as ready for review August 23, 2024 13:36
@mikeclayton mikeclayton changed the title WIP - [MouseJump] move "common" classes into separate project Ready for Review - [MouseJump] move "common" classes into separate project Aug 23, 2024
@mikeclayton
Copy link
Contributor Author

mikeclayton commented Aug 23, 2024

I think this PR is ready for review now - the manual and automated tests all work and the build pipeline is green.

The only remaining piece of work is to incorporate the new "MouseJump.Common.dll" assembly into the installer. I'm not super-confident about what is required for that - would someone from the core team be able to help?

@crutkas crutkas added the Needs-Review This Pull Request awaits the review of a maintainer. label Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Review This Pull Request awaits the review of a maintainer.
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants