nrenner / brouter-web

Web client for BRouter, a routing engine based on OpenStreetMap
https://brouter.de/brouter-web/
MIT License
371 stars 73 forks source link

Export/import profiles #472

Open EssBee59 opened 2 years ago

EssBee59 commented 2 years ago

Hello,

Using the Brouter-web users can choose a profile among a long list of available standard profiles, AND have the possibility to „customize“ an existing profile. (as example the parameter turninstructionmode, consider_elevation, considerTurnRestrictions can / should be adapted in many situations)

Currently (and without registration) a modified profile can not be saved and later resused in an easy way.

I think, an extention to support « save profile» and « restore profile» would be nice to have !

As example 2 new functions could should be implemented (with a limited workload):

Also users of the Brouter-app could use this new feature: Brouter-app users generally developpe and test new profiles with the Brouter-web. The downloaded „brf“ file could then be easyly forwoarded to the smartphone (as mail attachement or with an other tool). On the smartphone side, a click on the attachement allows a very simply "semi-automatic" import of the profile into the Brouter-app (feature available in Brouter-app from rel. 1.6.3)

EssBee59 commented 2 years ago

No comment to this suggested feature after 27 days...

Before closing it (or developping a prototype!), I liked to get a general opinion of the developers: -Feature not of interest? (yes, I try to make the Brouter-web more confortable for non experienced users, not for IT experts) -Is not secured? Possibly, but I do not see a real risk, as every users remain responsible for his changed profiles) -Workload too high?

Thank in advance for any comment. If interest is found, I could start to create a prototype. Additionally to the described feature above, I think about saving a default-profile name as cookie: This allowing to activate this default on start if the user decides/configures so.

mjaschen commented 2 years ago

Additionally to the described feature above, I think about saving a default-profile name as cookie: This allowing to activate this default on start if the user decides/configures so.

FYI, for non-custom profiles this was already implemented in #456.

Regarding your initial comment/proposal: import/export is already possible via copy'n'paste. Adding export/import via files would be an improvement – but I doubt many people would use that feature. Handling files on mobile phones is cumbersome at best, most people don't even know where theirs browser downloads are stored.

What much more people would use (IMHO): custom profiles which are stored directly in the browser (Local Storage?). I think of an expanded profile selection list where all custom and customized profiles are listed, selectable for routing and editable (save current profile, move, sort, delete, rename, download, yada yada yada ...). Maybe even a separate tab in the profile editor with all the described features. Just some random thoughts ...

EssBee59 commented 2 years ago

Hello Markus,

Thank a lot for all the informations in your comment!

My request is coming from bike-friends who are not familiar with cut/paste and liked to have a saving function for modified profiles.

I do not know the feature "Storing profiles in the browser itself", but the storage area is not important (assuming the profiles are stored locally, not on the server!), the goal is to ability to reuse in an easy way a private cutom-profile.

FFMbyBicycle commented 2 years ago

There are already some discussions about this "sharing"-function out there and I miss this feature a lot, too :-) I think #26 is the main issue, maybe somebody should close the other ones to avoid confusion...

EssBee59 commented 2 years ago

Hello FFMbyBicycle,

Thank you very much, very good averview of the existing resquests! I think, with the exception of #299 and #300 all the requests have the same goal, they differ some times by the suggested technical solution. Also #456 could be covered by this request (using cookie)

I will try in the next weeks to create a kind of prototype (proof of concept) for the solution i suggested above (new icon to download / upload the cutom-profile, optionally set a cookie to upload a profile at session start)

Of course, this only make sense if a solution / implementation for #26 do not exist till yet???

nrenner commented 2 years ago

I'm currently working on the Profile class for #68 and would prefer if there were no concurrent developments that will cause conflicts and make it harder to merge.

Remembering the last pasted/edited custom profile is covered by issue #127 Local storage of custom profile and load by default when there is one.

My personal roadmap is to work on profiles as the next bigger task, scheduled in the after next milestone. The idea was to think about and discuss an overall concept along with implementing #26, including import/export and potential local storage.

EssBee59 commented 2 years ago

Thank a lot Norbert for the information!

I agree, it is better to think longer on the change about the profiles before making a decision. I will work on the solution I suggested above and will report the test results, it may take some weeks. Regards

EssBee59 commented 2 years ago

Hello,

As promized I created a prototype:

The features: 1-Download the active profile in the download directory from browser

2-Upload and activate a locally stored profile Optionally set this profile as start profile for future brouter sessions (saving the profile-content in the browser localStorage)

3-clear the "own start profile" option, returning to the default profile of this Brouter-instance

Limitations/restrictions: a- As described, the profiles are store in the download-directory, a user special directory is not supported

b-the code is I think well running, but not ready for a pull request (2 new js modules were created, index.html is of course extended, minor chnage in index .js)

This implementation is using parts of many suggested solutions, I hope it covers most of the requests related to profiles! (save a user-profile, upload a locally stored profile, exchange of profiles with friends/communities, use a custom-profile at startup...) Tests are now possible in my test-instance! regards Essbee

AntoineLu commented 6 months ago

Best would actually be to be able to upload a profile from a URL. This way, we could store our profile on our personal github for example and then just upload it from a "raw" url to the file.