SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.94k stars 1.23k forks source link

sap.f.SidepanelItem does not render SVG Icon #3985

Open osama571 opened 6 months ago

osama571 commented 6 months ago

OpenUI5 version: 1.121.0

Browser/version (+device/version): windows 10/chrome(v. 121.0.6167.189)

Steps to reproduce the problem:

  1. Create a view with sap.f.SidePanel with sap.f.SidePanel items
  2. Give sap.f.SidePanelItem a SVG Icon
  3. the SVG will not be rendered

What is the expected result? SVG should be rendered

What happens instead? SVG does not render

Hallo, I am using sap.f.SidePanel and I am having hard time to use SVG Icon for SidePanelItem. the SidepanelItem has a property called Icon, which is of type sap.ui.core.URI (just like the sap.m.Button control). But I noticed that its only works for font icons. in other hand the sap.m.button does spport SVG Icon which has the same property and type (sap.ui.core.URI).

So I checked the source code for sap.m.Button and sap.f.SidePanelItem. I noticed that the Button control uses Image instead of core.Icon if the Icon is not Font. but it does not do the same for sap.f.SidepanelItem, is this intended behavior or is it just missing feature?

Thanks in advance

tsanislavgatev commented 6 months ago

Hello @osama571 ,

That's a planned behaviour, but we see this as a way for improvement.

We've opened an internal feature request with id DINC0088692.

We will follow up when more information is available.

Best Regards, Tsanislav

yurakovay commented 3 months ago

photo_2024-05-29_16-49-06

Hello @tsanislavgatev I also noticed that when using this control on a mobile device, the icon is not displayed. This can make it unclear to the user what is contained in this block, especially since it's not easy to open.

I undastand that this was indicated as being by design earlier, but now I see that it's not convenient for use, especially on mobile devices.

In the screenshot, I've highlighted the space with the SidePanel.