-
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
Add basic browser and platform into to changeset tags #2559
Conversation
If the tags aren't iD specific and are clear in their meaning, I think avoiding namespaces are best. P2 can run on multiple sites, and all editors have a locale. Browser is less relevant for P2, but any future HTML or JavaScript editors will probably find it relevant. |
hmm.. |
Used in changeset tags? |
Add basic browser and platform into to changeset tags
detected.platform = 'Linux'; | ||
} | ||
else { | ||
detected.os = 'win'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does seem odd. If we cant detect anything, we set the detected os to windows? Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
detected.os
is used for only one thing in iD, and that is to setup the keyboard shortcuts in cmd.js.
I suppose win
was just picked as a conservative default for the keyboard shortcut setup. In reality, if the code runs here, the user is probably on a device without a keyboard - like a game console or an Android phone.
This adds some simple info to the changeset tags about browser and platform used.
Reporting this info is useful for some things (see #2449).
Looks like this in practice:
cc @pnorman