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.92k stars 1.23k forks source link

sap.m.MessageBox: undeprecate usage of sap.ui.core.Control as vMessage #4019

Closed niuniuch closed 3 months ago

niuniuch commented 3 months ago

Possibility to pass sap.ui.core.Control as vMessage is the best, cleanest and most concise way to accomplish simple things, like displaying FormattedText instead of plain Text. Sadly this functionality has been deprecated since 1.30.4.

After some digging I found out that this deprecation was just an overreaction to issue #477.

I would like to propose to undeprecate this useful functionality

boghyon commented 3 months ago

@niuniuch HTML tags supported by sap.m.FormattedText are supported by sap.m.MessageBox as well in its details property.

  1. Open the sample: https://sdk.openui5.org/entity/sap.m.MessageBox/sample/sap.m.sample.MessageBoxInfo/code
  2. Click on the Show Details - FormattedText button.
  3. Click on "View Details".
niuniuch commented 3 months ago

@boghyon from details documentation: "The initial visibility is not configurable and the details are hidden by default." Sorry, that doesn't resolve my issue.

boghyon commented 3 months ago

@niuniuch That is the intended design of the Message Box currently. According to https://experience.sap.com/fiori-design-web/message-box/#show-details-button

A message box without an explicit details section should be sufficient. Therefore, the Show Details link is only shown if detailed information is available that differs from the message text and is important for the user.

If the application is supposed to be highly customized rather than aligning with Fiori design guidelines, I'm afraid you'd have to use the sap.m.Dialog.