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

Control 'Touch Keyboard and Handwriting Panel Service' warning #9015

Merged
merged 4 commits into from Feb 22, 2021

Conversation

WVVxm
Copy link
Contributor

@WVVxm WVVxm commented Feb 3, 2021

Summary of the Pull Request

Add a setting to turn off the warning if 'Touch Keyboard and Handwriting Panel Service' is disabled.

References

#8095
#7886 (comment)

PR Checklist

  • Closes #xxx
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Documentation updated. If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated.
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

The service might not start in some case, and it doesn't affect the input in some computer.
This PR turn off the warning even if the service is disabled.
The setting name is "inputServiceWarning".

part of settings.json:

// If enabled, selections are automatically copied to your clipboard.
"copyOnSelect": false,

// If disabled, don't show warning if 'Touch Keyboard and Handwriting Panel Service' disabled.
"inputServiceWarning": false,

Validation Steps Performed

I manually set the service to "Disabled", restarted the Terminal, verified the warning up, then set "inputServiceWarning" to false and restarted the Terminal, and the warning didn't appear.

…rd and Handwriting Panel Service' is disabled.
@DHowett
Copy link
Member

DHowett commented Feb 5, 2021

Hey, thanks for writing this up! I'm not as averse to this setting as I was in the linked issues, but we'll need a little bit to review this. It's a busy week for the team -- since 1.6 just came out, we have a bit of a backlog. Thanks for understanding!

Copy link
Contributor

@Don-Vito Don-Vito left a comment

Choose a reason for hiding this comment

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

I am neither an expert nor from the team, but besides few nits below the change looks good to me.

Probably the next missing pieces are

  1. Adding this to Settings UI
  2. Modifying the documentation.

However before you do it, probably it worth understanding from the team what are their plans around this feature and #8771 that introduces application state. Once that PR lands, we can introduce a UX that will allow the user to "silence" this warning forever, without editing the settings (e.g., by adding "never show this warning again" to the bar).

@@ -629,6 +629,11 @@
"description": "When set to true, tabs are always displayed. When set to false and \"showTabsInTitlebar\" is set to false, tabs only appear after opening a new tab.",
"type": "boolean"
},
"inputServiceWarning": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: consider renaming into "showInputServiceWarning" (here and in other places)

Copy link
Member

Choose a reason for hiding this comment

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

I'm gonna say that this one is probably okay as is. The other warnings are largePasteWarning and multiLinePasteWarning, so this is actually consistent.

@@ -487,11 +487,15 @@ namespace winrt::TerminalApp::implementation
void AppLogic::_OnLoaded(const IInspectable& /*sender*/,
const RoutedEventArgs& /*eventArgs*/)
{
const auto keyboardServiceIsDisabled = !_IsKeyboardServiceEnabled();
if (keyboardServiceIsDisabled)
if (_settings.GlobalSettings().InputServiceWarning())
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: consider unifying into a single if statement with &&

@@ -16,6 +16,9 @@
// If enabled, selections are automatically copied to your clipboard.
"copyOnSelect": false,

// If disabled, don't show warning if 'Touch Keyboard and Handwriting Panel Service' disabled.
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if we want to add it here.

Copy link
Member

Choose a reason for hiding this comment

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

I concur, we should remove these lines from this file. This file is intentionally fairly bare.

Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

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

Alright so I'm blocking over removing the lines from IControlSettings and from userDefaults.json, but otherwise this looks fine to me. The other warnings aren't expressed in the settings UI quite yet, so I wouldn't worry about this one either.

@@ -629,6 +629,11 @@
"description": "When set to true, tabs are always displayed. When set to false and \"showTabsInTitlebar\" is set to false, tabs only appear after opening a new tab.",
"type": "boolean"
},
"inputServiceWarning": {
Copy link
Member

Choose a reason for hiding this comment

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

I'm gonna say that this one is probably okay as is. The other warnings are largePasteWarning and multiLinePasteWarning, so this is actually consistent.

@@ -39,6 +39,7 @@ namespace Microsoft.Terminal.TerminalControl
Microsoft.Terminal.TerminalControl.IKeyBindings KeyBindings;

Boolean CopyOnSelect;
Boolean InputServiceWarning;
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't actually need to be here. We don't need this setting down in the control layer, so we can omit it here.

@@ -16,6 +16,9 @@
// If enabled, selections are automatically copied to your clipboard.
"copyOnSelect": false,

// If disabled, don't show warning if 'Touch Keyboard and Handwriting Panel Service' disabled.
Copy link
Member

Choose a reason for hiding this comment

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

I concur, we should remove these lines from this file. This file is intentionally fairly bare.

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Feb 8, 2021
@ghost ghost added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Feb 16, 2021
@ghost
Copy link

ghost commented Feb 16, 2021

This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

@ghost ghost removed the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Feb 16, 2021
@ghost ghost removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Feb 22, 2021
@DHowett DHowett merged commit 8ad4d1f into microsoft:main Feb 22, 2021
@DHowett
Copy link
Member

DHowett commented Feb 22, 2021

Thank you for your contribution!

@ghost
Copy link

ghost commented Mar 1, 2021

🎉Windows Terminal Preview v1.7.572.0 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants