@ -27,7 +27,7 @@ As komoot website says, "[challenge] definitely is a great chance to learn somet
after hearing about it from Xe Iaso (who sadly stopped development of xer Xeact).
after hearing about it from Xe Iaso (who sadly stopped development of xer Xeact).
It was definitely an experience setting up a project with `preact` (their defaults regarding linting and typechecking are not exactly sensible),
It was definitely an experience setting up a project with `preact` (their defaults regarding linting and typechecking are not exactly sensible),
but also the resulting bundle is just 64KB, gzipped (42 of which is Leaflet).
but also the resulting bundle is just 65KB, gzipped (42 of which is Leaflet).
And all the actual code should be compatible with Facebook's `react` as well.
And all the actual code should be compatible with Facebook's `react` as well.
Since using third-party react components is disallowed by this challenge, I only use the following third-party libraries:
Since using third-party react components is disallowed by this challenge, I only use the following third-party libraries:
@ -39,7 +39,8 @@ Since using third-party react components is disallowed by this challenge, I only
4. `Sortable.js` (non-react package), because there is no way in hell I'm going to try to implement drag and drop myself in a cross-platform way; I have life;
4. `Sortable.js` (non-react package), because there is no way in hell I'm going to try to implement drag and drop myself in a cross-platform way; I have life;
5. `@dwayneparton/geojson-to-gpx`, an unpopular but tiny (2KB) package to create gpx files
5. `@dwayneparton/geojson-to-gpx`, an unpopular but tiny (2KB) package to create gpx files
(as opposed to much more popular `gpx-builder` which is 584KB with all its dependencies);
(as opposed to much more popular `gpx-builder` which is 584KB with all its dependencies);
6. `file-saver`, because implementing my own in a cross-platform way would be a waste of time.
6. `file-saver`, because implementing my own in a cross-platform way would be a waste of time;
7. `haversine-distance` to compute distances between points (and total route length).
### How to run
### How to run
@ -65,6 +66,8 @@ So I also added editable long marker labels (first four letters of unique marker
I also added "move up" and "move down" buttons for every marker, because for some people it can be much easier to use compared to drag&drop.
I also added "move up" and "move down" buttons for every marker, because for some people it can be much easier to use compared to drag&drop.
And I also compute and display total route length (without considering the altitude changes), I think this might be convenient.
The final design only remotely resembles the screenshot above, because I'm not a designer and I spent too much time on actually implementing the logic already.
The final design only remotely resembles the screenshot above, because I'm not a designer and I spent too much time on actually implementing the logic already.
There are tests for non-`preact` code (collection-related methods and main reducer, with 100% code coverage),
There are tests for non-`preact` code (collection-related methods and main reducer, with 100% code coverage),