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

Text Extractor: open settings is buggy #32352

Closed
Jay-o-Way opened this issue Apr 9, 2024 · 8 comments
Closed

Text Extractor: open settings is buggy #32352

Jay-o-Way opened this issue Apr 9, 2024 · 8 comments
Assignees
Labels
Area-Quality Stability, Performance, Etc. Hot Fix Items we will product an out-of-band release for Issue-Bug Something isn't working Product-Text Extractor This refers to the Text Extractor PowerToy Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@Jay-o-Way
Copy link
Collaborator

Microsoft PowerToys version

0.80.0

Installation method

PowerToys auto-update

Running as admin

None

Area(s) with issue?

TextExtractor

Steps to reproduce

Open Text Extractor. Click the "⚙️" (settings) button.

✔️ Expected Behavior

Settings opens on the right page

❌ Actual Behavior

In 0.80, this opens the Dashboard page, even though PowerOCR is used in the SettingsWindowNameToString(window) method. In a PR i'm working on, something is crashing.

Other Software

No response

@Jay-o-Way Jay-o-Way added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Area-Quality Stability, Performance, Etc. Product-Text Extractor This refers to the Text Extractor PowerToy labels Apr 9, 2024
Copy link

github-actions bot commented Apr 9, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@davidegiacometti
Copy link
Collaborator

Same issue can be reproduced while trying to open Text Extractor from The PT Run result.

@Jay-o-Way
Copy link
Collaborator Author

Same issue can be reproduced while trying to open Text Extractor from The PT Run result.

I think that's the opposite "direction" of what I meant?

image

This works fine for me.

@Jay-o-Way Jay-o-Way removed the Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams label Apr 9, 2024
@davidegiacometti
Copy link
Collaborator

Oops! I meant open Text Extractor settings from the context button, not the utility.

These aren't aligned: PowerOCR and PowerOcr.
This could also be improved! 😄

private static string SettingsWindowNameToString(SettingsWindow value)
{
switch (value)
{
case SettingsWindow.Overview:
return "Overview";
case SettingsWindow.Awake:
return "Awake";
case SettingsWindow.ColorPicker:
return "ColorPicker";
case SettingsWindow.FancyZones:
return "FancyZones";
case SettingsWindow.Run:
return "Run";
case SettingsWindow.ImageResizer:
return "ImageResizer";
case SettingsWindow.KBM:
return "KBM";
case SettingsWindow.MouseUtils:
return "MouseUtils";
case SettingsWindow.PowerRename:
return "PowerRename";
case SettingsWindow.FileExplorer:
return "FileExplorer";
case SettingsWindow.ShortcutGuide:
return "ShortcutGuide";
case SettingsWindow.VideoConference:
return "VideoConference";
case SettingsWindow.Hosts:
return "Hosts";
case SettingsWindow.MeasureTool:
return "MeasureTool";
case SettingsWindow.PowerOCR:
return "PowerOCR";
case SettingsWindow.RegistryPreview:
return "RegistryPreview";
case SettingsWindow.CropAndLock:
return "CropAndLock";
case SettingsWindow.EnvironmentVariables:
return "EnvironmentVariables";
case SettingsWindow.Dashboard:
return "Dashboard";
default:
{
return string.Empty;
}
}
}

public static Type GetPage(string settingWindow)
{
switch (settingWindow)
{
case "Dashboard": return typeof(DashboardPage);
case "Overview": return typeof(GeneralPage);
case "AlwaysOnTop": return typeof(AlwaysOnTopPage);
case "Awake": return typeof(AwakePage);
case "CmdNotFound": return typeof(CmdNotFoundPage);
case "ColorPicker": return typeof(ColorPickerPage);
case "FancyZones": return typeof(FancyZonesPage);
case "FileLocksmith": return typeof(FileLocksmithPage);
case "Run": return typeof(PowerLauncherPage);
case "ImageResizer": return typeof(ImageResizerPage);
case "KBM": return typeof(KeyboardManagerPage);
case "MouseUtils": return typeof(MouseUtilsPage);
case "MouseWithoutBorders": return typeof(MouseWithoutBordersPage);
case "PowerRename": return typeof(PowerRenamePage);
case "QuickAccent": return typeof(PowerAccentPage);
case "FileExplorer": return typeof(PowerPreviewPage);
case "ShortcutGuide": return typeof(ShortcutGuidePage);
case "PowerOcr": return typeof(PowerOcrPage);
case "VideoConference": return typeof(VideoConferencePage);
case "MeasureTool": return typeof(MeasureToolPage);
case "Hosts": return typeof(HostsPage);
case "RegistryPreview": return typeof(RegistryPreviewPage);
case "PastePlain": return typeof(PastePlainPage);
case "Peek": return typeof(PeekPage);
case "CropAndLock": return typeof(CropAndLockPage);
case "EnvironmentVariables": return typeof(EnvironmentVariablesPage);
default:
// Fallback to Dashboard
Debug.Assert(false, "Unexpected SettingsWindow argument value");
return typeof(DashboardPage);
}
}

@jaimecbernardo
Copy link
Collaborator

Oops! I meant open Text Extractor settings from the context button, not the utility.

These aren't aligned: PowerOCR and PowerOcr. This could also be improved! 😄

private static string SettingsWindowNameToString(SettingsWindow value)
{
switch (value)
{
case SettingsWindow.Overview:
return "Overview";
case SettingsWindow.Awake:
return "Awake";
case SettingsWindow.ColorPicker:
return "ColorPicker";
case SettingsWindow.FancyZones:
return "FancyZones";
case SettingsWindow.Run:
return "Run";
case SettingsWindow.ImageResizer:
return "ImageResizer";
case SettingsWindow.KBM:
return "KBM";
case SettingsWindow.MouseUtils:
return "MouseUtils";
case SettingsWindow.PowerRename:
return "PowerRename";
case SettingsWindow.FileExplorer:
return "FileExplorer";
case SettingsWindow.ShortcutGuide:
return "ShortcutGuide";
case SettingsWindow.VideoConference:
return "VideoConference";
case SettingsWindow.Hosts:
return "Hosts";
case SettingsWindow.MeasureTool:
return "MeasureTool";
case SettingsWindow.PowerOCR:
return "PowerOCR";
case SettingsWindow.RegistryPreview:
return "RegistryPreview";
case SettingsWindow.CropAndLock:
return "CropAndLock";
case SettingsWindow.EnvironmentVariables:
return "EnvironmentVariables";
case SettingsWindow.Dashboard:
return "Dashboard";
default:
{
return string.Empty;
}
}
}

public static Type GetPage(string settingWindow)
{
switch (settingWindow)
{
case "Dashboard": return typeof(DashboardPage);
case "Overview": return typeof(GeneralPage);
case "AlwaysOnTop": return typeof(AlwaysOnTopPage);
case "Awake": return typeof(AwakePage);
case "CmdNotFound": return typeof(CmdNotFoundPage);
case "ColorPicker": return typeof(ColorPickerPage);
case "FancyZones": return typeof(FancyZonesPage);
case "FileLocksmith": return typeof(FileLocksmithPage);
case "Run": return typeof(PowerLauncherPage);
case "ImageResizer": return typeof(ImageResizerPage);
case "KBM": return typeof(KeyboardManagerPage);
case "MouseUtils": return typeof(MouseUtilsPage);
case "MouseWithoutBorders": return typeof(MouseWithoutBordersPage);
case "PowerRename": return typeof(PowerRenamePage);
case "QuickAccent": return typeof(PowerAccentPage);
case "FileExplorer": return typeof(PowerPreviewPage);
case "ShortcutGuide": return typeof(ShortcutGuidePage);
case "PowerOcr": return typeof(PowerOcrPage);
case "VideoConference": return typeof(VideoConferencePage);
case "MeasureTool": return typeof(MeasureToolPage);
case "Hosts": return typeof(HostsPage);
case "RegistryPreview": return typeof(RegistryPreviewPage);
case "PastePlain": return typeof(PastePlainPage);
case "Peek": return typeof(PeekPage);
case "CropAndLock": return typeof(CropAndLockPage);
case "EnvironmentVariables": return typeof(EnvironmentVariablesPage);
default:
// Fallback to Dashboard
Debug.Assert(false, "Unexpected SettingsWindow argument value");
return typeof(DashboardPage);
}
}

This is exactly what I suspected. It was changed for DSC and impacted these.

@Jay-o-Way
Copy link
Collaborator Author

This is exactly what I suspected. It was changed for DSC and impacted these.

I'll believe you 👍 Something you would like to pick up or better for somebody else?

@jaimecbernardo
Copy link
Collaborator

This is exactly what I suspected. It was changed for DSC and impacted these.

I'll believe you 👍 Something you would like to pick up or better for somebody else?

I'm doing it. Thank you :)

@jaimecbernardo jaimecbernardo self-assigned this Apr 9, 2024
@jaimecbernardo jaimecbernardo added Product-Settings The standalone PowerToys Settings application Status-In progress This issue or work-item is under development and removed Product-Settings The standalone PowerToys Settings application labels Apr 9, 2024
@jaimecbernardo jaimecbernardo added the Hot Fix Items we will product an out-of-band release for label Apr 9, 2024
@jaimecbernardo jaimecbernardo added Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed Status-In progress This issue or work-item is under development labels Apr 9, 2024
@jaimecbernardo
Copy link
Collaborator

This one should be fixed with the 0.80.1 hotfix. Please update to the latest version: https://github.com/microsoft/PowerToys/releases

@jaimecbernardo jaimecbernardo added this to the PowerToys 0.81 milestone Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Quality Stability, Performance, Etc. Hot Fix Items we will product an out-of-band release for Issue-Bug Something isn't working Product-Text Extractor This refers to the Text Extractor PowerToy Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants