Compare commits

...

146 Commits

Author SHA1 Message Date
Jaylyn Barbee
794b26d8dd Merge branch 'main' into jay/lsv2 2025-10-07 12:39:46 -04:00
Jaylyn Barbee
237d1d5537 Updated UI tests for Light Switch to match new UI 2025-10-07 12:36:39 -04:00
Jaylyn Barbee
7524dc9a79 Reverting changes from swapping name incorrectly from dark mode to light switch 2025-10-02 09:56:24 -04:00
Jaylyn Barbee
7d91089180 Reverting changes from swapping name incorrectly from dark mode to light switch 2025-10-02 09:50:43 -04:00
Jaylyn Barbee
8f691c99d0 another push for the Icon 2025-10-01 14:31:17 -04:00
Jaylyn Barbee
59cdd6e359 Adding icon for Light Switch exe 2025-10-01 14:20:27 -04:00
Jaylyn Barbee
2c8fe39458 Merge branch 'jay/lsv2' of https://github.com/microsoft/PowerToys into jay/lsv2 2025-10-01 14:10:38 -04:00
Jaylyn Barbee
c51e69a8f2 Updating JSON for signing new binaries 2025-10-01 14:06:10 -04:00
Jaylyn Barbee
ef7d154f79 Merge branch 'main' into jay/lsv2 2025-10-01 13:58:54 -04:00
Jaylyn Barbee
551f92ef63 Added Light Switch to the Bug Report Tool 2025-10-01 09:42:07 -04:00
Jaylyn Barbee
0e26f43df9 XAML Formatting 2025-09-30 15:55:16 -04:00
Jaylyn Barbee
329a84942c new defaults, clock mode respects user settings 2025-09-30 15:32:15 -04:00
Jaylyn Barbee
2995659e8a fixed location info warning appearing in incorrect scenarios 2025-09-30 14:32:22 -04:00
Jaylyn Barbee
544aca6273 Sunrise/Sunset offset were separated in the front end but not in the service. 2025-09-30 09:10:30 -04:00
Jaylyn Barbee
4cc8d05b7d Merge branch 'main' into jay/lsv2 2025-09-29 09:15:20 -04:00
Gordon Lam (SH)
8bb96d1ea0 Fix project configuration 2025-09-29 16:40:31 +08:00
Niels Laute
af8bc74d5d Update PowerToys.admx 2025-09-28 11:47:39 +02:00
Niels Laute
da250b2264 Exclude from run plugin 2025-09-28 11:45:35 +02:00
Niels Laute
0bcbd07f5c Fix settingscard crash 2025-09-28 11:43:55 +02:00
Niels Laute
ca65453ec5 Update LightSwitchPage.xaml 2025-09-27 17:12:58 +02:00
Niels Laute
831b4b23c8 Adding OOBE page + small fixes 2025-09-27 17:07:50 +02:00
Niels Laute
eed4033ade Updated description 2025-09-27 16:15:24 +02:00
Niels Laute
0cb9b35dfa Add GPO control instead of infobar 2025-09-27 16:12:06 +02:00
Niels Laute
14efadcab7 Merge branch 'main' into jay/lsv2 2025-09-27 16:09:12 +02:00
Niels Laute
a5901e02a2 Localization 2025-09-27 16:09:04 +02:00
Niels Laute
c432f3741f Fix spellcheck 2025-09-27 15:54:51 +02:00
Niels Laute
3fbf10a946 Merge branch 'jay/lsv2' of https://github.com/microsoft/PowerToys into jay/lsv2 2025-09-26 19:52:09 +02:00
Niels Laute
f6d7c5aefe Adding logic to hide the chart if location has not been set 2025-09-26 19:52:03 +02:00
Jaylyn Barbee
f2352bcedf Dev docs for Light Switch 2025-09-26 11:34:19 -04:00
Jaylyn Barbee
52f44c5693 updating packaging info for ui test 2025-09-26 09:42:08 -04:00
Jaylyn Barbee
23da7de971 Reverting change to DarkMode string 2025-09-25 11:39:38 -04:00
Jaylyn Barbee
03760fa182 Removing typos 2025-09-24 15:28:08 -04:00
Jaylyn Barbee
0f0285c364 Fix time switching btwn modes 2025-09-23 16:37:21 -04:00
Niels Laute
107967aa45 Update LightSwitchPage.xaml 2025-09-23 20:41:12 +02:00
Niels Laute
9283f99a31 XAML formatting + string tweaks 2025-09-23 20:36:49 +02:00
Niels Laute
8073be34b6 Merge branch 'jay/lsv2' of https://github.com/microsoft/PowerToys into jay/lsv2 2025-09-23 20:31:52 +02:00
Niels Laute
d13216eb01 Removing location lookup 2025-09-23 20:30:45 +02:00
Jaylyn Barbee
54887c7aa1 Some updates to settings ui 2025-09-23 13:22:24 -04:00
Jaylyn Barbee
131b8c6743 working on some known bugs 2025-09-23 11:55:06 -04:00
Jaylyn Barbee
77aa112aca Removed all logic for a debug window 2025-09-23 11:46:57 -04:00
Jaylyn Barbee
eb41935c50 Removed debug window 2025-09-23 09:51:52 -04:00
Jaylyn Barbee
6fee7eb55f Removed entry from Wix3 setup 2025-09-23 08:29:25 -04:00
Jaylyn Barbee
e5ddd39d0f Directory update 2025-09-22 20:33:27 -04:00
Jaylyn Barbee
0fb9333c69 added missing reference 2025-09-22 20:29:07 -04:00
Jaylyn Barbee
d6c6395b80 Fixing build errors, updating links 2025-09-22 17:54:03 -04:00
Jaylyn Barbee
e894982069 ComponentRef added 2025-09-22 17:01:15 -04:00
Jaylyn Barbee
8d8ed80fdb Fix to Light Switch interface 2025-09-22 15:24:08 -04:00
Jaylyn Barbee
02e87f8e78 Installer updates 2025-09-22 14:55:31 -04:00
Jaylyn Barbee
c27b0fff9c XAML formatting 2025-09-22 08:24:39 -04:00
Jaylyn Barbee
b585fa4534 more installer updates 2025-09-12 13:33:21 -04:00
Jaylyn Barbee
467b66d313 wix updates for light switch 2025-09-12 13:30:40 -04:00
Jaylyn Barbee
94be1f2be7 Adding ui tests (#41785) 2025-09-12 11:49:40 -04:00
Jaylyn Barbee
e9bcce7ec5 added installer files for Light Switch 2025-09-11 10:45:28 -04:00
Jaylyn Barbee
b0373362ee Adding extra logs 2025-09-09 12:29:08 -04:00
Jaylyn Barbee
f0cc35c1c1 Merge branch 'jay/lsv2' of https://github.com/microsoft/PowerToys into jay/lsv2 2025-09-09 11:24:14 -04:00
Jaylyn Barbee
9a44c6e4ee Working on setting the correct output paths 2025-09-09 10:28:50 -04:00
Niels Laute
ae00b77f8a Update LightSwitchPage.xaml 2025-09-09 09:53:51 +02:00
Niels Laute
6bfb11eafb Search index shouldn't be part of this PR 2025-09-09 09:48:11 +02:00
Jaylyn Barbee
e65d8fc2ed ensure light switch service exe is output in release mode 2025-09-08 23:30:14 -04:00
Jaylyn Barbee
c1510f2075 Fixed manual pickers not updating bug 2025-09-08 21:18:03 -04:00
Jaylyn Barbee
7de9686a38 fixed malformed entry in solution 2025-09-08 16:51:59 -04:00
Jaylyn Barbee
b6406eaa7e fixed xaml styling 2025-09-08 15:58:09 -04:00
Jaylyn Barbee
ad4ef1a8c3 separated the offsets 2025-09-08 15:34:13 -04:00
Jaylyn Barbee
f7139b88b2 changed from csv to static city list 2025-09-08 15:20:35 -04:00
Niels Laute
d34ba803be Merge branch 'main' into jay/lsv2 2025-09-08 20:16:27 +02:00
Jaylyn Barbee
a3a8c90df9 release mode not displaying cities list, fixed 2025-09-08 12:38:51 -04:00
Jaylyn Barbee
c8d9a8ccb6 file rearranging, should fix build issue 2025-09-08 10:50:38 -04:00
Jaylyn Barbee
a5dffc6ee3 Merge branch 'jay/lsv2' of https://github.com/microsoft/PowerToys into jay/lsv2 2025-09-08 09:46:00 -04:00
Jaylyn Barbee
2ebe234dca fixed release build 2025-09-08 09:45:48 -04:00
Niels Laute
c68bafcd1f Update LightSwitchPage.xaml 2025-09-08 15:24:18 +02:00
Jaylyn Barbee
c4a4c1d659 Removed merege artifcat 2025-09-05 13:07:56 -04:00
Jaylyn Barbee
f83e5ff218 removed uneeded import 2025-09-05 13:01:05 -04:00
Jaylyn Barbee
0462089c62 xaml styling 2025-09-05 12:39:20 -04:00
Jaylyn Barbee
af83f7d3ad Offset reflects to the timeline 2025-09-05 11:59:15 -04:00
Niels Laute
d10ecd8a13 Hiding panel 2025-09-05 15:10:46 +02:00
Niels Laute
e7ecaafdc1 UX tweaks to the location dialog 2025-09-05 14:57:10 +02:00
Jaylyn Barbee
432120f56b Updating suntimes at midnight 2025-09-04 16:03:21 -04:00
Jaylyn Barbee
88f66169cc Fixed timeline display 2025-09-04 12:36:14 -04:00
Jaylyn Barbee
1c4503753e making sure values update when they need to 2025-09-04 12:30:46 -04:00
Jaylyn Barbee
0810db222d merged the two sunset to sunrise mode, displays best information available (city name or just lat/long) 2025-09-04 12:18:37 -04:00
Niels Laute
1dac59c9c3 Merging dialog UX changes 2025-09-04 14:59:26 +02:00
Jaylyn Barbee
2c434d33f2 added auto suggest text box instead of drop down 2025-09-03 16:41:06 -04:00
Jaylyn Barbee
083ff01f47 fixed force mode isse 2025-09-03 15:47:16 -04:00
Jaylyn Barbee
b958f546b9 only running service when changes need to be made 2025-09-03 15:00:29 -04:00
Jaylyn Barbee
69b624991f small fixes to ui, mode needs to persist in content dialog 2025-09-03 13:05:31 -04:00
Jaylyn Barbee
d4b379d90a removed unneeded comments 2025-09-02 11:43:45 -04:00
Jaylyn Barbee
6c031d3b47 removed unneeded comments 2025-09-02 11:40:19 -04:00
Jaylyn Barbee
bccaaad247 small fixes to settings page 2025-09-02 11:25:36 -04:00
Jaylyn Barbee
9c4a713791 merging niels most recent changes 2025-09-02 10:49:21 -04:00
Jaylyn Barbee
1be874eade force mode respects checkboxes 2025-08-29 16:12:26 -04:00
Jaylyn Barbee
565ffb9084 small string fix 2025-08-29 16:03:48 -04:00
Jaylyn Barbee
afd32d0196 fixed toggle mode shortcut 2025-08-29 15:59:52 -04:00
Jaylyn Barbee
e80f38a302 more text fixes 2025-08-29 09:45:22 -04:00
Jaylyn Barbee
ee2dffc6a4 small text fix 2025-08-29 09:43:24 -04:00
Jaylyn Barbee
fee2d0ab81 small text updates 2025-08-29 09:43:00 -04:00
Niels Laute
d403d5a7fb Adding (temp) icon 2025-08-29 07:38:06 +02:00
Niels Laute
289f47c1ea UX tweaks 2025-08-29 07:33:33 +02:00
Jaylyn Barbee
6bbfdd9a93 all things merged and well 2025-08-28 17:23:02 -04:00
Jaylyn Barbee
47102583af Merge branch 'jay/DarkModeModule' of https://github.com/microsoft/PowerToys into jay/DarkModeModule 2025-08-28 17:00:42 -04:00
Jaylyn Barbee
52ff8bea34 merging renaming 2025-08-28 17:00:39 -04:00
Niels Laute
a3441eecc6 Rename pages 2025-08-28 23:00:14 +02:00
Jaylyn Barbee
88cf1ecaec Changed name from dark mode to light swith 2025-08-28 16:32:22 -04:00
Niels Laute
a1b09180d8 Moving location stuff to the dialog 2025-08-28 22:24:45 +02:00
Niels Laute
6907f26243 Small tweaks + adding chart 2025-08-28 19:41:11 +02:00
Jaylyn Barbee
911a4e1009 some clean up around forcing modeS 2025-08-27 15:41:18 -04:00
Jaylyn Barbee
44be38e9b6 shortcuts working 2025-08-27 15:25:54 -04:00
Jaylyn Barbee
00d15ba780 3rd mode added, user selected city location 2025-08-27 14:15:19 -04:00
Jaylyn Barbee
b1b1791489 offset setting added 2025-08-27 13:02:01 -04:00
Jaylyn Barbee
05ae7129aa moved some files around 2025-08-26 11:59:39 -04:00
Jaylyn Barbee
4b015605a1 working on mode switching, some bugs right now 2025-08-21 14:15:41 -04:00
Jaylyn Barbee
fa29bebec3 using location services to calculate sun rise and sunset times is working 2025-08-21 13:53:26 -04:00
Jaylyn Barbee
9816d6fc05 Small comment 2025-08-21 11:47:18 -04:00
Jaylyn Barbee
323ddfdf55 stale catchup from sleep/lock at next minute + wrap around scale rather than forcing light mode to be first 2025-08-21 11:35:01 -04:00
Jaylyn Barbee
ae6187101f stale catchup for if you were shutdown/not running the service 2025-08-21 11:15:53 -04:00
Jaylyn Barbee
be105b5e27 Fixed flashing issue, legacy code got stuck when removing old logic 2025-08-21 10:56:30 -04:00
Jaylyn Barbee
8aedc4a61d Force mode buttons working using custom actions 2025-08-21 10:43:35 -04:00
Jaylyn Barbee
9c82281bb1 gpo fixes, tested and works! 2025-08-20 14:10:17 -04:00
Jaylyn Barbee
df74f6e3c7 added GPO 2025-08-20 10:20:34 -04:00
Jaylyn Barbee
887e552d43 merged main + ui changes + clean up in logic 2025-08-19 12:09:18 -04:00
Jaylyn Barbee
df61b2863e changed to date time pickers and separated the apps and system theme change 2025-08-19 11:37:31 -04:00
Jaylyn Barbee
9f581101a8 settings are persisting 2025-08-19 11:21:48 -04:00
Jaylyn Barbee
db41f61010 settings saving correctly 2025-08-19 11:03:10 -04:00
Niels Laute
e28e4582c9 Merge branch 'main' into jay/DarkModeModule 2025-08-19 16:43:51 +02:00
Niels Laute
abc7f3f3fb UI tweaks in Settings 2025-08-19 16:40:41 +02:00
Jaylyn Barbee
039991bc4a wiring in settings to load into service 2025-08-19 10:19:37 -04:00
Jaylyn Barbee
a857cc688b removing the ui 2025-08-19 09:23:51 -04:00
Jaylyn Barbee
1be5e5931a in nuget package trouble, settings are saving but not loading properly 2025-08-18 17:04:59 -04:00
Jaylyn Barbee
03fafa747f settings saving appropriately. 2025-08-14 17:07:57 -04:00
Jaylyn Barbee
62b4075349 service works, changes settings based on the time it has in the settings, but settings ui not connected to settings 2025-08-11 14:37:27 -04:00
Jaylyn Barbee
cc42876c01 service is enabling and disabling via ui, still one error at launch 2025-08-11 11:15:54 -04:00
Jaylyn Barbee
2d30fe2ec2 moved logic to service, incomplete right now though 2025-08-08 12:32:29 -04:00
Jaylyn Barbee
247cc47491 got logging figured out 2025-08-07 18:02:28 -04:00
Jaylyn Barbee
7de506010e trying to figured out build error 2025-08-07 15:53:48 -04:00
Jaylyn Barbee
736a04f65c small updates 2025-08-06 11:59:42 -04:00
Jaylyn Barbee
b66b44cc49 showing in runner now. settings still not connected, service still not running. 2025-08-06 10:47:16 -04:00
Jaylyn Barbee
f55f465c83 forward progress, trying to figure out runner 2025-08-05 14:20:12 -04:00
Jaylyn Barbee
30e6215003 repair work to the module interface 2025-08-05 13:55:29 -04:00
Jaylyn Barbee
bdafb0e38a trying to get it to show in runner but imports are busted 2025-08-05 12:21:14 -04:00
Jaylyn Barbee
50c5d577bc something broken with converters flipping to show settings 2025-08-04 16:41:35 -04:00
Jaylyn Barbee
a9e838ae1d Starting to fill in settings page 2025-08-04 15:26:32 -04:00
Jaylyn Barbee
c47ff9cd55 interface done? 2025-08-04 12:23:44 -04:00
Jaylyn Barbee
104d4fd6a0 Working on interface 2025-08-04 12:16:55 -04:00
Jaylyn Barbee
37242fbb4d commit base interface 2025-08-04 11:28:39 -04:00
Jaylyn Barbee
2c39113914 Fixing build errors 2025-08-04 11:23:10 -04:00
Jaylyn Barbee
bf07c11640 Linked to project 2025-08-04 11:03:15 -04:00
Jaylyn Barbee
2c6a8bac27 Dark mode code dump 2025-08-04 10:54:36 -04:00
3 changed files with 62 additions and 13 deletions

View File

@@ -150,7 +150,7 @@ namespace LightSwitch.UITests
var modeCombobox = testBase.Session.Find<Element>(By.AccessibilityId("ModeSelection_LightSwitch"), 5000);
Assert.IsNotNull(modeCombobox, "Mode combobox not found.");
var neededTabs = 5;
var neededTabs = 6;
if (modeCombobox.Text != "Manual")
{
@@ -167,7 +167,7 @@ namespace LightSwitch.UITests
Assert.IsNotNull(timeline, "Timeline not found.");
var helpText = timeline.GetAttribute("HelpText");
string originalStartValue = GetHelpTextValue(helpText, "Start");
string originalEndValue = GetHelpTextValue(helpText, "End");
for (int i = 0; i < neededTabs; i++)
{
@@ -179,12 +179,12 @@ namespace LightSwitch.UITests
testBase.Session.SendKeys(Key.Enter);
helpText = timeline.GetAttribute("HelpText");
string updatedStartValue = GetHelpTextValue(helpText, "Start");
string updatedEndValue = GetHelpTextValue(helpText, "End");
Assert.AreNotEqual(originalStartValue, updatedStartValue, "Timeline start time should have been updated.");
Assert.AreNotEqual(originalEndValue, updatedEndValue, "Timeline end time should have been updated.");
helpText = timeline.GetAttribute("HelpText");
string originalEndValue = GetHelpTextValue(helpText, "End");
string originalStartValue = GetHelpTextValue(helpText, "Start");
testBase.Session.SendKeys(Key.Tab);
testBase.Session.SendKeys(Key.Enter);
@@ -192,9 +192,9 @@ namespace LightSwitch.UITests
testBase.Session.SendKeys(Key.Enter);
helpText = timeline.GetAttribute("HelpText");
string updatedEndValue = GetHelpTextValue(helpText, "End");
string updatedStartValue = GetHelpTextValue(helpText, "Start");
Assert.AreNotEqual(originalEndValue, updatedEndValue, "Timeline end time should have been updated.");
Assert.AreNotEqual(originalStartValue, updatedStartValue, "Timeline start time should have been updated.");
}
/// <summary>
@@ -259,11 +259,7 @@ namespace LightSwitch.UITests
// Click the select city button
var setLocationButton = testBase.Session.Find<Element>(By.AccessibilityId("SetLocationButton_LightSwitch"), 5000);
Assert.IsNotNull(setLocationButton, "Set location button not found.");
setLocationButton.Click();
var syncLocationButton = testBase.Session.Find<Element>(By.AccessibilityId("SyncLocationButton_LightSwitch"), 5000);
Assert.IsNotNull(syncLocationButton, "Sync location button not found.");
syncLocationButton.Click(msPostAction: 8000);
setLocationButton.Click(msPostAction: 8000);
var latLong = testBase.Session.Find<Element>(By.AccessibilityId("LocationResultText_LightSwitch"), 5000);
Assert.IsFalse(string.IsNullOrWhiteSpace(latLong.Text));
@@ -305,6 +301,7 @@ namespace LightSwitch.UITests
string originalStartValue = GetHelpTextValue(helpText, "Start");
sunriseOffset.Click();
testBase.Session.SendKeys(Key.Up);
helpText = timeline.GetAttribute("HelpText");
string updatedStartValue = GetHelpTextValue(helpText, "Start");
@@ -319,6 +316,7 @@ namespace LightSwitch.UITests
string originalEndValue = GetHelpTextValue(helpText, "End");
sunsetOffset.Click();
testBase.Session.SendKeys(Key.Up);
helpText = timeline.GetAttribute("HelpText");
string updatedEndValue = GetHelpTextValue(helpText, "End");
@@ -338,9 +336,15 @@ namespace LightSwitch.UITests
var scrollViewer = testBase.Session.Find<Element>(By.AccessibilityId("PageScrollViewer"));
systemCheckbox.EnsureVisible(scrollViewer);
// How do I handle when something is off screen?
int neededTabs = 10;
if (!systemCheckbox.Selected)
{
for (int i = 0; i < neededTabs; i++)
{
testBase.Session.SendKeys(Key.Tab);
}
systemCheckbox.Click();
}

View File

@@ -8,6 +8,7 @@ using System.Globalization;
using Microsoft.PowerToys.Settings.UI.Helpers;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Automation;
using Microsoft.UI.Xaml.Automation.Peers;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Shapes;
using Windows.Foundation;
@@ -79,6 +80,11 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
this.IsEnabledChanged += Timeline_IsEnabledChanged;
}
protected override AutomationPeer OnCreateAutomationPeer()
{
return new TimelineAutomationPeer(this);
}
private void Timeline_Loaded(object sender, RoutedEventArgs e)
{
CheckEnabledState();

View File

@@ -0,0 +1,39 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Automation;
using Microsoft.UI.Xaml.Automation.Peers;
namespace Microsoft.PowerToys.Settings.UI.Controls
{
public partial class TimelineAutomationPeer : FrameworkElementAutomationPeer
{
public TimelineAutomationPeer(Timeline owner)
: base(owner)
{
}
protected override string GetClassNameCore() => "Timeline";
protected override AutomationControlType GetAutomationControlTypeCore()
=> AutomationControlType.Custom;
protected override string GetAutomationIdCore()
{
var owner = (Timeline)Owner;
var id = AutomationProperties.GetAutomationId(owner);
return string.IsNullOrEmpty(id) ? base.GetAutomationIdCore() : id;
}
protected override string GetNameCore()
{
var owner = (Timeline)Owner;
var name = AutomationProperties.GetName(owner);
return !string.IsNullOrEmpty(name)
? name
: $"Timeline from {owner.StartTime} to {owner.EndTime}";
}
}
}