ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

Implement a MessageToast functionality

Open ignipae opened this issue 7 years ago • 5 comments

Is your feature request related to a problem? Please describe. Within applications I really like to give visual feedback to the user when something was successful. Within SAPUI5, there is the MessageToast which is completely doing the trick, by providing an easy to use feature, which shows a text, which fades out automatically after a set amount of time (+ default value).

Describe the solution you'd like I would like to see the MessageToast as a functionality within the ui5-webcomponents. I would expect to be able to provide a number of seconds (or maybe milliseconds) to define how long the toast will stay until it fades away. Of course a text needs to be provided for the content.

Further a nice-2-have would be even to provide a type, which could be used to highlight if this is about a success, or a warning or such. (but thats nothing which has to be there initially)

Describe alternatives you've considered An alternative would be to have the webcomponents dialog, which will give a success message to the end-user. But it has to be closed then manually, and its also taking too much space in my opinion.

Best regards, Julian

ignipae avatar Jul 16 '19 06:07 ignipae

I am not sure if this is technically feasible with the webcomponents technology, but I still think that this would be a good functionality.

ignipae avatar Jul 16 '19 06:07 ignipae

Hey @ignipae

Currently we are quite busy with improving the current code base and making the base APIs better and we will probably not be able to scale to make this component in the near future.

We will inform you as soon as we got this planned and assigned to someone.

You can try to use the MessageStrip with some custom interaction in the meantime https://codesandbox.io/embed/frosty-voice-siviz

Regards, Martin

Regards, Martin

MapTo0 avatar Jul 16 '19 07:07 MapTo0

Hi @MapTo0 Thank you for your response. Thats totally understandable! I will try to work with your suggested custom interaction. That looks already promising.

ignipae avatar Jul 16 '19 08:07 ignipae

MessageToast (ui5-message-toast)

properties

duration: Number | 3000 ms open: Boolean | false placement: String | Placement.BottomCenter Available values: TopStart, TopCenter, TopEnd, MiddleStart, MiddleCenter, MiddleEnd, BottomStart, BottomCenter, BottomEnd;

events (TBD)

openedChange or afterOpen + afterClose or visibilityChange

methods

open(): void Opens the message toast.

ilhan007 avatar Oct 02 '19 10:10 ilhan007

Implemented via #1014

fifoosid avatar Dec 19 '19 08:12 fifoosid