Replace the KB Dialog with a InfoBar (#8524)
This changes the keyboard warning from a dialog to an `InfoBar`, which we just got in MUX 2.5. Some users were unhappy that we'd always display the dialog. We learned from the input team that this service _should_ always be enabled. We're also learing from users that they don't always want it enabled. We're working with the Input team to help us figure out how this service can be disabled _and the Terminal work just fine_. They're confident that it _shouldn't_. For 99% of our users, they're right. So we don't want to get rid of the dialog entirely, we want to understand how this is possible. While we wait, let's make the message less aggressive. This is instead of making a `iKnowWhatImDoingDisableTheKeyboardWarning` setting to disable the dialog. Props to @cornem for suggesting the less aggressive solution. ## Validation Steps Performed Tested manually, but by forcing the message to always display. Disabling the service requires two full reboots, and _ain't nobody got time for that_. Closes #8228 Closes #4448, for now
This commit is contained in:
parent
1965fb5e73
commit
ff5b2b84d2
|
@ -2957,9 +2957,9 @@ namespace winrt::TerminalApp::implementation
|
|||
// Service" is disabled.
|
||||
void TerminalPage::ShowKeyboardServiceWarning()
|
||||
{
|
||||
if (auto presenter{ _dialogPresenter.get() })
|
||||
if (auto keyboardWarningInfoBar = FindName(L"KeyboardWarningInfoBar").try_as<MUX::Controls::InfoBar>())
|
||||
{
|
||||
presenter.ShowDialog(FindName(L"KeyboardServiceDisabledDialog").try_as<WUX::Controls::ContentDialog>());
|
||||
keyboardWarningInfoBar.IsOpen(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3008,9 +3008,9 @@ namespace winrt::TerminalApp::implementation
|
|||
|
||||
// Method Description:
|
||||
// - Return the fully-formed warning message for the
|
||||
// "KeyboardServiceDisabled" dialog. This dialog is used to warn the user
|
||||
// "KeyboardServiceDisabled" InfoBar. This InfoBar is used to warn the user
|
||||
// if the keyboard service is disabled, and uses the OS localization for
|
||||
// the service's actual name. It's bound to the dialog in XAML.
|
||||
// the service's actual name. It's bound to the bar in XAML.
|
||||
// Return Value:
|
||||
// - The warning message, including the OS-localized service name.
|
||||
winrt::hstring TerminalPage::KeyboardServiceDisabledText()
|
||||
|
|
|
@ -91,24 +91,18 @@ the MIT License. See LICENSE in the project root for license information. -->
|
|||
</TextBlock>
|
||||
</ContentDialog>
|
||||
|
||||
|
||||
<ContentDialog
|
||||
x:Load="False"
|
||||
x:Name="KeyboardServiceDisabledDialog"
|
||||
x:Uid="KeyboardServiceDisabledDialog"
|
||||
DefaultButton="Primary">
|
||||
|
||||
<TextBlock
|
||||
Foreground="{ThemeResource ErrorTextBrush}"
|
||||
IsTextSelectionEnabled="True"
|
||||
TextWrapping="WrapWholeWords"
|
||||
Text="{x:Bind KeyboardServiceDisabledText, Mode=OneWay}" />
|
||||
</ContentDialog>
|
||||
|
||||
<local:CommandPalette
|
||||
x:Name="CommandPalette"
|
||||
Grid.Row="1"
|
||||
Visibility="Collapsed"
|
||||
VerticalAlignment="Stretch" />
|
||||
|
||||
<mux:InfoBar x:Name="KeyboardWarningInfoBar"
|
||||
x:Load="False"
|
||||
IsClosable="True"
|
||||
IsIconVisible="True"
|
||||
IsOpen="False"
|
||||
Severity="Warning"
|
||||
Message="{x:Bind KeyboardServiceDisabledText, Mode=OneWay}"/>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
|
Loading…
Reference in a new issue