Tradeshift / tradeshift-ui

Tradeshift UI is a framework-agnostic JavaScript library to help Tradeshift App developers to create cohesive user experiences and to provide reusable UI components.
https://ui.tradeshift.com
Other
33 stars 44 forks source link

Bugs and missing features with custom Note #914

Open SergeyDvornikovSetronica opened 4 years ago

SergeyDvornikovSetronica commented 4 years ago

Describe the bug Missing onclose event

To reproduce Please, use https://jsfiddle.net/wgqsn5p9/10/

Expected behavior onclose should be called after clicking on the cross Ideally, there should be a callback, with the ability to prevent note closure

Framework usage AngularJS 1.5.11 TS UI 12.3.6

Desktop (please complete the following information):

SergeyDvornikovSetronica commented 4 years ago

Describe the bug Don't work markdown, as a result there is no callback on click on the link

Expected behavior Markdown is work, link call calback

SergeyDvornikovSetronica commented 4 years ago

Describe the bug The icon method does not work correctly:

Expected behavior

SergeyDvornikovSetronica commented 4 years ago

Describe the bug The buttons method leads to an error: image as a result, you cannot set buttons or get a list of them

Expected behavior The buttons method should allow you to add or receive a list of buttons, like http://ui.tradeshift.com/v12/#components/notes/

SergeyDvornikovSetronica commented 4 years ago

Describe the bug The text method does not work correctly:

Expected behavior

zdlm commented 4 years ago

We have two types of Notes. One is the page level note, which you can use api to create. such as:

ts.ui.Note({
    icon: 'ts-icon-heart',
    text: 'This page explains how to use the Note component with some nice examples.',
    onclose: function() {
        ts.ui.Notification.success('The Note is gone...');
    }
});

The other one is inline Note, which give information about a certain section of the page. You can't get events and callbacks in the inline Note. There is only some css on it.

The code you made to get the spirit (const note = ts.ui.get('#test-note');). We don't have the api for it to change the inline text and close event callback.

SergeyDvornikovSetronica commented 4 years ago

We don't have the api for it to change the inline text and close event callback. Yes, but it would be very useful (albeit sometimes) to have such an API in the same way as everything that I described in this issue

zdlm commented 4 years ago

Is there any blocking issue on production? We are making new Note in elements. We prefer to make it in the new Notes if it is not emergency

SergeyDvornikovSetronica commented 4 years ago

This is absolutely not emergency. Anyway, now, but everything can change