Skip to content

Commit 01351dd

Browse files
hayemaxijustinmk3
andauthored
revert: cloud9 related code (aws#6376)
This code removes nearly all cloud9 codepaths: - Icons, readme generation, scripts - ikp3db lambda/sam debugger support - Cloud9 only codepaths and hacks - Docs and comments mentioning Cloud9 Includes some follow up items as TODOs in code. Some items were left in case they are helpful in the future (e.g. for vscode web or similar). The items should be renamed from Cloud9 if used again in the future. Some examples are Cloud9 runtime environment checks (for lambda/sam), `isCloud9()` and properties/text for Cloud9 IDE, some SAM artifacts, don't start LSP server, etc. Search cloud9 in vscode after merging this change. --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Justin M. Keyes <[email protected]>
1 parent efeba57 commit 01351dd

File tree

90 files changed

+265
-1895
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+265
-1895
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ packages/amazonq/package.nls.json
4747
packages/amazonq/resources
4848

4949
# Icons
50-
packages/*/resources/icons/cloud9/generated/**
5150
packages/*/resources/fonts/aws-toolkit-icons.woff
5251
packages/*/resources/css/icons.css
5352

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ If you are contribuing visual assets from other open source repos, the source re
633633
## Using new vscode APIs
634634

635635
The minimum required vscode version specified in [package.json](https://github.com/aws/aws-toolkit-vscode/blob/07119655109bb06105a3f53bbcd86b812b32cdbe/package.json#L16)
636-
is decided by the version of vscode running in Cloud9 and other vscode-compatible targets.
636+
is decided by the version of vscode running in other supported vscode-compatible targets (e.g. web).
637637

638638
But you can still use the latest vscode APIs, by checking the current running vscode version. For example, to use a vscode 1.64 API:
639639

cloud9-toolkit-install.sh

-139
This file was deleted.

docs/CODE_GUIDELINES.md

+4-7
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,10 @@ that is a net cost.
8181
- Telemetry: "active" vs "passive"
8282
- Active (`passive:false`) metrics are those intended to appear in DAU count.
8383
- Icons:
84-
- Where possible, use IDE-specific standard icons (e.g. standard VSCode
85-
standard icons in VSCode, and Cloud9 standard icons in Cloud9). The typical
86-
(maintainable) way to do this is to use _named_ icons (what VSCode calls
84+
- Where possible, use standard VSCode icons. The typical (maintainable)
85+
way to do this is to use _named_ icons (what VSCode calls
8786
[codicons](https://microsoft.github.io/vscode-codicons/)) as opposed to
8887
icons shipped with the Toolkit build and referenced by _path_.
89-
- For cases where icons must be statically defined (package.json), if Cloud9
90-
does not support the VSCode standard icon, use the Cloud9 icon.
9188
- Changelog guidelines
9289
- Prefer active voice: "You can do X" instead of "X can be done"
9390
- Avoid unnecessary use of `lodash` (which we may remove in the future).
@@ -240,11 +237,11 @@ _See also [arch_develop.md](./arch_develop.md#exceptions)._
240237
241238
- PREFER:
242239
```ts
243-
things.filter(o => o.isFoo)
240+
things.filter((o) => o.isFoo)
244241
```
245242
- INSTEAD OF:
246243
```ts
247-
things.filter(thing => thing.isFoo)
244+
things.filter((thing) => thing.isFoo)
248245
```
249246
250247
## User settings

docs/arch_runtime.md

-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ If you must define a new key (is it _really_ necessary?), follow these guideline
3131
These keys are currently set by the core/ package, but many of them may eventually be migrated to
3232
toolkit/ or amazonq/ if appropriate.
3333

34-
- `isCloud9`: This is hardcoded by Cloud9 itself, not the Toolkit.
35-
- Cloud9 _does not support setContext_. So this is the only usable key there.
3634
- `aws.codecatalyst.connected`: CodeCatalyst connection is active.
3735
- `aws.codewhisperer.connected`: CodeWhisperer connection is active.
3836
- `aws.codewhisperer.connectionExpired`: CodeWhisperer connection is active, but the connection is expired.

docs/icons.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ All icons that are used in the extensions can be found in `resources/icons`.
44

55
A [build script](../scripts/generateIcons.ts) generates extension artifacts in [core/](../packages/core/):
66

7-
- `resources/icons/cloud9/generated`
87
- `resources/fonts/aws-toolkit-icons.woff`
98
- `resources/css/icons.css`
109
- `contributes.icons` in [amazonq package.json](../packages/amazonq/package.json) and [toolkit package.json](../packages/toolkit/package.json)
@@ -31,7 +30,7 @@ If your desired icon does not work well as a font, see [Theme Overrides](#theme-
3130

3231
## Identifiers
3332

34-
Icons (except those in `cloud9`) can be referenced within the Toolkit by concatenating the icon path with hyphens, omitting the 'theme' if applicable.
33+
Icons can be referenced within the Toolkit by concatenating the icon path with hyphens, omitting the 'theme' if applicable.
3534

3635
Examples:
3736

@@ -50,11 +49,6 @@ For example, if I wanted to use a special App Runner service icon, then I need t
5049
- `resources/icons/aws/dark/apprunner-service.svg`
5150
- `resources/icons/aws/light/apprunner-service.svg`
5251

53-
A similar format is used for overriding icons only on Cloud9:
54-
55-
- `resources/icons/cloud9/dark/aws-apprunner-service.svg`
56-
- `resources/icons/cloud9/light/aws-apprunner-service.svg`
57-
5852
These icons will **not** be usuable as Codicons or as font icons.
5953

6054
## Third Party

packages/core/resources/css/base-cloud9.css

-68
This file was deleted.

packages/core/resources/icons/cloud9/dark/vscode-help.svg

-12
This file was deleted.

packages/core/resources/icons/cloud9/light/vscode-help.svg

-12
This file was deleted.

packages/core/src/auth/credentials/utils.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import * as vscode from 'vscode'
1010
import { Credentials } from '@aws-sdk/types'
1111
import { authHelpUrl } from '../../shared/constants'
1212
import globals from '../../shared/extensionGlobals'
13-
import { isCloud9 } from '../../shared/extensionUtilities'
1413
import { messages, showMessageWithCancel, showViewLogsMessage } from '../../shared/utilities/messages'
1514
import { Timeout, waitTimeout } from '../../shared/utilities/timeoutUtils'
1615
import { fromExtensionManifest } from '../../shared/settings'
@@ -37,8 +36,8 @@ export function asEnvironmentVariables(credentials: Credentials): NodeJS.Process
3736
export function showLoginFailedMessage(credentialsId: string, errMsg: string): void {
3837
const getHelp = localize('AWS.generic.message.getHelp', 'Get Help...')
3938
const editCreds = messages.editCredentials(false)
40-
// TODO: getHelp page for Cloud9.
41-
const buttons = isCloud9() ? [editCreds] : [editCreds, getHelp]
39+
// TODO: Any work towards web/another cloud9 -esqe IDE may need different getHelp docs:
40+
const buttons = [editCreds, getHelp]
4241

4342
void showViewLogsMessage(
4443
localize('AWS.message.credentials.invalid', 'Credentials "{0}" failed to connect: {1}', credentialsId, errMsg),

packages/core/src/auth/sso/model.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import { CancellationError } from '../../shared/utilities/timeoutUtils'
1515
import { ssoAuthHelpUrl } from '../../shared/constants'
1616
import { openUrl } from '../../shared/utilities/vsCodeUtils'
1717
import { ToolkitError } from '../../shared/errors'
18-
import { isCloud9 } from '../../shared/extensionUtilities'
1918
import { builderIdStartUrl } from './constants'
2019

2120
export interface SsoToken {
@@ -116,10 +115,7 @@ export async function openSsoPortalLink(startUrl: string, authorization: Authori
116115

117116
async function showLoginNotification() {
118117
const name = startUrl === builderIdStartUrl ? localizedText.builderId() : localizedText.iamIdentityCenterFull()
119-
// C9 doesn't support `detail` field with modals so we need to put it all in the `title`
120-
const title = isCloud9()
121-
? `Confirm Code "${authorization.userCode}" for ${name} in the browser.`
122-
: localize('AWS.auth.loginWithBrowser.messageTitle', 'Confirm Code for {0}', name)
118+
const title = localize('AWS.auth.loginWithBrowser.messageTitle', 'Confirm Code for {0}', name)
123119
const detail = localize(
124120
'AWS.auth.loginWithBrowser.messageDetail',
125121
'Confirm this code in the browser: {0}',

packages/core/src/auth/utils.ts

+3-11
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { TreeNode } from '../shared/treeview/resourceTreeDataProvider'
2020
import { createInputBox } from '../shared/ui/inputPrompter'
2121
import { CredentialSourceId, telemetry } from '../shared/telemetry/telemetry'
2222
import { createCommonButtons, createExitButton, createHelpButton, createRefreshButton } from '../shared/ui/buttons'
23-
import { getIdeProperties, isAmazonQ, isCloud9 } from '../shared/extensionUtilities'
23+
import { getIdeProperties, isAmazonQ } from '../shared/extensionUtilities'
2424
import { addScopes, getDependentAuths } from './secondaryAuth'
2525
import { DevSettings } from '../shared/settings'
2626
import { createRegionPrompter } from '../shared/ui/common/region'
@@ -562,9 +562,9 @@ export class AuthNode implements TreeNode<Auth> {
562562
if (conn !== undefined && conn.state !== 'valid') {
563563
item.iconPath = getIcon('vscode-error')
564564
if (conn.state === 'authenticating') {
565-
this.setDescription(item, 'authenticating...')
565+
item.description = 'authenticating...'
566566
} else {
567-
this.setDescription(item, 'expired or invalid, click to authenticate')
567+
item.description = 'expired or invalid, click to authenticate'
568568
item.command = {
569569
title: 'Reauthenticate',
570570
command: '_aws.toolkit.auth.reauthenticate',
@@ -578,14 +578,6 @@ export class AuthNode implements TreeNode<Auth> {
578578

579579
return item
580580
}
581-
582-
private setDescription(item: vscode.TreeItem, text: string) {
583-
if (isCloud9()) {
584-
item.tooltip = item.tooltip ?? text
585-
} else {
586-
item.description = text
587-
}
588-
}
589581
}
590582

591583
export async function hasIamCredentials(

0 commit comments

Comments
 (0)