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

update trusted icons and make trusted icon appear on the editor title #4430

Merged
merged 7 commits into from
Jan 21, 2021

Conversation

DavidKutu
Copy link

@DavidKutu DavidKutu commented Jan 20, 2021

For #4338, #4339

Here's what the new trusted icon looks like (tooltip says 'Trusted' and clicking does nothing):
image

And here's the new untrusted icon (brings up the trust notification):
image

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • Title summarizes what is changing.
  • Has a news entry file (remember to thank yourself!).
  • Appropriate comments and documentation strings in the code.
  • Has sufficient logging.
  • Has telemetry for enhancements.
  • Unit tests & system/integration tests are added/updated.
  • Test plan is updated as appropriate.
  • package-lock.json has been regenerated by running npm install (if dependencies have changed).

make trusted icon appear on the editor title
@DavidKutu DavidKutu requested a review from a team as a code owner January 20, 2021 19:15
@codecov-io
Copy link

codecov-io commented Jan 20, 2021

Codecov Report

Merging #4430 (cec2abc) into main (91ebb08) will increase coverage by 0%.
The diff coverage is 60%.

@@          Coverage Diff          @@
##            main   #4430   +/-   ##
=====================================
  Coverage     75%     75%           
=====================================
  Files        396     396           
  Lines      25861   25862    +1     
  Branches    3710    3707    -3     
=====================================
+ Hits       19521   19577   +56     
+ Misses      4813    4771   -42     
+ Partials    1527    1514   -13     
Impacted Files Coverage Δ
...tascience/interactive-ipynb/trustCommandHandler.ts 77% <33%> (-1%) ⬇️
src/client/common/utils/localize.ts 96% <100%> (+<1%) ⬆️
src/client/datascience/constants.ts 99% <100%> (+<1%) ⬆️
src/client/common/application/debugService.ts 46% <0%> (-7%) ⬇️
...datascience/editor-integration/codelensprovider.ts 84% <0%> (-3%) ⬇️
src/client/common/process/pythonDaemonPool.ts 78% <0%> (-2%) ⬇️
src/client/logging/_global.ts 80% <0%> (-2%) ⬇️
.../client/datascience/notebook/kernelWithMetadata.ts 87% <0%> (-2%) ⬇️
...lient/datascience/jupyter/kernels/cellExecution.ts 75% <0%> (-2%) ⬇️
.../datascience/editor-integration/codeLensFactory.ts 85% <0%> (-2%) ⬇️
... and 30 more

Copy link
Member

@IanMatthewHuff IanMatthewHuff left a comment

Choose a reason for hiding this comment

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

Code is fine just wanted to discuss quick that I think this is going to be an accessibility violation. This command is going to show up as a clickable button to a screen reader. And it's going to have no effect when run. Are we ok with that?

@DavidKutu
Copy link
Author

DavidKutu commented Jan 20, 2021

Claudia's ruling: have the notification pop on saying its already trusted.
"This notebook is already trusted."

And the not trusted icon should be red

the notebook is already trusted
change untrusted icon to red
remove command from the command palette
Copy link
Contributor

@DonJayamanne DonJayamanne left a comment

Choose a reason for hiding this comment

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

Would like to get @claudiaregio input on this.
I do'nt thinnk the button should be clickable to display messages that do absolutely nothing.

@@ -41,6 +41,13 @@ export class TrustCommandHandler implements IExtensionSingleActivationService {
const context = new ContextKey('jupyter.trustfeatureenabled', this.commandManager);
context.set(true).ignoreErrors();
this.disposables.push(this.commandManager.registerCommand(Commands.TrustNotebook, this.onTrustNotebook, this));
this.disposables.push(
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should get this reviewed by a PM.
Generally I ton'd think its a good idea to display such messages. One could argue if the title indicates its trusted, then wy allow clickcing the button just to always (100% of time) display a message.
If the message is required, then i'd argue the meaning of the icon is not obvious to users.

@claudiaregio /cc

Copy link
Member

Choose a reason for hiding this comment

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

@DonJayamanne David talked to Claudia per his comment above.

Copy link
Author

Choose a reason for hiding this comment

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

Claudia's ruling: have the notification pop on saying its already trusted.
"This notebook is already trusted."

Copy link
Contributor

Choose a reason for hiding this comment

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

Claudia just pinged me & stated that we need an icon that cannot be clicked.
I.e. just disable it and display tooltip.

She was under the impression we cannot disable it

Copy link
Contributor

@DonJayamanne DonJayamanne left a comment

Choose a reason for hiding this comment

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

Claudia just pinged me & stated that we need an icon that cannot be clicked.
I.e. just disable it and display tooltip.

She was under the impression we cannot disable it

@DavidKutu DavidKutu merged commit 8e007f4 into main Jan 21, 2021
@DavidKutu DavidKutu deleted the david/trustedIcons branch January 21, 2021 00:31
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.

5 participants