Skip to content

Commit a316bee

Browse files
authWebview: Various fixes (#3616)
* webviewUi: Shrink content window + fix colors for light theme This shrinks the right side content window with the image to something smaller so that it will fit more easily in the screen. Also some text colors are fixed to show properly in a light theme. Signed-off-by: Nikolas Komonen <[email protected]> * ui: Adjust UI so content window is at top of page Before we had the content window (with image + auth form) under the title section so it was adjacent to the service/feature tab/buttons. But we want to fit everything on one screen and it required scrolling down a bit. Solution: Move the content window to the top of the whole screen and now it all fits in one screen Signed-off-by: Nikolas Komonen <[email protected]> * builderId: customize sign up url for CW CW wants the builder id sign up url to redirect to a specific link instead of the standard one. Solution: Each auth type for builder id will provide its own sign up url. Signed-off-by: Nikolas Komonen <[email protected]> * greenBar: Move to top of the page This moves the green status bar to the very top of the page instead of under the title Signed-off-by: Nikolas Komonen <[email protected]> * webview: dont have default feature selected Previously we had the resource explorer feature selected on open. Now we will instead select nothing. Signed-off-by: Nikolas Komonen <[email protected]> * identityCenter: Default to us-east-1 region This has all identity center forms default to us-east-1 and additionally fixes the UX of where the user can click to select a region so that the pointer cursor appears and they can click on the text itself instead of only the pencil. Signed-off-by: Nikolas Komonen <[email protected]> * formError: Increase error font size Signed-off-by: Nikolas Komonen <[email protected]> --------- Signed-off-by: Nikolas Komonen <[email protected]>
1 parent 7603181 commit a316bee

11 files changed

+179
-137
lines changed

src/auth/ui/vue/authForms/manageBuilderId.vue

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55

66
<div v-if="stage === 'START'">
77
<div class="form-section">
8-
<div>
8+
<div style="color: #cccccc">
99
With AWS Builder ID, sign in for free without an AWS account.
10-
<a href="https://docs.aws.amazon.com/signin/latest/userguide/sign-in-aws_builder_id.html"
11-
>Read more.</a
12-
>
10+
<a :href="signUpUrl">Read more.</a>
1311
</div>
1412
</div>
1513

@@ -68,9 +66,11 @@ export default defineComponent({
6866
builderIdCode: '',
6967
name: this.state.name,
7068
error: '' as string,
69+
signUpUrl: '' as string,
7170
}
7271
},
7372
async created() {
73+
this.signUpUrl = this.getSignUpUrl()
7474
await this.update('created')
7575
},
7676
methods: {
@@ -95,6 +95,9 @@ export default defineComponent({
9595
showNodeInView() {
9696
this.state.showNodeInView()
9797
},
98+
getSignUpUrl() {
99+
return this.state.getSignUpUrl()
100+
},
98101
},
99102
})
100103
@@ -124,6 +127,10 @@ abstract class BaseBuilderIdState implements AuthStatus {
124127
async signout(): Promise<void> {
125128
await client.signoutBuilderId()
126129
}
130+
131+
getSignUpUrl(): string {
132+
return 'https://docs.aws.amazon.com/signin/latest/userguide/sign-in-aws_builder_id.html'
133+
}
127134
}
128135
129136
export class CodeWhispererBuilderIdState extends BaseBuilderIdState {
@@ -146,6 +153,10 @@ export class CodeWhispererBuilderIdState extends BaseBuilderIdState {
146153
override showNodeInView(): Promise<void> {
147154
return client.showCodeWhispererNode()
148155
}
156+
157+
override getSignUpUrl(): string {
158+
return 'https://docs.aws.amazon.com/codewhisperer/latest/userguide/whisper-setup-indv-devs.html'
159+
}
149160
}
150161
151162
export class CodeCatalystBuilderIdState extends BaseBuilderIdState {

src/auth/ui/vue/authForms/manageCredentials.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<label class="small-description"
1818
>Credentials will be added to the appropriate `~/.aws/` files.</label
1919
>
20-
<div v-on:click="editCredentialsFile()" style="cursor: pointer">
20+
<div v-on:click="editCredentialsFile()" style="cursor: pointer; color: #cccccc">
2121
<div class="icon icon-vscode-edit edit-icon"></div>
2222
Edit file directly
2323
</div>

src/auth/ui/vue/authForms/manageIdentityCenter.vue

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
href="https://docs.aws.amazon.com/toolkit-for-vscode/latest/userguide/sso-credentials.html"
88
></a
99
></FormTitle>
10-
<div v-if="!isConnected">Successor to AWS Single Sign-on</div>
10+
<div v-if="!isConnected" style="color: #cccccc">Successor to AWS Single Sign-on</div>
1111
</div>
1212
<div v-else>
1313
<!-- In this scenario we do not care about the active IC connection -->
@@ -17,7 +17,7 @@
1717
href="https://docs.aws.amazon.com/toolkit-for-vscode/latest/userguide/sso-credentials.html"
1818
></a
1919
></FormTitle>
20-
<div>Successor to AWS Single Sign-on</div>
20+
<div style="color: #cccccc">Successor to AWS Single Sign-on</div>
2121
</div>
2222

2323
<div v-if="stage === 'START'">
@@ -32,9 +32,9 @@
3232
<label class="input-title">Region</label>
3333
<label class="small-description">AWS Region that hosts Identity directory</label>
3434

35-
<div style="display: flex; flex-direction: row; gap: 10px">
36-
<div v-on:click="getRegion()" class="icon icon-lg icon-vscode-edit edit-icon"></div>
37-
<div style="width: 100%">{{ data.region ? data.region : 'Not Selected' }}</div>
35+
<div v-on:click="getRegion()" style="display: flex; flex-direction: row; gap: 10px; cursor: pointer">
36+
<div class="icon icon-lg icon-vscode-edit edit-icon"></div>
37+
<div style="width: 100%; color: #cccccc">{{ data.region ? data.region : 'Not Selected' }}</div>
3838
</div>
3939
</div>
4040

@@ -187,10 +187,7 @@ abstract class BaseIdentityCenterState implements AuthStatus {
187187
protected _stage: IdentityCenterStage = 'START'
188188
189189
constructor() {
190-
this._data = {
191-
startUrl: '',
192-
region: '',
193-
}
190+
this._data = BaseIdentityCenterState.initialData()
194191
}
195192
196193
abstract get id(): AuthFormId
@@ -220,10 +217,7 @@ abstract class BaseIdentityCenterState implements AuthStatus {
220217
// Successful submission, so we can clear
221218
// old data.
222219
if (!error) {
223-
this._data = {
224-
startUrl: '',
225-
region: '',
226-
}
220+
this._data = BaseIdentityCenterState.initialData()
227221
}
228222
return error
229223
}
@@ -252,6 +246,13 @@ abstract class BaseIdentityCenterState implements AuthStatus {
252246
protected async getSubmittableDataOrThrow(): Promise<IdentityCenterData> {
253247
return this._data as IdentityCenterData
254248
}
249+
250+
private static initialData(): IdentityCenterData {
251+
return {
252+
startUrl: '',
253+
region: 'us-east-1',
254+
}
255+
}
255256
}
256257
257258
export class CodeWhispererIdentityCenterState extends BaseIdentityCenterState {

src/auth/ui/vue/authForms/sharedAuthForms.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
display: flex;
33
flex-direction: column;
44
text-align: left;
5+
color: #ffffff;
56

67
padding: 10px;
78
}
@@ -19,6 +20,11 @@
1920
margin-top: 3px;
2021
}
2122

23+
/* Consistent margins between the elements of a grouping of elements */
24+
.auth-form .form-section > button {
25+
margin-top: 3px;
26+
}
27+
2228
.auth-form-title {
2329
font-size: 14px;
2430
font-weight: bold;
@@ -41,6 +47,7 @@
4147

4248
.error-text {
4349
color: #f14c4c;
50+
font-size: 12px;
4451
}
4552

4653
input[data-invalid='true'] {

0 commit comments

Comments
 (0)