Skip to content

Platform: Shellbar Component Technical Design

kavya-b edited this page May 19, 2020 · 5 revisions

Shellbar

See Fundamental-NGX:Core implementation of Shellbar.


i18n

Link to general support for i18n: Supporting internationalization in ngx/platform

This section talks about i18n support for core's shellbar.

Special Usecase: No

  • fd-shellbar-title and fd-shellbar-subtitle can be supported as:
<fd-shellbar-title i18n="@@sbTitle">
        Corporate Portal
</fd-shellbar-title>
<fd-shellbar-subtitle i18n="@@sbSubtitle">
        Subtitle
</fd-shellbar-subtitle>
  • fd-shellbar-action can be supported as:
<fd-shellbar-action
            *ngFor="let action of actions"
            [glyph]="action.glyph"
            [callback]="action.callback"
            i18n-label="@@label"
            label="action.label"
            [notificationCount]="action.notificationCount"
            i18n-notificationLabel="@@notifLabel"
            [notificationLabel]="action.notificationLabel"
        >
</fd-shellbar-action>

The notificationCount attribute can be supported by using DecimalPipe in the lib implementation which can automatically translate numbers depending on the locale.

Redesign Required: Yes

fd-shellbar-actions expects user menu to be provided as an array of objects. There is no way to declare these individually, thereby not following declarative approach completely.

    <fd-shellbar-actions [user]="user" [userMenu]="userMenu" [closePopoverOnSelect]="true"></fd-shellbar-actions>

Clone this wiki locally