Skip to content

Make the "Show LightBulb" hotkey toggle the window on/off instead #378

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 1 commit into from
May 21, 2025

Conversation

Tyrrrz
Copy link
Owner

@Tyrrrz Tyrrrz commented May 21, 2025

No description provided.

@Tyrrrz Tyrrrz requested a review from Copilot May 21, 2025 20:36
Copy link

@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

This PR reworks the hotkey functionality so that the "Show LightBulb" hotkey now toggles the window's visibility instead of solely focusing the window.

  • Updated UI components with new labels and bindings in the settings tab
  • Adjusted hotkey registration behavior in view models and application event handlers
  • Modified service properties and Avalonia extensions to support the new toggle functionality

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
LightBulb/Views/Components/Settings/HotKeySettingsTabView.axaml Updated UI texts and bound properties for toggling functionality
LightBulb/ViewModels/MainViewModel.cs Changed how the main window is activated when a hotkey event occurs
LightBulb/ViewModels/Components/Settings/HotKeySettingsTabViewModel.cs Removed and added hotkey properties to align with new behavior
LightBulb/ViewModels/Components/DashboardViewModel.cs Reconfigured hotkey registrations for toggling the window and enabling/disabling functionality
LightBulb/Utils/Extensions/AvaloniaExtensions.cs Replaced the focus method with a toggle method to support hiding/showing
LightBulb/Services/SettingsService.cs Updated hotkey properties with JSON mapping changes to accommodate new functionality
LightBulb/App.axaml.cs Updated TrayIcon and settings menu click events to trigger toggle actions
LightBulb/App.axaml Updated menu item texts to reflect the new toggling and enabling/disabling behavior


[ObservableProperty]
public partial HotKey ToggleHotKey { get; set; }
[JsonPropertyName("FocusWindowHotKey")]
Copy link
Preview

Copilot AI May 21, 2025

Choose a reason for hiding this comment

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

The JSON property name 'FocusWindowHotKey' does not match the new property name 'ToggleWindowHotKey', which could confuse consumers or lead to incorrect serialization mappings. Consider updating the JSON attribute to reflect the current property name for clarity and consistency.

Copilot uses AI. Check for mistakes.

Copy link

codecov bot commented May 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.35%. Comparing base (5336f3d) to head (6e6f445).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #378   +/-   ##
=======================================
  Coverage   96.35%   96.35%           
=======================================
  Files           7        7           
  Lines         192      192           
  Branches       15       15           
=======================================
  Hits          185      185           
  Misses          6        6           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Tyrrrz Tyrrrz merged commit d2a9f99 into master May 21, 2025
8 checks passed
@Tyrrrz Tyrrrz deleted the toggle-lightbulb-ui-hotkey branch May 21, 2025 20:49
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.

1 participant