openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

sap.m.FeedListItem: `iconInitials` never worked

Open boghyon opened this issue 5 years ago • 3 comments

OpenUI5 version

Since the introduction of iconInitials (1.88): https://github.com/SAP/openui5/commit/454a41c8b7034c673a9c34b92921ced54b7bdce5#diff-8b72ed9ca72d9bf06081308bacffad14f5719bade70ed486635cd5ec2bfabdfa

URL (minimal example if possible)

https://jsbin.com/megaguq/edit?html,js,output

What is the expected result?

Same as initials on sap.m.Avatar: if there is no valid icon (src) set, use the iconInitials.

What happens instead?

Initials are never applied because:

  1. sap.m.FeedListItem always sets the person-placeholder icon as fallback: https://github.com/SAP/openui5/blob/faaaf277cdfac17b24d7e28d1662ac72406be982/src/sap.m/src/sap/m/FeedListItem.js#L443-L449
  2. sap.m.Avatar, however, applies the initials only if there is no src set. https://github.com/SAP/openui5/blob/faaaf277cdfac17b24d7e28d1662ac72406be982/src/sap.m/src/sap/m/Avatar.js#L461-L476

Any other information? (attach screenshot if possible)

Avatar already uses the icon sap-icon://person-placeholder if its displayShape is Circle (== default shape of FeedListItem's iconDisplayShape). Hence, setting the person placeholder explicitly might be superfluous, unless Square icons are also supposed to display the person placeholder.

boghyon avatar May 19 '21 12:05 boghyon

Hello @boghyon , Thank you for sharing this finding. I've created an internal incident 2180176684. The status of the issue will be updated here in GitHub. Regards, Tsanislav

tsanislavgatev avatar May 25 '21 13:05 tsanislavgatev

Changes is done for this issue with 8aba9a495979a9a97ba2ae68273939b7488d1082.

Madhu552 avatar Jun 08 '21 06:06 Madhu552

Hello,

As the issue seem to be fixed by @Madhu552, I am closing the issue.

Best regards, Tereza

terezamch avatar Jan 05 '22 11:01 terezamch