openstreetmap-polska / openaedmap-frontend

Map which shows locations of defibrillators (AEDs) and allows adding new ones.
https://OpenAEDMap.org
MIT License
31 stars 18 forks source link

Use more standard created_by value #125

Closed Zaczero closed 1 year ago

Zaczero commented 1 year ago

Putting a website link in created_by is quite unexpected.

This page contains examples on how other apps use this tag: https://wiki.openstreetmap.org/wiki/Key:created%20by

I suggest switching to: created_by=OpenAEDMap <build date/commit hash/version/…> website=https://openaedmap.org/

Code: https://github.com/openstreetmap-polska/openaedmap-frontend/blob/c781034e94a9c2113cd22080c911abb2dc06c949/src/osm.ts#L68

ttomasz commented 1 year ago

Using <editor name + version> makes sense for general purpose editors. For a niche single purpose website using url clearly identifies where did the changeset come from. We could put some kind of version in there but there shouldn't be too many versions over lifetime of the project or most of them won't change anything about osm integration/tags used etc so I'm not sure how much value would that provide.

Zaczero commented 1 year ago

So, using a build date or commit hash as a version alternative seems like a good idea. You seem to assume that no forks of the project will be created. If a fork is created and a bug is introduced, it could be difficult to identify the exact faulty fork or release. This issue seems like an easy fix, that's why I bothered with posting about it.

ttomasz commented 1 year ago

Sure, if someone wants to add git hash or something to changeset tags I have nothing against it.

Zaczero commented 1 year ago

I am not proficient in React but the way to achieve that would be to accept an env variable and use it as a constant or something.

This env variable could be set here (both for dev and prod): https://github.com/openstreetmap-polska/openaedmap-frontend/blob/37c726ddac75c9619e57bce7616e0bdc4f7c042c/.github/workflows/deploy_development.yml#L37

And I suppose you could use that action: https://github.com/marketplace/actions/commit-hash or something more standard if available.

starsep commented 1 year ago

I added git_commit tag to changeset. Example test AED: https://master.apis.dev.openstreetmap.org/changeset/253746 At the moment we won't be changing created_by tag.

Zaczero commented 1 year ago

Thank You @starsep