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

feat: add warning message and limit selection in dependent views #167

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

oltionchampari
Copy link
Contributor

@oltionchampari oltionchampari commented Dec 7, 2021

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

grafik

@oltionchampari oltionchampari added the status: help wanted Extra attention is needed label Dec 7, 2021
@oltionchampari oltionchampari requested a review from thinkh December 7, 2021 14:14
Copy link
Member

@thinkh thinkh left a 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.`,
Copy link
Member

@thinkh thinkh Dec 9, 2021

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:

Suggested change
`<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);
Copy link
Member

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.

@thinkh thinkh changed the title Add warning message and limit selection in dependent views feat: add warning message and limit selection in dependent views Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants