-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ui5-shellbar profile button title override #4009
Comments
Hello @JarrettChan would providing a template hook be sufficient - we can extract the profile button in a Handlebars partial, that can be overwritten? This means you have to extend the ShellBar web component (ShellBarSF.js) and provide a template (ShellBarSF.hbs) and the only thing in the template would be the overwritten Handlebars partial, the rest will come from the base ShellBar.hbs. Let's say this is the ShellBarSF.hbs and the partial is called "profileBtn": {{>include "../ShelllBar.hbs"}}
{{#*inline "profileBtn"}}
<ui5-button title="Account Navigation for Alan Chin"></ui5-button>
{{/inline}} Some of your colleagues already used this approach, we did the same for the FlexibleColumnLayout arrows #2242 by SF request in the past. What do you think? |
Hi @ilhan007 That would work. Can you provide an estimate of when this could be completed? |
This can work for the short term, but wouldn't all users of Shellbar WC need to customize the tooltip for the Profile button? It would seem the tooltip should always have at least the name of the user there as part of accessibility, just having the word "Profile" seems unusual to me, and unintuitive for a blind person. Is there any problem accepting the tooltip as an optional attribute on the shellbar? |
On second thought, being able to override the button entirely might be beneficial if we ever needed to customize the button for other reasons. In know our customers have been complaining a lot about not showing any visual indicator when they are a proxy. I suspect we might want to add something to the button to show that. So maybe we could use the online thing in the future for other reasons but for now we only need to customize the title. But I feel this would be something lots of users might benefit from being able to do that without extending the shellbar. We have no problem from our end, though, to extend the shellbar, if that's what we need to do. |
The stakeholders can't provide own 'title' for the ShellBar's profile button. We show "profile", which is not what the stakeholders need. As currently, it's not possible to replace a specific text in the i18n bundle, we would need to provide either a HBS template hook, or an API to allow developers set their own text. The template hook is the simplest solution without any change in the APIs. Extract the profile button mark up as Handlebars partial to allow custom component developers to overwrite the Handlebars partial and change the profile button "title" to the desired one. Fixes: #4009
New property from type Object, called accessibilityTexts is introduced to allow customization of some internal parts of the ShellBar web component via stable API. Currently the only thing available on the object is the profileButtonTitle to define the profile button tooltip, showing up on hover. Fixes: #4009
New property from type Object, called accessibilityTexts is introduced to allow customization of some internal parts of the ShellBar web component via stable API. Currently the only thing available on the object is the profileButtonTitle to define the profile button tooltip, showing up on hover. Fixes: #4009
The stakeholders can't provide own 'title' for the ShellBar's profile button. We show "profile", which is not what the stakeholders need. As currently, it's not possible to replace a specific text in the i18n bundle, we would need to provide either a HBS template hook, or an API to allow developers set their own text. The template hook is the simplest solution without any change in the APIs. Extract the profile button mark up as Handlebars partial to allow custom component developers to overwrite the Handlebars partial and change the profile button "title" to the desired one. Fixes: SAP#4009
New property from type Object, called accessibilityTexts is introduced to allow customization of some internal parts of the ShellBar web component via stable API. Currently the only thing available on the object is the profileButtonTitle to define the profile button tooltip, showing up on hover. Fixes: SAP#4009
Feature Request Description
We currently can not provide the profile button with our title.
https://github.com/SAP/ui5-webcomponents/blob/master/packages/fiori/src/ShellBar.hbs#L163
SuccessFactors header has been providing a title for the profile button such as
Account Navigation for Alan Chin (achin)
by passing along a parameter for the user, so we can't just replace it in the messagebundle.The other button titles are either new or not significantly different from the SF ones.
Please provide a hook on the ui5-shellbar for this.
Priority
Stakeholder Info (if applicable)
The text was updated successfully, but these errors were encountered: