feat(landing-page): provide default texts for registerNowLink and forgotPasswordLink#1560
Open
dauriamarco wants to merge 1 commit intomainfrom
Open
feat(landing-page): provide default texts for registerNowLink and forgotPasswordLink#1560dauriamarco wants to merge 1 commit intomainfrom
registerNowLink and forgotPasswordLink#1560dauriamarco wants to merge 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
The pull request introduces default translated labels for the forgotPasswordLink and registerNowLink in the si-login-basic component. This improves user experience by providing sensible defaults when these links are not fully configured. The changes also include updates to the API golden files and example usage to reflect these new defaults. The code is well-structured and follows good practices for Angular components and internationalization.
Comment on lines
+1
to
+2
| @let forgotPasswordLink = this.effectiveForgotPasswordLink(); | ||
| @let registerNowLink = this.effectiveRegisterNowLink(); |
Contributor
| booleanAttribute, | ||
| ChangeDetectionStrategy, | ||
| Component, | ||
| computed, |
Contributor
| readonly passwordLabel = input(t(() => $localize`:@@SI_LOGIN_BASIC.PASSWORD:Password`)); | ||
| /** | ||
| * Config for Forgot Password link. | ||
| * If `title` is omitted, a default translated label is used. |
Contributor
| readonly forgotPasswordLink = input<Link>(); | ||
| /** | ||
| * Config for Register Now link. | ||
| * If `title` is omitted, a default translated label is used. |
Contributor
Comment on lines
+151
to
+153
| private readonly defaultForgotPasswordTitle = t( | ||
| () => $localize`:@@SI_LOGIN_BASIC.FORGOT_PASSWORD:Forgot password` | ||
| ); |
Contributor
Comment on lines
+163
to
+166
| protected readonly effectiveRegisterNowLink = computed(() => { | ||
| const link = this.registerNowLink(); | ||
| return !!link && link.title ? link : { ...link, title: this.defaultRegisterNowTitle }; | ||
| }); |
Contributor
Comment on lines
+35
to
+36
| [forgotPasswordLink]="{ href: 'https://myid.siemens.com/help/' }" | ||
| [registerNowLink]="{ href: 'https://myid.siemens.com/help/' }" |
Contributor
| href: 'https://myid.siemens.com/help/' | ||
| }" | ||
| [forgotPasswordLink]="{ href: 'https://myid.siemens.com/help/' }" | ||
| [registerNowLink]="{ href: 'https://myid.siemens.com/help/' }" |
Contributor
| title: 'FORM.REGISTER_NOW', | ||
| href: 'https://myid.siemens.com/help/' | ||
| }" | ||
| [forgotPasswordLink]="{ href: 'https://myid.siemens.com/help/' }" |
Contributor
| href: 'https://myid.siemens.com/help/' | ||
| }" | ||
| [forgotPasswordLink]="{ href: 'https://myid.siemens.com/help/' }" | ||
| [registerNowLink]="{ href: 'https://myid.siemens.com/help/' }" |
Contributor
registerNowLink and forgotPasswordLinkregisterNowLink and forgotPasswordLink
|
Documentation. Coverage Reports: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1434.