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

Show toast on measurement interaction #981

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

sven1103
Copy link
Contributor

Displays pending registration toasts, finished toasts and toasts for update + deletion of measurement entities.

Toasts are yummie.

@sven1103 sven1103 changed the base branch from main to development January 15, 2025 12:47
@sven1103 sven1103 marked this pull request as ready for review January 15, 2025 12:48
@sven1103 sven1103 requested a review from a team as a code owner January 15, 2025 12:48
@sven1103 sven1103 linked an issue Jan 15, 2025 that may be closed by this pull request
Steffengreiner
Steffengreiner previously approved these changes Jan 15, 2025
Copy link
Contributor

@Steffengreiner Steffengreiner left a 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 👍

context.projectId().orElseThrow());
pendingToast = messageFactory.pendingTaskToast("task.in-progress", new Object[]{
"Update of #%d measurements".formatted(measurementData.size())},
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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())},
Copy link
Contributor

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.

Copy link
Contributor Author

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?

# Conflicts:
#	user-interface/src/main/java/life/qbic/datamanager/views/projects/project/measurements/MeasurementMain.java
@sven1103
Copy link
Contributor Author

@Steffengreiner want to give it another try?

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@Steffengreiner Steffengreiner self-requested a review January 16, 2025 16:33
Copy link
Contributor

@Steffengreiner Steffengreiner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done 👍

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

Successfully merging this pull request may close these issues.

Show toast on measurement interaction
2 participants