-
Notifications
You must be signed in to change notification settings - Fork 0
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
Show toast on measurement interaction #981
base: development
Are you sure you want to change the base?
Show toast on measurement interaction #981
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.
Heya @sven1103! Awesome Implementation, i have a minor nitpick concering the toast message but overall it looks awesome 👍
...src/main/java/life/qbic/datamanager/views/projects/project/measurements/MeasurementMain.java
Outdated
Show resolved
Hide resolved
context.projectId().orElseThrow()); | ||
pendingToast = messageFactory.pendingTaskToast("task.in-progress", new Object[]{ | ||
"Update of #%d measurements".formatted(measurementData.size())}, |
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.
This can be confusing in the pooling context, since it will show the number of rows which are updated but not the number of unique measurements.
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.
What do you suggest instead?
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.
One way could be to filter the number of measurementIds via the distinct method to ensure only unique measurements are counted and then provide that number within the toast message.
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.
so straight forward, love it. will do
} else { | ||
completableFuture = measurementService.registerAll(upload.measurementMetadata(), | ||
context.projectId().orElseThrow()); | ||
pendingToast = messageFactory.pendingTaskToast("task.in-progress", new Object[]{ | ||
"Registration of #%d measurements".formatted(upload.measurementMetadata().size())}, |
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.
This can be confusing in the pooling context, since it will show the number of rows which are registered but not the number of unique measurements.
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.
What do you suggest instead?
Co-authored-by: Steffengreiner <[email protected]>
# Conflicts: # user-interface/src/main/java/life/qbic/datamanager/views/projects/project/measurements/MeasurementMain.java
@Steffengreiner want to give it another try? |
Quality Gate failedFailed conditions |
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.
Well done 👍
Displays pending registration toasts, finished toasts and toasts for update + deletion of measurement entities.
Toasts are yummie.