Skip to content

Feat/add home coordinates#986

Merged
zven merged 18 commits into
devfrom
feat/add-home-coordinates
Jun 19, 2026
Merged

Feat/add home coordinates#986
zven merged 18 commits into
devfrom
feat/add-home-coordinates

Conversation

@jona159

@jona159 jona159 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Type of Change

  • Dependency upgrade
  • Bug fix (non-breaking change)
  • Breaking change
    • e.g. a fixed bug or new feature that may break something else
  • New feature
  • Code quality improvements
    • e.g. refactoring, documentation, tests, tooling, ...

Implementation

Checklist

  • I gave this pull request a meaningful title
  • My pull request is targeting the dev branch
  • I have added documentation to my code
  • I have deleted code that I have commented out

Additional Information

@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 69.41% 2136 / 3077
🔵 Statements 67.89% 2206 / 3249
🔵 Functions 67.46% 421 / 624
🔵 Branches 52.98% 1021 / 1927
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
app/db/models/device.server.ts 63.59% 67% 60.46% 64% 86-91, 99, 151-152, 221-236, 276, 310, 339, 368, 398, 402, 410-412, 418-420, 438-440, 444-446, 488-490, 505-659, 710-714, 742-748, 753-769, 848-850, 861, 868-869, 877, 904, 1006-1026, 1045
app/db/models/profile.server.ts 2.63% 0% 7.69% 3.22% 15-69, 91-125
app/db/schema/profile.ts 80% 100% 66.66% 75% 33
app/lib/location.ts 16.66% 12.19% 16.66% 17.39% 28, 32, 44-65, 88-253
Generated in workflow #2710 for commit e3d09c5 by the Vitest Coverage Report Action

@jona159 jona159 marked this pull request as ready for review June 18, 2026 07:33
@zven

zven commented Jun 18, 2026

Copy link
Copy Markdown
Member

Zooming in on 0 0 when the user is logged in and nothing is set at all is not the best idea. How about showing the "old" globe view with Münster as a center in that case? That's the one that is alos shown, when no user is logged in right?

Screenshot 2026-06-18 at 14 30 49

Update:

The map only zooms to that location when I am in a menu and then click the osem icon on the upper left:

Screenshot 2026-06-18 at 14 34 44

@zven

zven commented Jun 18, 2026

Copy link
Copy Markdown
Member

Another update: When simply accessing http://localhost:3000/ I am also redirected to http://localhost:3000/explore#10/0/0

@zven

zven commented Jun 18, 2026

Copy link
Copy Markdown
Member

Home location is set do some default (see right) but the map home button (left) still brings me to 0 0

Screenshot 2026-06-18 at 14 37 41

@zven

zven commented Jun 18, 2026

Copy link
Copy Markdown
Member

The coordinates and zoom level seem to be hardcoded (see screenshot below). On the other hand, the menu says that I can leave it empty to use my own devices as a home area. How do I do that if the default after clicking Clear home location is hardcoded values?

Screenshot 2026-06-18 at 14 39 16

@zven

zven commented Jun 18, 2026

Copy link
Copy Markdown
Member

As soon as I have set a home area, the logo icon button works for zooming in. Not having set an area seems to be the problem.

@jona159

jona159 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Zooming in on 0 0 when the user is logged in and nothing is set at all is not the best idea. How about showing the "old" globe view with Münster as a center in that case? That's the one that is alos shown, when no user is logged in right?

Screenshot 2026-06-18 at 14 30 49 Update:

The map only zooms to that location when I am in a menu and then click the osem icon on the upper left:

Screenshot 2026-06-18 at 14 34 44

There was a bug in the calculation of the area that spans the user's devices, that should be fixed now. By default if nothing is set the button should zoom to the area that covers the user's devices or if they dont have any it should default to the initial view state (münster coordinates at zoom level 2)

@jona159

jona159 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

The coordinates and zoom level seem to be hardcoded (see screenshot below). On the other hand, the menu says that I can leave it empty to use my own devices as a home area. How do I do that if the default after clicking Clear home location is hardcoded values?

Screenshot 2026-06-18 at 14 39 16

The values for latitude and longitude here are just placeholders, do you think they should be removed to avoid confusion?

@jona159

jona159 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Another update: When simply accessing http://localhost:3000/ I am also redirected to http://localhost:3000/explore#10/0/0

As we made the map view our landing page we redirect from the index route to the explore route, on which again we by default zoom to either the initial view state (not logged in or no devices), the calculated area for the user's devices (no home view set) or the home view from the settings

@zven

zven commented Jun 18, 2026

Copy link
Copy Markdown
Member

Default location for adding a new device is currently set to 0 0 but the user has to zoom out and find the marker. Any more elegant ideas? ;-)

Screenshot 2026-06-18 at 17 24 01

Comment thread app/lib/location.ts Outdated
Comment thread public/locales/de/settings.json Outdated
@zven

zven commented Jun 19, 2026

Copy link
Copy Markdown
Member

When I only adjust the zoom level (or delete the initial 10 the saving indicator flickers between Saving... and Unsaved changes. This does not happen for the coordinates.

Screenshot 2026-06-19 at 11 45 34

Comment thread app/lib/location.ts Outdated
Comment thread app/lib/location.ts Outdated
Comment thread app/lib/location.ts Outdated
Comment thread app/routes/settings.preferences.tsx
@jona159

jona159 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

When I only adjust the zoom level (or delete the initial 10 the saving indicator flickers between Saving... and Unsaved changes. This does not happen for the coordinates.

Screenshot 2026-06-19 at 11 45 34

The poblem was with trying to save a zoom level without coordinates, should be prevented now (zoom input field is disabled as long as coords are missing)

@zven zven enabled auto-merge (squash) June 19, 2026 12:22
@zven zven merged commit 111dd7a into dev Jun 19, 2026
6 checks passed
@zven zven deleted the feat/add-home-coordinates branch June 19, 2026 12:25
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.

add home coordinates

2 participants