-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store preferences in OSM profile with fallback to localStorage #3002
Comments
Have you disabled |
BTW, I was wrong before and there actually is a way to store editor preferences with the user's OSM profile. |
Hello @bhousel , @jancborchardt I would like to work on a fix for this. Has anyone already started looking into this? Or has this been fixed? What I plan to do is aunthenticate with the logged in user and send a PUT request with a key and a value which will enable the user to remember his/her choice. I looked around the source code and came across these lines: if (context.storage('sawSplash'))
return;
context.storage('sawSplash', true); which if I am correct means that the localStorage implementation has been done for the time being? |
I'm not sure whether we want to do this. My initial feeling was to just close it as WONTFIX, but I decided to leave it open for discussion. Do we really want to store user preferences in OSM? We do store a bunch of things in localStorage that could just as well be stored in OSM, but we'd need to add the necessary methods to For this to work the user needs to be already authenticated. This is the case when iD is embedded in OSM.org, but not necessarily when iD is used on other sites. |
There's not much precedent for what to store in the user preferences. Anything that is stored should be valid across multiple computers and editor instances, which the iD walkthrough remembering is. If you've gone through the iD walkthrough on osm.org, you don't need to on another site. |
I'm in favor of storing preferences using the API. Maybe just store them all in one JSON blob? |
Since it stores key=values, I think it makes more sense to store individual values for most items. |
@jfirebaugh how about history too? I have been regularly pushing my edits up into the many hundreds and overflowing the localStorage limit. |
Yes I'd also prefer separate |
History isn't a preference, and storing it on the server means that you'll loose if you can't upload, which is when you need it the most. |
Hello, Even I think storing on the API Side would be a nice idea. I would like to look into this. So would need some guidance on this. I guess this will require a new pair of key-value? So how do I add this pair to the user preference list? By the way on this site : http://www.openstreetmap.org/edit?editor=id that popup is visible but it isnt visible on www.openstreetmap.org. Is that the expected behaviour? |
@DarkPrince304 This is not a very good task for a new contributor, but if you really are interested my advice is to look in There is an Code in the global |
See tyrasd/overpass-turbo@d193326 for an example of implementation of http://wiki.openstreetmap.org/wiki/API_v0.6#Preferences_of_the_logged-in_user. |
I was still able to trigger the "Welcome to the iD OpenStreetMap editor" by directly clicking "edit" from the osm.org homepage when not logged in. |
The preference to show third party icons, which the UI implies will be stored, is currently not. I'm assuming fixing that would be part of this bug? |
@jtracey Third-party icons aren't intended to be stored between sessions. The privacy option is about whether to load them at all. |
@quincylvania I know, I'm saying the setting to not do that isn't stored (i.e., I have to disable it every time I load iD). |
The preference should be stored, unless you are using something like incognito mode, or maybe a privacy-focused web browser that throws out the storage. |
I delete local storage when I close the browser, yes. Which is exactly what this issue is about ameliorating, no? |
Yes. |
Currently every time I want to edit on OSM.org, this modal asking me if I’m interested in a tutorial (or just want to start editing) pops up every time. Yes, the new editor is awesome and no, I don’t need a tutorial. ;) At some point in the past I’m pretty sure I did the tutorial and it probably helped me. But now the popup is annoying – every time.
TL;DR: Only show this popup once for a user. When I click »Edit« in the top bar, I want to directly edit. (I assume the tutorial can be accessed otherwise anyway if it’s needed later.)
As @tomhughes said in openstreetmap/openstreetmap-website#1162 (comment), the mechanism for remembering if to show the popup or not is briwser local storage. It would be more appropriate to permanently store it with the user profile because otherwise it will pop up again when switching browsers or devices, clearing profiles, reinstalling etc – everything which has nothing to do with the editor.
The text was updated successfully, but these errors were encountered: