Skip to content

Commit 18f9dbb

Browse files
Kartik Rajkarthiknadig
Kartik Raj
authored andcommitted
Hide UI elements that are not applicable when using github.dev (#17698)
* Hide UI elements that are not applicable when using VS Code Web * Fix indentaiton * News entry * Disable welcome view for testing
1 parent ab0a72a commit 18f9dbb

File tree

2 files changed

+193
-19
lines changed

2 files changed

+193
-19
lines changed

news/2 Fixes/17252.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hide UI elements that are not applicable when using `github.dev` or any other web platform.

package.json

+192-19
Original file line numberDiff line numberDiff line change
@@ -1708,117 +1708,290 @@
17081708
],
17091709
"menus": {
17101710
"commandPalette": [
1711+
{
1712+
"category": "Python",
1713+
"command": "python.analysis.clearCache",
1714+
"title": "%python.command.python.analysis.clearCache.title%",
1715+
"when": "!virtualWorkspace"
1716+
},
1717+
{
1718+
"category": "Python",
1719+
"command": "python.analysis.restartLanguageServer",
1720+
"title": "%python.command.python.analysis.restartLanguageServer.title%",
1721+
"when": "!virtualWorkspace"
1722+
},
1723+
{
1724+
"category": "Python",
1725+
"command": "python.clearPersistentStorage",
1726+
"title": "%python.command.python.clearPersistentStorage.title%",
1727+
"when": "!virtualWorkspace"
1728+
},
17111729
{
17121730
"category": "Python",
17131731
"command": "python.clearWorkspaceInterpreter",
1714-
"title": "%python.command.python.clearWorkspaceInterpreter.title%"
1732+
"title": "%python.command.python.clearWorkspaceInterpreter.title%",
1733+
"when": "!virtualWorkspace"
1734+
},
1735+
{
1736+
"category": "Python",
1737+
"command": "python.configureTests",
1738+
"title": "%python.command.python.configureTests.title%",
1739+
"when": "!virtualWorkspace"
1740+
},
1741+
{
1742+
"category": "Python",
1743+
"command": "python.createTerminal",
1744+
"title": "%python.command.python.createTerminal.title%",
1745+
"when": "!virtualWorkspace"
1746+
},
1747+
{
1748+
"category": "Python",
1749+
"command": "python.enableLinting",
1750+
"title": "%python.command.python.enableLinting.title%",
1751+
"when": "!virtualWorkspace"
1752+
},
1753+
{
1754+
"category": "Python",
1755+
"command": "python.enableSourceMapSupport",
1756+
"title": "%python.command.python.enableSourceMapSupport.title%",
1757+
"when": "!virtualWorkspace"
1758+
},
1759+
{
1760+
"category": "Python",
1761+
"command": "python.execInTerminal",
1762+
"title": "%python.command.python.execInTerminal.title%",
1763+
"when": "!virtualWorkspace"
1764+
},
1765+
{
1766+
"category": "Python",
1767+
"command": "python.execInTerminal-icon",
1768+
"icon": "$(play)",
1769+
"title": "%python.command.python.execInTerminal.title%",
1770+
"when": "!virtualWorkspace"
1771+
},
1772+
{
1773+
"category": "Python",
1774+
"command": "python.debugInTerminal",
1775+
"icon": "$(debug-alt)",
1776+
"title": "%python.command.python.debugInTerminal.title%",
1777+
"when": "!virtualWorkspace"
1778+
},
1779+
{
1780+
"category": "Python",
1781+
"command": "python.execSelectionInDjangoShell",
1782+
"title": "%python.command.python.execSelectionInDjangoShell.title%",
1783+
"when": "!virtualWorkspace"
1784+
},
1785+
{
1786+
"category": "Python",
1787+
"command": "python.execSelectionInTerminal",
1788+
"title": "%python.command.python.execSelectionInTerminal.title%",
1789+
"when": "!virtualWorkspace"
1790+
},
1791+
{
1792+
"category": "Python",
1793+
"command": "python.goToPythonObject",
1794+
"title": "%python.command.python.goToPythonObject.title%",
1795+
"when": "!virtualWorkspace"
17151796
},
17161797
{
17171798
"category": "Python",
1718-
"command": "python.launchTensorBoard"
1799+
"command": "python.launchTensorBoard",
1800+
"title": "%python.command.python.launchTensorBoard.title%",
1801+
"when": "!virtualWorkspace"
1802+
},
1803+
{
1804+
"category": "Python",
1805+
"command": "python.refreshTensorBoard",
1806+
"enablement": "python.hasActiveTensorBoardSession",
1807+
"icon": "$(refresh)",
1808+
"title": "%python.command.python.refreshTensorBoard.title%",
1809+
"when": "!virtualWorkspace"
1810+
},
1811+
{
1812+
"category": "Test",
1813+
"command": "python.refreshTests",
1814+
"icon": "$(refresh)",
1815+
"title": "%python.command.python.refreshTests.title%",
1816+
"when": "!virtualWorkspace"
1817+
},
1818+
{
1819+
"category": "Test",
1820+
"command": "python.refreshingTests",
1821+
"icon": {
1822+
"dark": "resources/dark/discovering-tests.svg",
1823+
"light": "resources/light/discovering-tests.svg"
1824+
},
1825+
"title": "%python.command.python.refreshingTests.title%",
1826+
"when": "!virtualWorkspace"
1827+
},
1828+
{
1829+
"category": "Test",
1830+
"command": "python.stopRefreshingTests",
1831+
"icon": "$(stop-circle)",
1832+
"title": "%python.command.python.stopRefreshingTests.title%",
1833+
"when": "!virtualWorkspace"
1834+
},
1835+
{
1836+
"category": "Python",
1837+
"command": "python.reportIssue",
1838+
"title": "%python.command.python.reportIssue.title%",
1839+
"when": "!virtualWorkspace"
1840+
},
1841+
{
1842+
"category": "Test",
1843+
"command": "testing.reRunFailTests",
1844+
"icon": "$(run-errors)",
1845+
"title": "%python.command.testing.rerunFailedTests.title%",
1846+
"when": "!virtualWorkspace"
1847+
},
1848+
{
1849+
"category": "Python",
1850+
"command": "python.runLinting",
1851+
"title": "%python.command.python.runLinting.title%",
1852+
"when": "!virtualWorkspace"
1853+
},
1854+
{
1855+
"category": "Python",
1856+
"command": "python.setInterpreter",
1857+
"title": "%python.command.python.setInterpreter.title%",
1858+
"when": "!virtualWorkspace"
1859+
},
1860+
{
1861+
"category": "Python",
1862+
"command": "python.setLinter",
1863+
"title": "%python.command.python.setLinter.title%",
1864+
"when": "!virtualWorkspace"
1865+
},
1866+
{
1867+
"category": "Python Refactor",
1868+
"command": "python.sortImports",
1869+
"title": "%python.command.python.sortImports.title%",
1870+
"when": "!virtualWorkspace"
1871+
},
1872+
{
1873+
"category": "Python",
1874+
"command": "python.startREPL",
1875+
"title": "%python.command.python.startREPL.title%",
1876+
"when": "!virtualWorkspace"
1877+
},
1878+
{
1879+
"category": "Python",
1880+
"command": "python.viewLanguageServerOutput",
1881+
"enablement": "python.hasLanguageServerOutputChannel",
1882+
"title": "%python.command.python.viewLanguageServerOutput.title%",
1883+
"when": "!virtualWorkspace"
1884+
},
1885+
{
1886+
"category": "Python",
1887+
"command": "python.clearWorkspaceInterpreter",
1888+
"title": "%python.command.python.clearWorkspaceInterpreter.title%",
1889+
"when": "!virtualWorkspace"
17191890
},
17201891
{
17211892
"category": "Python",
17221893
"command": "python.switchOffInsidersChannel",
17231894
"title": "%python.command.python.switchOffInsidersChannel.title%",
1724-
"when": "config.python.insidersChannel != 'default'"
1895+
"when": "config.python.insidersChannel != 'default' && !virtualWorkspace"
17251896
},
17261897
{
17271898
"category": "Python",
17281899
"command": "python.switchToDailyChannel",
17291900
"title": "%python.command.python.switchToDailyChannel.title%",
1730-
"when": "config.python.insidersChannel != 'daily'"
1901+
"when": "config.python.insidersChannel != 'daily' && !virtualWorkspace"
17311902
},
17321903
{
17331904
"category": "Python",
17341905
"command": "python.switchToWeeklyChannel",
17351906
"title": "%python.command.python.switchToWeeklyChannel.title%",
1736-
"when": "config.python.insidersChannel != 'weekly'"
1907+
"when": "config.python.insidersChannel != 'weekly' && !virtualWorkspace"
17371908
},
17381909
{
17391910
"category": "Python",
17401911
"command": "python.viewOutput",
1741-
"title": "%python.command.python.viewOutput.title%"
1912+
"title": "%python.command.python.viewOutput.title%",
1913+
"when": "!virtualWorkspace"
17421914
}
17431915
],
17441916
"editor/context": [
17451917
{
17461918
"command": "python.execInTerminal",
17471919
"group": "Python",
1748-
"when": "resourceLangId == python"
1920+
"when": "resourceLangId == python && !virtualWorkspace"
17491921
},
17501922
{
17511923
"command": "python.execSelectionInDjangoShell",
17521924
"group": "Python",
1753-
"when": "editorHasSelection && editorLangId == python && python.isDjangoProject"
1925+
"when": "editorHasSelection && editorLangId == python && python.isDjangoProject && !virtualWorkspace"
17541926
},
17551927
{
17561928
"command": "python.execSelectionInTerminal",
17571929
"group": "Python",
1758-
"when": "editorFocus && editorLangId == python"
1930+
"when": "editorFocus && editorLangId == python && !virtualWorkspace"
17591931
},
17601932
{
17611933
"command": "python.sortImports",
17621934
"group": "Refactor",
17631935
"title": "Refactor: Sort Imports",
1764-
"when": "editorLangId == python && !notebookEditorFocused"
1936+
"when": "editorLangId == python && !notebookEditorFocused && !virtualWorkspace"
17651937
}
17661938
],
17671939
"editor/title": [
17681940
{
17691941
"command": "python.refreshTensorBoard",
17701942
"group": "navigation@0",
1771-
"when": "python.hasActiveTensorBoardSession"
1943+
"when": "python.hasActiveTensorBoardSession && !virtualWorkspace"
17721944
}
17731945
],
17741946
"editor/title/run": [
17751947
{
17761948
"command": "python.execInTerminal-icon",
17771949
"group": "navigation@0",
17781950
"title": "%python.command.python.execInTerminal.title%",
1779-
"when": "resourceLangId == python && !isInDiffEditor"
1951+
"when": "resourceLangId == python && !isInDiffEditor && !virtualWorkspace"
17801952
},
17811953
{
17821954
"command": "python.debugInTerminal",
17831955
"group": "navigation@1",
17841956
"title": "%python.command.python.debugInTerminal.title%",
1785-
"when": "resourceLangId == python && !isInDiffEditor"
1957+
"when": "resourceLangId == python && !isInDiffEditor && !virtualWorkspace"
17861958
}
17871959
],
17881960
"explorer/context": [
17891961
{
17901962
"command": "python.execInTerminal",
17911963
"group": "Python",
1792-
"when": "resourceLangId == python"
1964+
"when": "resourceLangId == python && !virtualWorkspace"
17931965
}
17941966
],
17951967
"view/title": [
17961968
{
17971969
"command": "python.refreshTests",
1798-
"when": "view == workbench.view.testing && !refreshingTests && inShowRefreshingTestsExperiment",
1970+
"when": "view == workbench.view.testing && !refreshingTests && inShowRefreshingTestsExperiment && !virtualWorkspace",
17991971
"group": "navigation@0"
18001972
},
18011973
{
18021974
"command": "python.refreshingTests",
1803-
"when": "view == workbench.view.testing && refreshingTests && inShowRefreshingTestsExperiment",
1975+
"when": "view == workbench.view.testing && refreshingTests && inShowRefreshingTestsExperiment && !virtualWorkspace",
18041976
"group": "navigation@0"
18051977
},
18061978
{
18071979
"command": "python.stopRefreshingTests",
1808-
"when": "view == workbench.view.testing && refreshingTests && inShowRefreshingTestsExperiment",
1980+
"when": "view == workbench.view.testing && refreshingTests && inShowRefreshingTestsExperiment && !virtualWorkspace",
18091981
"group": "navigation@0"
18101982
},
18111983
{
18121984
"command": "testing.reRunFailTests",
1813-
"when": "view == workbench.view.testing && hasFailedTests && inShowRunFailedTestsExperiment",
1985+
"when": "view == workbench.view.testing && hasFailedTests && inShowRunFailedTestsExperiment && !virtualWorkspace",
18141986
"group": "navigation@1"
18151987
}
18161988
]
18171989
},
18181990
"viewsWelcome": [
18191991
{
18201992
"view": "testing",
1821-
"contents": "Configure a test framework to see your tests here.\n[Configure Python Tests](command:python.configureTests)"
1993+
"contents": "Configure a test framework to see your tests here.\n[Configure Python Tests](command:python.configureTests)",
1994+
"when": "!virtualWorkspace"
18221995
}
18231996
],
18241997
"yamlValidation": [

0 commit comments

Comments
 (0)