Skip to content

Commit c362f13

Browse files
authored
feat(login): add help link #4940
Problem Add Help link in Login Page. Solution - Introducing BEM naming convention for classes/CSS - https://getbem.com/. - Use ? for icon. - Record Telemetry data when a user clicks the help link.
1 parent 239fb5d commit c362f13

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

packages/core/src/login/webview/vue/login.vue

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,18 @@
151151
</svg>
152152
</button>
153153
<div class="auth-container-section">
154-
<div class="header bottomMargin">Sign in with AWS IAM Identity Center:</div>
154+
<div class="header bottomMargin">
155+
Sign in with AWS IAM Identity Center:<br />
156+
<a
157+
class="help-link"
158+
href="https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/q-in-IDE-setup.html#q-in-IDE-setup-pro-auth"
159+
v-if="app === 'AMAZONQ'"
160+
@click="handleHelpLinkClick"
161+
>
162+
<span class="help-link__icon">?</span
163+
><span class="help-link__label">Need help signing in?</span></a
164+
>
165+
</div>
155166
<div class="code-catalyst-login" v-if="app === 'TOOLKIT'">
156167
<div style="margin-bottom: 4px"></div>
157168
<div class="subHeader">
@@ -504,6 +515,9 @@ export default defineComponent({
504515
async getDefaultStartUrl() {
505516
return await client.getDefaultStartUrl()
506517
},
518+
handleHelpLinkClick() {
519+
void client.emitUiClick('auth_helpLink')
520+
},
507521
},
508522
})
509523
</script>
@@ -677,4 +691,32 @@ body.vscode-light #logo-text {
677691
.topMargin {
678692
margin-top: 12px;
679693
}
694+
695+
.help-link,
696+
.help-link__icon {
697+
align-items: center;
698+
display: flex;
699+
}
700+
701+
.help-link,
702+
.help-link__label {
703+
font-size: 10px;
704+
font-weight: 400;
705+
margin: 4px 0 0;
706+
text-decoration: none;
707+
}
708+
709+
.help-link__icon {
710+
border-radius: 50%;
711+
border: 1px solid var(--vscode-textLink-foreground);
712+
font-size: 8px;
713+
height: 10px;
714+
justify-content: center;
715+
width: 10px;
716+
}
717+
718+
.help-link__label {
719+
margin: 0;
720+
padding: 0 0 0 2px;
721+
}
680722
</style>

packages/core/src/login/webview/vue/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export type AuthUiClick =
5959
| 'auth_toolkitCloseButton'
6060
| 'auth_reauthenticate'
6161
| 'auth_signout'
62+
| 'auth_helpLink'
6263
| 'amazonq_switchToQSignIn'
6364

6465
export const userCancelled = 'userCancelled'

0 commit comments

Comments
 (0)