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

Add file sort for last created annotations #903

Merged
merged 14 commits into from
Sep 5, 2024
Merged

Conversation

lehecht
Copy link
Contributor

@lehecht lehecht commented Aug 1, 2024

Add a new file sort to the volume overview, where files are sorted by their latest annotation.

Closes #477.

@mzur
Copy link
Member

mzur commented Aug 20, 2024

Ready for review?

@lehecht lehecht requested a review from mzur August 21, 2024 05:59
Copy link
Member

@mzur mzur left a comment

Choose a reason for hiding this comment

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

Please implement an API endpoint that returns the timestamps for the images instead of passing them on to the view every time. This could be a lot of data if the volume is large and it could be unnecessary data if the sorter is not used. The getSequence() method of the sorting component already returns a promise so taking the result of an API request here should work out of the box.

Also you should implement getting the timestamps for each file in a single database query (hint: combine groupBy with max). Currently you fetch all annotations of the entire volume and this could be literally hundreds of thousands.

@lehecht lehecht requested a review from mzur August 26, 2024 06:53
@lehecht lehecht requested a review from mzur September 4, 2024 08:14
app/Http/Controllers/Api/VolumeController.php Outdated Show resolved Hide resolved
app/Http/Controllers/Api/VolumeController.php Outdated Show resolved Hide resolved
tests/php/Http/Controllers/Api/VolumeControllerTest.php Outdated Show resolved Hide resolved
@lehecht lehecht requested a review from mzur September 5, 2024 06:49
@mzur mzur merged commit 65792a4 into master Sep 5, 2024
6 checks passed
@mzur mzur deleted the sort-last-annotated branch September 5, 2024 07:28
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

Successfully merging this pull request may close these issues.

Sort by "last annotated" in the volume overview
2 participants