OneIdentity / IdentityManager.Imx

HTML5 source code for Identity Manager web apps
Other
31 stars 121 forks source link

WebPortal should usually use DisplayValues when showing content to the user #129

Closed asattler closed 4 months ago

asattler commented 6 months ago

Hi folks,

I came up with this when checking why the sidesheet for service items (new product...) is showing the raw value for the service category fullpath, which is translated in my case. I found that in this case the ootb code is using getValue instead of getDisplay. But most values the users see may be translated, and usually you don't want users to see the technical values as they might be confusing... Example: https://github.com/OneIdentity/IdentityManager.Imx/blob/v92/imxweb/projects/qer/src/lib/new-request/new-request-product/product-details-sidesheet/product-details-sidesheet.component.html

In my case I had to change: getValue('ServiceCategoryFullPath') to getDisplay('ServiceCategoryFullPath')

But same applies e.g. for Description, and may also apply for other properties.

As the frontend-code does not know which properties might be translated (may change on version change, or by configuration...), I would suggest to always use getDisplay instead of getValue, except when explictly the technical value is necessary.

Best Regards

Andreas

SebastianWeberQuest commented 4 months ago

@asattler

you're right. So I've created an internal ticket --> 456379

SebastianWeberQuest commented 4 months ago

So I can close this issue