microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
109k stars 6.43k forks source link

[Settings] UI suggestions #18866

Open Jay-o-Way opened 2 years ago

Jay-o-Way commented 2 years ago

GLOBAL

### Visual
- [ ] #19080
- [ ] #20173
- [ ] #14700
- [ ] #20279
- [ ] #30683
- [ ] https://github.com/microsoft/PowerToys/issues/31189
- [ ] custom properties: back to standard. Styles we do need should be put in centralized files (like CSS)
- [ ] combine the **ColorPickerButton** control + opacity to **AlphaColorPickerButton**?
### Bindings
- [ ] #30674
- [ ] align `"Path=Viewmodel.IsEnabled"` syntax in stead of _some_ module-specific, like `ViewModel.EnablePowerLauncher`
- [ ] Hosts page: `IsEnabled="{x:Bind ViewModel.LaunchAdministratorEnabled}"` is buggy, because `public bool LaunchAdministratorEnabled => IsEnabled && !_isElevated` is only checked on page loading.
- [ ] bind specific sub-functions toggled on/off by main switch
### Others
- [ ] #30676
- [ ] #30650
- [ ] remove redundant converters: `VisibleIfTrue`, `TrueToVisible`, `BooleanToVisibility`.
- [ ] MouseUtils: ListView > SettingsCard > Stackpanel > **TextBlock, TextBlock** β‡’ SettingsCard > TextBox > **Run, Run**
- [ ] MouseUtilsPage: xE947 =>"Γ—"; EditButton size
- [x] remove FontFamily and FontSize from **FontIcon**
- [ ] **ThemeResource** versus **StaticResource** ([link](https://learn.microsoft.com/windows/uwp/xaml-platform/themeresource-markup-extension#when-and-how-to-use-themeresource-rather-than-staticresource))
- [ ] (if possible) use a reusable control for 🎨 `<controls:Setting x:Uid="ColorModeHeader" ...` code?
- [ ] (if possible) use a reusable control for ⌨️ `<controls:Setting x:Uid="Activation_Shortcut" ...` code?
- [ ] PowerLauncherPage: Temporary badge replacement
- [ ] ShortcutControl: Grid, Stackpanel
- [ ] Flyout: SettingsBtn (different size)
- [ ] MWB: **MouseWithoutBorders_CopyMachineName** size/padding
- [ ] CMD: icons & colors, xaml

ALWAYS ON TOP

htcfreek commented 2 years ago

AOT

  • Sound: make it one setting (no expander)

this a preparing for the "choose file" issue

Jay-o-Way commented 2 years ago

@niels9001 in Resources.resw, I see a few lines like (for example)

<value>Open File Explorer, **select the View tab** in the File Explorer ribbon, then **select Preview Pane**.
<value>In File Explorer, **right-clicking one or more selected files** and **clicking on PowerRename** from the context menu.</value>

where words like "select" are included in bold, but that's not part of any control. Can I change these to .. ?

<value>Open File Explorer, select the **View** tab in the File Explorer ribbon, then select **Preview Pane**. 
<value>In File Explorer, right-click one or more selected files and click on **PowerRename** from the context menu.</value>
Jay-o-Way commented 2 years ago

@niels9001 https://github.com/microsoft/PowerToys/blob/a1d5df23a8ca4995ee002718ef50782791a8a531/src/settings-ui/Settings.UI/Views/VideoConference.xaml#L31-L37 This InfoBar has both an IsOpen="True" and an IsVisible={Binding} property, which I think is incorrect. Why do we use Visibility on all InfoBars anyway, when ~I think~ we only need IsOpen?

niels9001 commented 2 years ago

@niels9001 https://github.com/microsoft/PowerToys/blob/a1d5df23a8ca4995ee002718ef50782791a8a531/src/settings-ui/Settings.UI/Views/VideoConference.xaml#L31-L37 This InfoBar has both an IsOpen="True" and an IsVisible={Binding} property, which I think is incorrect. Why do we use Visibility on all InfoBars anyway, when ~I think~ we only need IsOpen?

Not sure.. there might have been a Narrator bug that still announced the InfoBars property when IsOpen was set to false. But not sure, if not we could use the IsOpen instead yes.

Jay-o-Way commented 2 years ago

ControlSetting.xaml

<Grid.ColumnDefinitions>
    <ColumnDefinition Width="20"/><!-- Icon -->
    <ColumnDefinition Width="*"/><!-- Header and subtitle -->
    <ColumnDefinition Width="Auto"/><!-- Action control -->
</Grid.ColumnDefinitions>
crutkas commented 1 year ago

This is an epic. These should be individual tasks

Jay-o-Way commented 10 months ago

I see quite a lot of the following. Should we apply the suggestion? image

Jay-o-Way commented 10 months ago

Should "using:Microsoft.PowerToys.Settings.UI.Controls" be a xmlns:local= or xmlns:custom=? image

Jay-o-Way commented 10 months ago

When VS says a namespace is unneeded, shall I remove it? image

Note: this one is consistent for every page in OobeViews

Jay-o-Way commented 10 months ago

@niels9001 I'm trying to works on some points now. Do you have an answer for the (4) questions above here?

niels9001 commented 10 months ago

When VS says a namespace is unneeded, shall I remove it? image

Note: this one is consistent for every page in OobeViews

Yeah, this can be removed as we are not using that namespace in the XAML πŸ‘

niels9001 commented 10 months ago

Should "using:Microsoft.PowerToys.Settings.UI.Controls" be a xmlns:local= or xmlns:custom=? image

Whatever works :) the 'local' or 'custom' part is up to the developer to determine. Here, 'controls' would make most sense?

Jay-o-Way commented 10 months ago

@niels9001 I was just looking at https://learn.microsoft.com/windows/uwp/xaml-platform/themeresource-markup-extension#when-and-how-to-use-themeresource-rather-than-staticresource and it looks like we should be using ThemeResource in a lot more places. It should be used for brushes, font properties and text styles (amongst others) and we often use a StaticResources for those. If I'm right, this also applies to the example/code in WinUI Gallery > Design Guidance > Typography.

niels9001 commented 10 months ago

@niels9001 I was just looking at https://learn.microsoft.com/windows/uwp/xaml-platform/themeresource-markup-extension#when-and-how-to-use-themeresource-rather-than-staticresource and it looks like we should be using ThemeResource in a lot more places. It should be used for brushes, font properties and text styles (amongst others) and we often use a StaticResources for those. If I'm right, this also applies to the example/code in WinUI Gallery > Design Guidance > Typography.

There's little to no additional benefit, so I wouldn't waste any time on that. StaticResources are fine for resources that do not change or are not defined in ThemeDictionaries. Brushes do get updated on theme changes, so for those we'd want to use ThemeResources.

Jay-o-Way commented 3 months ago

WASDK 1.6 will have https://learn.microsoft.com/windows/apps/windows-app-sdk/experimental-channel#new-titlebar-control πŸ₯³

Think we should wait for the Stable relase?

niels9001 commented 3 months ago

WASDK 1.6 will have https://learn.microsoft.com/windows/apps/windows-app-sdk/experimental-channel#new-titlebar-control πŸ₯³

Check the Build session for more info: https://youtu.be/WR4T24lLoVo?si=_lxZw-OQ14U7MPgJ&t=827! We've worked with the WinUI team to port the Community Toolkit titlebar to the platform, so that should make adoption much simpler!