Skip to content

Comments

feat(landing-page): provide default texts for registerNowLink and forgotPasswordLink#1560

Open
dauriamarco wants to merge 1 commit intomainfrom
feat/landing-page/default-texts
Open

feat(landing-page): provide default texts for registerNowLink and forgotPasswordLink#1560
dauriamarco wants to merge 1 commit intomainfrom
feat/landing-page/default-texts

Conversation

@dauriamarco
Copy link
Member

Resolves #1434.

Describe in detail what your merge request does and why. Add relevant
screenshots and reference related issues via Closes #XY or Related to #XY.


@dauriamarco dauriamarco added this to the 49.x milestone Feb 20, 2026
@dauriamarco dauriamarco self-assigned this Feb 20, 2026
@dauriamarco dauriamarco requested review from a team as code owners February 20, 2026 14:25
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The template now uses effectiveForgotPasswordLink() and effectiveRegisterNowLink() which correctly encapsulate the logic for providing default titles. This is a good improvement for maintainability and consistency.

booleanAttribute,
ChangeDetectionStrategy,
Component,
computed,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The computed import is added, which is necessary for the new effectiveForgotPasswordLink and effectiveRegisterNowLink properties. This is a correct addition.

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The JSDoc for forgotPasswordLink is updated to reflect the new behavior of providing a default translated label if the title is omitted. This improves the clarity of the component's API.

readonly forgotPasswordLink = input<Link>();
/**
* Config for Register Now link.
* If `title` is omitted, a default translated label is used.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The JSDoc for registerNowLink is updated to reflect the new behavior of providing a default translated label if the title is omitted. This is consistent with the forgotPasswordLink documentation.

Comment on lines +151 to +153
private readonly defaultForgotPasswordTitle = t(
() => $localize`:@@SI_LOGIN_BASIC.FORGOT_PASSWORD:Forgot password`
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The defaultForgotPasswordTitle is correctly defined using $localize for internationalization. This ensures that a default translated label is available for the 'Forgot password' link.

Comment on lines +163 to +166
protected readonly effectiveRegisterNowLink = computed(() => {
const link = this.registerNowLink();
return !!link && link.title ? link : { ...link, title: this.defaultRegisterNowTitle };
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The effectiveRegisterNowLink computed signal correctly checks if registerNowLink has a title. If not, it provides the defaultRegisterNowTitle. This mirrors the logic for the forgot password link, ensuring consistency.

Comment on lines +35 to +36
[forgotPasswordLink]="{ href: 'https://myid.siemens.com/help/' }"
[registerNowLink]="{ href: 'https://myid.siemens.com/help/' }"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The example usage for forgotPasswordLink is updated to omit the title property, relying on the new default translation. This demonstrates the intended usage of the new feature.

href: 'https://myid.siemens.com/help/'
}"
[forgotPasswordLink]="{ href: 'https://myid.siemens.com/help/' }"
[registerNowLink]="{ href: 'https://myid.siemens.com/help/' }"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The example usage for registerNowLink is updated to omit the title property, relying on the new default translation. This is consistent with the forgotPasswordLink example.

title: 'FORM.REGISTER_NOW',
href: 'https://myid.siemens.com/help/'
}"
[forgotPasswordLink]="{ href: 'https://myid.siemens.com/help/' }"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The example usage for forgotPasswordLink is updated to omit the title property, relying on the new default translation. This demonstrates the intended usage of the new feature.

href: 'https://myid.siemens.com/help/'
}"
[forgotPasswordLink]="{ href: 'https://myid.siemens.com/help/' }"
[registerNowLink]="{ href: 'https://myid.siemens.com/help/' }"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The example usage for registerNowLink is updated to omit the title property, relying on the new default translation. This is consistent with the forgotPasswordLink example.

@dauriamarco dauriamarco changed the title feat(landing-page): provide default texts for the registerNowLink and forgotPasswordLink feat(landing-page): provide default texts for registerNowLink and forgotPasswordLink Feb 20, 2026
@github-actions
Copy link

Code Coverage

@github-actions
Copy link

Copy link
Member

@michael-smt michael-smt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Landing page: provide default texts for the registerNowLink and forgotPasswordLink

2 participants