Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<button
type="button"
class="collapse-expand text-center p-0 focus-force"
[attr.aria-label]="(expanded() ? collapseButtonText() : expandButtonText()) | translate"
[attr.aria-label]="toggleButtonText() | translate"
[attr.aria-expanded]="!!expanded()"
[attr.aria-controls]="statusId"
[class.expanded]="expanded() === 2"
Expand Down
11 changes: 11 additions & 0 deletions projects/element-ng/status-bar/si-status-bar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,19 @@ export class SiStatusBarComponent implements OnDestroy, OnChanges {
* blink pulse generator for synchronized blinking with other components
*/
readonly blinkPulse = input<Observable<boolean>>();
/**
* Text for the navbar expand/collapse toggle button. Required for a11y.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The documentation refers to a "navbar", but this component is the SiStatusBarComponent. Please update this to "status bar" to ensure accuracy and clarity.

Suggested change
* Text for the navbar expand/collapse toggle button. Required for a11y.
* Text for the status bar expand/collapse toggle button. Required for a11y.
References
  1. When naming UI elements, prioritize consistency with related components to maintain a consistent user experience across related features.

*
* @defaultValue
* ```
* t(() => $localize`:@@SI_STATUS_BAR.TOGGLE:Toggle`)
* ```
*/
readonly toggleButtonText = input(t(() => $localize`:@@SI_STATUS_BAR.TOGGLE:Toggle`));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The introduction of toggleButtonText and the removal of expandButtonText/collapseButtonText from the template is a breaking change. Any custom values previously provided to the deprecated inputs will now be ignored, and the button label will default to "Toggle".

According to the repository style guide (line 232), breaking changes must be documented in the PR description with a BREAKING CHANGE: footer including summary, description, and migration instructions. Additionally, consider if a fallback mechanism is needed to maintain backward compatibility for existing customizations during the deprecation period.

References
  1. Breaking changes must include BREAKING CHANGE: in the footer with summary, description, and migration instructions. (link)

/**
* Text for the navbar expand button. Required for a11y
*
* @deprecated Use {@link toggleButtonText} instead.
* @defaultValue
* ```
* t(() => $localize`:@@SI_STATUS_BAR.EXPAND:Expand`)
Expand All @@ -129,6 +139,7 @@ export class SiStatusBarComponent implements OnDestroy, OnChanges {
/**
* Text for the navbar collapse button. Required for a11y
*
* @deprecated Use {@link toggleButtonText} instead.
* @defaultValue
* ```
* t(() => $localize`:@@SI_STATUS_BAR.COLLAPSE:Collapse`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ export interface SiTranslatableKeys {
'SI_STATUS_BAR.COLLAPSE'?: string;
'SI_STATUS_BAR.EXPAND'?: string;
'SI_STATUS_BAR.MUTE'?: string;
'SI_STATUS_BAR.TOGGLE'?: string;
'SI_THRESHOLD.ADD'?: string;
'SI_THRESHOLD.DELETE'?: string;
'SI_THRESHOLD.INPUT_LABEL'?: string;
Expand Down
Loading