maps
maps copied to clipboard
Enh/image suggestions
This branch bring the photo location suggestions to vue. (Previously called nonlocalized photos.) This PR contains only the fronted part, which works quite nicely and it requires https://github.com/nextcloud/maps/pull/700.
The Implemented Workflow:
- The user can load photo location suggestions from the Actions in the photos app Navigation Menu
- Images are shown on the map and the sidebar opens.
- If no suggestions are received from the backend there is an information in the sidebar
- The user selects suggestions by clicking on the image shown on the map.
- If no suggestion is selected there is a information in the sidebar, that suggestions can be selected by clicking them on the map
- There is a select all button
- A clear selection button
- A a cancel button
- A save button
- Clicking the save button will store the suggested location into the selected images.
To test this branch you have to make the back-end deliver photo-suggestions. While this should work principle, it has many cases, where it just doesn't work. To test the branch I patched the PhotoController.php locally to provide dummy data.
/**
* @NoAdminRequired
* @NoCSRFRequired
*/
public function getNonLocalizedPhotosFromDb() {
$result = $this->geophotoService->getNonLocalizedFromDB($this->userId);
//Get Suggestions for Development fix real suggestions later
$result = $this->geophotoService->getAllFromDB($this->userId);
foreach ($result as $r) {
$r->lat = $r->lat + 0.1;
$r->lng = $r->lng + 0.1;
}
return new DataResponse($result);
}
Changes which improve the backend are in:
- Bootstrap: https://github.com/nextcloud/maps/pull/703
- Scan now: https://github.com/nextcloud/maps/pull/704
- Exif handling: https://github.com/nextcloud/maps/pull/705
To test this PR with backend improvements checkout enh/image-suggestions-with-backend.
It requires https://github.com/nextcloud/maps/pull/701.
Do you mean #700 ?
Could you describe what this does? What does it suggest? Location for non-localized photos?
It requires #701.
Do you mean #700 ?
Yes
Could you describe what this does? What does it suggest? Location for non-localized photos?
Yes, Do you mean to describe it here in the PR for you and other reviewers or for the user of the maps app?
Yes here :grin: I didn't immediately get what it was about.
If it requires some explanation in the UI, then there too :grin:.
Codecov Report
Merging #701 (48a37fc) into master (c51b083) will decrease coverage by
1.27%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## master #701 +/- ##
============================================
- Coverage 58.31% 57.03% -1.28%
- Complexity 1138 1153 +15
============================================
Files 42 47 +5
Lines 3481 3538 +57
============================================
- Hits 2030 2018 -12
- Misses 1451 1520 +69
Flag | Coverage Δ | |
---|---|---|
unittests | 57.03% <ø> (-1.28%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
nextcloud/apps/maps/lib/Hooks/FileHooks.php | 25.58% <0.00%> (-18.61%) |
:arrow_down: |
nextcloud/apps/maps/lib/Service/TracksService.php | 68.52% <0.00%> (-1.26%) |
:arrow_down: |
...tcloud/apps/maps/lib/Controller/PageController.php | 100.00% <0.00%> (ø) |
|
...cloud/apps/maps/lib/Controller/UtilsController.php | 10.25% <0.00%> (ø) |
|
...loud/apps/maps/lib/Controller/PhotosController.php | 100.00% <0.00%> (ø) |
|
...loud/apps/maps/lib/Controller/TracksController.php | 86.44% <0.00%> (ø) |
|
...oud/apps/maps/lib/Controller/DevicesController.php | 95.91% <0.00%> (ø) |
|
...oud/apps/maps/lib/Controller/RoutingController.php | 0.00% <0.00%> (ø) |
|
...d/apps/maps/lib/Controller/FavoritesController.php | 95.08% <0.00%> (ø) |
|
.../apps/maps/lib/Controller/DevicesApiController.php | 98.36% <0.00%> (ø) |
|
... and 10 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 726cb0c...48a37fc. Read the comment docs.