Skip to content

Commit 3a3401d

Browse files
authored
Merge pull request #3 from OpenHistoricalMap/upstream
Upstream
2 parents 4d6003e + 1ab0e38 commit 3a3401d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+10898
-7507
lines changed

.eslintrc

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
{
22
"extends": "react-app",
33
"rules": {
4-
"quotes": [
5-
"error",
6-
"single"
7-
],
84
"no-unused-vars": "error"
95
},
106
"globals": {
117
"Raven": true
128
}
13-
}
9+
}

.github/workflows/docker-publish.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build Docker Image, Push to GHCR
22

33
on:
44
push:
5-
branches: ['main', 'staging', 'develop']
5+
branches: ['main', 'staging', 'upstream']
66

77
env:
88
REGISTRY: ghcr.io

.tool-versions

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
nodejs 16.1.0
2-
yarn 1.22.11
1+
nodejs 18
2+
yarn 1.22

ABOUT.md

+6-9
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
- [Usage](#usage)
1212
- [How to review a changeset?](#how-to-review-a-changeset)
1313
- [Changeset and Mapper details](#changeset-and-mapper-details)
14-
- [Using Changeset-map](#using-changeset-map)
1514
- [Reviewing changesets in OSMCha from OpenStreetMap](#reviewing-changesets-in-osmcha-from-openstreetmap)
1615
- [Filters](#filters)
1716
- [Basic filters](#basic-filters)
@@ -136,7 +135,7 @@ It is important that the reviewer has the necessary information about the
136135
changeset and understand the diff of modifications in the OSM data.
137136

138137
For this purpose, OSMCha offers an interface similar to OpenStreetMap but with
139-
additional tools such as [changeset-map](https://github.com/osmlab/changeset-map) to visualise the edits, information about
138+
additional tools to visualise the edits, information about
140139
the mapper, other information related to the changeset and OSM user history that
141140
can help the reviewer identify a problematic edits on OSM. For a deep-dive into
142141
what a problematic edit is on OSM, please refer to our guide on
@@ -179,9 +178,9 @@ what a problematic edit is on OSM, please refer to our guide on
179178

180179
* More details on the mapper can be found under the `User tab`. This gives more context to the reviewer about the user history and their pattern of contribution to OpenStreetMap.
181180

182-
### Using Changeset-map
181+
### Using the map view
183182

184-
* Changeset-map is a changeset visualiser for OSM. It helps the reviewer understand the edits of a changeset both in terms of geometry and feature properties.
183+
* One of OSMCha's core features is the ability to visualize a changeset on a map. Every map element that the changeset touched is shown, colored to indicate whether the element was created, modified, or deleted. Clicking on a map element reveals additional details about what was changed (for example, which OSM tags were modified). The map view helps you understand the complete effect of a changeset.
185184

186185
<!--<img width="600" alt="osmcha-changesetmap" src="https://d2mxuefqeaa7sj.cloudfront.net/s_97A29C4444FB7626533E7DD42C06D768BD5A4FA0D1B3C76327F305F832774967_1497443481288_image.png">-->
187186

@@ -191,7 +190,7 @@ what a problematic edit is on OSM, please refer to our guide on
191190

192191
<img width="300" alt="osmcha-mapcontrols" src="https://user-images.githubusercontent.com/8921295/35940114-236f8314-0c1c-11e8-9649-47c1f077ab02.png">
193192

194-
* The reviewer can also change the background map on the changeset-map by
193+
* The reviewer can also change the background map by
195194
toggling through the map style in `Map controls` tab.
196195

197196
<img width="300" alt="osmcha-flagged" src="https://user-images.githubusercontent.com/8921295/35940146-333e3d94-0c1c-11e8-8036-5adbbfea35be.png">
@@ -460,10 +459,8 @@ This is raised when someone tries to remove tags in a changeset that are added b
460459

461460
# Feedback
462461

463-
* To file bugs, feature requests on OSMCha - please file issues at
464-
https://github.com/osmcha/osmcha-frontend/issues
465-
* To file bugs, feature requests on Changeset map - please file issues at
466-
https://github.com/osmlab/changeset-map/issues
462+
To file bugs, feature requests on OSMCha - please file issues at
463+
https://github.com/osmcha/osmcha-frontend/issues
467464

468465
# Donate
469466

CHANGELOG.md

+26
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,32 @@
22

33
Log of changes since the 2.0 version
44

5+
### 1.2.1
6+
7+
- Upgrade to maplibre-adiff-viewer 1.3.0, which contains tweaks to improve
8+
the visibility of elements on the map.
9+
- Fix some filter input bugs (#779)
10+
- Preserve order of relation members in the element info table (#780)
11+
12+
### 1.2.0
13+
14+
- Switch from using s3://real-changesets JSONs to using adiffs.osmcha.org
15+
augmented diffs (XML) for visualizing changesets on the map
16+
- Remove dependency on changeset-map; add dependencies on
17+
@osmcha/maplibre-adiff-viewer and @osmcha/osm-adiff-parser
18+
- Map rendering now uses MapLibre GL JS v5.1.0 (we were previously using
19+
Mapbox GL JS v1.13, via changeset-map)
20+
- Clicking on a map element reveals a new details panel (the old one was part
21+
of changeset-map)
22+
- New bounding box input for filtering, implemented using Terra Draw
23+
24+
More detailed description of the above changes available here:
25+
https://github.com/OSMCha/osmcha-frontend/pull/772
26+
27+
### 1.1.1
28+
29+
- Fix display order of RTL tag values in Tag Changes view (#766)
30+
531
### 1.1.0
632

733
- Fix Chinese text input in location search bar (#671)

CONTRIBUTING.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Contributing to OSMCha
22

33
The current OSMCHA is broken into two repositories. You can file bug in any of these repositories.
4-
1. [osmcha-django](https://github.com/willemarcel/osmcha-django) Handles the backend of the OSMCha.
5-
2. [osmcha-frontend](https://github.com/mapbox/osmcha-frontend) Is the frontend application.
4+
1. [osmcha-django](https://github.com/OSMCha/osmcha-django) Handles the backend of the OSMCha.
5+
2. [osmcha-frontend](https://github.com/OSMCha/osmcha-frontend) Is the frontend application.
66

77
## Code of Conduct
88

@@ -14,7 +14,8 @@ Please read the project
1414
We'd love to hear what you think about OSMCha, about any specific problems or
1515
concerns you have. Here's a quick list of things to consider:
1616

17-
Please [search for your issue before filing it: many bugs and improvements have already been reported](https://github.com/search?l=&q=repo%3Amapbox%2Fosmcha-frontend&type=Issues)
17+
Please [search for your issue](https://github.com/search?l=&q=repo%3AOSMCha%2Fosmcha-frontend&type=Issues)
18+
before filing it; many bugs and improvements have already been reported.
1819

1920
To report a bug:
2021

Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ WORKDIR /app
88
COPY package.json yarn.lock /app/
99
RUN yarn set version stable
1010
RUN yarn install
11-
RUN sed -i "s|mapbox://styles/[^\"']*|https://www.openhistoricalmap.org/map-styles/historical/historical.json|g" node_modules/changeset-map/dist/*.js
1211

1312
COPY src/ /app/src
1413
COPY public/ /app/public

README.md

+21-62
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ easier to monitor and validate the changes in OpenStreetMap. [Learn more …](AB
77
- Test instance: http://osmcha-django-staging.tilestream.net/
88

99
This repository contains the frontend code. Other repositories are:
10-
* [OSMCha backend code](https://github.com/willemarcel/osmcha-django)
11-
* [OSMCha python library](https://github.com/willemarcel/osmcha) is used to analyse the OSM changesets
12-
* [OSM Compare](https://github.com/mapbox/osm-compare) is used to analyse OSM features
13-
* [OSM Changeset Viewer](https://github.com/osmlab/changeset-map) is used to display the changeset on the main map
14-
10+
* [`osmcha-django`](https://github.com/OSMCha/osmcha-django) - the backend Django application
11+
* [`osmcha` (python library)](https://github.com/OSMCha/osmcha) - used by the backend to analyse OSM changesets
12+
* [`maplibre-adiff-viewer`](https://github.com/OSMCha/maplibre-adiff-viewer) - used to display the changeset on the main map
1513

1614
## Setting up editor
1715

@@ -30,27 +28,21 @@ This repository uses [prettier](https://github.com/prettier/prettier) to keep th
3028
### Local development
3129

3230
1. `yarn start`
33-
1. Open [https://localhost:3000?filters=%7B%22date__gte%22%3A%5B%7B%22label%22%3A%222020-04-01%22%2C%22value%22%3A%222020-04-01%22%7D%5D%7D](https://localhost:3000?filters=%7B%22date__gte%22%3A%5B%7B%22label%22%3A%222020-04-01%22%2C%22value%22%3A%222020-04-01%22%7D%5D%7D) of e.g. [changeset#91638199](https://localhost:3000/changesets/91638199?filters=%7B%22date__gte%22%3A%5B%7B%22label%22%3A%222020-04-01%22%2C%22value%22%3A%222020-04-01%22%7D%5D%7D)
34-
- The app runs with https; Firefox is recommended since it allows self signed certificates.
35-
- The staging database does not have all the changesets that production has, therefore the filter is needed.
36-
37-
**To also edit the part of the UI that is provided by the OSM Changeset Viewer**
38-
39-
Checkout https://github.com/osmlab/changeset-map in a sibling folder.
40-
41-
_In `./changeset-map`:_
42-
43-
1. `yarn link`
44-
1. `yarn build --watch`
45-
46-
_In `./osmcha-frontend`_
47-
48-
1. `yarn link "changeset-map"`
49-
1. `yarn start`
50-
51-
Edits in both projects will result in a rebuild and reload the browser.
52-
53-
When finished, reset "osmcha-frontend" back to the npm version of "changeset-map" with `yarn add changeset-map@latest`
31+
1. Open [http://127.0.0.1:3000](http://127.0.0.1:3000)
32+
33+
Note: if you are running the frontend against the production backend (the
34+
default), you won't be able to use OAuth to log in through the UI. Instead
35+
you can copy your auth token from the DevTools console on the production
36+
website (`localStorage.getItem("token")`) and then paste it into the console
37+
on the development site (`localStorage.setItem("token", <value>)`). Refresh
38+
the page and you should now be logged in.
39+
40+
If you are running your own local copy of the
41+
[`osmcha-django`](https://github.com/OSMCha/osmcha-django) backend, you'll
42+
need to register your own OAuth app on openstreetmap.org, configure the backend
43+
to use that secret key, and then point this frontend at your local backend by
44+
setting the `REACT_APP_PRODUCTION_API_URL` environment variable. After that,
45+
normal OAuth login through the frontend UI should work.
5446

5547
### Local testing
5648

@@ -60,44 +52,11 @@ Test the application before commiting any changes. If you encounter any error ma
6052
yarn test
6153
```
6254

63-
## Deploy/Release
64-
65-
- There are three stacks to deploy to
66-
- ~~`yarn deploy:dev` deploys it to `mapbox.github.io`~~ (currently broken)
67-
- `yarn deploy:staging` deploys it to `staging.osmcha.org`
68-
- `yarn deploy:prod` deploys it to `osmcha.org`
69-
70-
1. Run the tests with `yarn test`
71-
72-
2. (optional) before deploy, you might want to increment the version number of application.
73-
* We use `minor` for all non-drastic changes.
74-
* The `patch` is reserved for minor changes.
75-
* We try to stick to sem-ver.
76-
```bash
77-
npm version minor
78-
```
79-
80-
3. Then build the app with the following command.
81-
```bash
82-
yarn build:<stack>
83-
```
84-
* here stack could be `dev`, `staging`, `prod`. Refer to package.json for more info.
85-
86-
4. The next step involves deploying the `build` folder to github. If you get an error like this `error: failed to push some refs to 'git'` while doing the deploy step. Run `rm -rf node_modules/gh-pages/.cache/`.
87-
```
88-
yarn deploy:<stack>
89-
```
90-
* here stack could be `dev`, `staging`, `prod`. Refer to package.json for more info.
91-
* `oh-pages` branch handles the build for `staging`, `prod` stacks.
92-
* `gh-pages` branch handles the build for `dev` stack.
93-
55+
## Releasing and Deployment
9456

95-
5. (optional) If you want to see the new changes on a `staging` or `prod` stack. You will need to draft a new github release. The convention is to append `-staging` or `-production` or just `-server` to the current version tag for the server to consume the build and separate concerns.
96-
* for eg. if the version npm module version was `v0.16.3`.
97-
* draft a github release with a tag `v0.16.3-staging`. (Note the name spacing)
98-
* supply this version tag to the server.
99-
* Refer to githubs [article](https://help.github.com/articles/creating-releases/) for creating releases.
57+
Deployment of the [osmcha.org](https://osmcha.org) instance is managed in the [`osmcha-deploy`](https://github.com/OSMCha/osmcha-deploy). Tags pushed to this repo are automatically built into container images. Modifying the code in `osmcha-deploy` to change the pinned image version will automatically redeploy the production website.
10058

59+
When tagging a new release, be sure to also update the [CHANGELOG](./CHANGELOG.md) file to describe what's changed.
10160

10261
## Issues and feature requests
10362

config-overrides.js

-87
This file was deleted.

0 commit comments

Comments
 (0)