Display commands when necessary#9986
Conversation
|
Kudos, SonarCloud Quality Gate passed!
|
| // can safely attempt to give ourselves focus. This won't actually give us focus if we aren't | ||
| // allowed to have it. | ||
| if (active && !this.viewState.active) { | ||
| if (args.current.active && !args.previous.active) { |
There was a problem hiding this comment.
Changed this so that the state is update immediately.
The fact that something is active and it isn't reflected in its own state results in a bug in other parts of the code.
Modified to ensure we pass previous state for places that require it (this was the only place)
| export const IsNativeActive = 'python.datascience.isnativeactive'; | ||
| export const IsInteractiveOrNativeActive = 'python.datascience.isinteractiveornativeactive'; | ||
| export const IsPythonOrNativeActive = 'python.datascience.ispythonornativeactive'; | ||
| export const IsPythonOrInteractiveActive = 'python.datascience.ispythonorinteractiveeactive'; |
There was a problem hiding this comment.
Added some or commands as its not possible to have or conditions in the commands.
Codecov Report
@@ Coverage Diff @@
## master #9986 +/- ##
==========================================
- Coverage 61.2% 61.16% -0.04%
==========================================
Files 564 564
Lines 30083 30109 +26
Branches 4550 4555 +5
==========================================
+ Hits 18411 18416 +5
- Misses 10642 10663 +21
Partials 1030 1030
Continue to review full report at Codecov.
|
| super.onViewStateChanged(args); | ||
|
|
||
| // Update our contexts | ||
| const interactiveContext = new ContextKey(EditorContexts.HaveNative, this.commandManager); |
There was a problem hiding this comment.
interactiveContext [](start = 14, length = 18)
should probably rename this. It's not the 'interactiveContext', but the 'nativeContext'
There was a problem hiding this comment.
Because CI sucks big time, I'll do it in the next PR.
There was a problem hiding this comment.
Fixed in another PR that I'll be submitting shortly
For #8869