-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: add warning message and limit selection in dependent views #167
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general that looks fine to me. I have some suggestions regarding the warning message.
const {name, selectionLimit} = desc; | ||
if (selectionLimit && selection.range.size().reduce((a, b) => a + b, 0) > selectionLimit) { | ||
NotificationHandler.pushNotification('warning', | ||
`<b>${name}</b>: Supported incoming selections limit reached. Showing data for the first <b>${selectionLimit}</b> items.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is my text suggestion:
`<b>${name}</b>: Supported incoming selections limit reached. Showing data for the first <b>${selectionLimit}</b> items.`, | |
`<b>${name}</b>: Too many selected items. Showing data only for the first <b>${selectionLimit} items</b>.`, |
if (selectionLimit && selection.range.size().reduce((a, b) => a + b, 0) > selectionLimit) { | ||
NotificationHandler.pushNotification('warning', | ||
`<b>${name}</b>: Supported incoming selections limit reached. Showing data for the first <b>${selectionLimit}</b> items.`, | ||
NotificationHandler.DEFAULT_SUCCESS_AUTO_HIDE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 seconds are very fast, until I detected the warning and started to read, it was already gone. I suggest to increase the time to 10 seconds or maybe let it close by the user.
Closes Caleydo/tdp_bi_bioinfodb#1316
tdp_core PR datavisyn/tdp_core#595
Summary
@thinkh Could you test this and see the code changes and let me know if this implementation would be okay.
Then i can go ahead and add this feature to the other two views
Screenshot