Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugs and missing features with custom Note #914

Open
SergeyDvornikovSetronica opened this issue Nov 27, 2019 · 8 comments
Open

Bugs and missing features with custom Note #914

SergeyDvornikovSetronica opened this issue Nov 27, 2019 · 8 comments

Comments

@SergeyDvornikovSetronica
Copy link

SergeyDvornikovSetronica commented Nov 27, 2019

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):

  • OS: linux
  • Browser: chrome
  • Version: 78.0.3904.97 x64
@SergeyDvornikovSetronica
Copy link
Author

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
Copy link
Author

Describe the bug
The icon method does not work correctly:

  • If closeable(true) is used, the icon method with a value changes the icon on the close "button"
  • An empty value for the icon method results in the display of the <i class ="undefined"> tag. This applies to the close button, as is the case with the previous paragraph
  • Value null for icon method results in the display of the <i class ="null"> tag. With close as is the case with the previous paragraph

Expected behavior

  • icon method should add an icon in front of the text regardless of the presence of a close button
  • Call with empty params should return the current value of the icon
  • Call with null should remove icon

@SergeyDvornikovSetronica
Copy link
Author

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
Copy link
Author

SergeyDvornikovSetronica commented Nov 27, 2019

Describe the bug
The text method does not work correctly:

  • With empty value leads to a hiding note
  • With null value causes the note to be displayed without a message (20px thin strip)

Expected behavior

  • With empty value should return the current value
  • With null or empty string ('') throw exception, if you want to close a note, you must call the close method

@zdlm
Copy link
Contributor

zdlm commented Jan 7, 2020

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
Copy link
Author

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
Copy link
Contributor

zdlm commented Jan 7, 2020

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants