Skip to content
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

LibreJS compatibility #8084

Closed
TechnologyClassroom opened this issue Oct 14, 2020 · 4 comments
Closed

LibreJS compatibility #8084

TechnologyClassroom opened this issue Oct 14, 2020 · 4 comments
Labels
chore Improvements to the iD development experience or codebase wontfix-low-impact Doesn't improve the user experience enough to spend time on

Comments

@TechnologyClassroom
Copy link

It would be nice if iD became LibreJS compliant.

Instructions:

@matkoniecz
Copy link
Contributor

matkoniecz commented Oct 18, 2020

What would need to be changed?

Why it would be useful?

See openstreetmap/openstreetmap-website#2886

Comments such as

iD editor which is included in this repo has 74 direct dependencies: https://github.com/openstreetmap/iD/network/dependencies and many more indirect ones (some of which are only dev dependencies). Tagging those in the source code doesn’t seem feasible at all.

and

There are probably a hundred or more different pieces of javascript and they're changing all the time - we're not going to go round trying to catalogue them with some esoteric labels just because you're chosen to shoot yourself in the foot.

by people with experience in making software make me skeptical about this proposal.

@TechnologyClassroom
Copy link
Author

Some indication that the code is available would be helpful at least. I did not know the frontend was freely licensed after using the site for several years. LibreJS is one solution. Simply adding a link to this repo would solve the need for most people.

When viewing the minified JS, the code is mostly useless and acts more like a binary in practice. Linking to the unminified version would help this issue. With minified JavaScript, the comments and variable names are removed making it very difficult to understand.

Can you point me to the process that bundles and minifies the JavaScript so I can get a better grasp on the process?

@kymckay
Copy link
Collaborator

kymckay commented Oct 23, 2020

@TechnologyClassroom The scripts in package.json are what you're looking for:

"dist:min:iD": "uglifyjs dist/iD.legacy.js --compress --mangle --output dist/iD.min.js",

dist:min:iD handles minification (by calling uglifyjs), the file being minified (dist/iD.legacy.js) is output by rollup (bundler) via the build:legacy script:

"build:legacy": "rollup --config config/rollup.config.legacy.js",

@quincylvania
Copy link
Collaborator

dist:min:iD handles minification (by calling uglifyjs), the file being minified (dist/iD.legacy.js) is output by rollup (bundler) via the build:legacy script:

This is true, but we actually sync the dist/iD.legacy.js file directly to openstreetmap-website, and then they run it through their own minification script. The dist/iD.min.js file is for other downstream apps that don't have their own compression workflow.

Some indication that the code is available would be helpful at least. I did not know the frontend was freely licensed after using the site for several years. LibreJS is one solution. Simply adding a link to this repo would solve the need for most people.

There's info in the help pane. We're not hiding that we're open source, we hope people see this and come contribute!

Screen Shot 2020-10-23 at 12 23 55 PM

LibreJS sounds like a nice-to-have, but I doubt it affects many mappers at all, so it's really not a high priority. Since openstreetmap-website isn't pursuing compatibility, and since we have a lot of other stuff to worry about, I'm closing this as low impact. I'd still welcome a pull request if anyone is feeling inspired, provided the changes aren't breaking or hard to maintain.

@quincylvania quincylvania added wontfix-low-impact Doesn't improve the user experience enough to spend time on chore Improvements to the iD development experience or codebase labels Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Improvements to the iD development experience or codebase wontfix-low-impact Doesn't improve the user experience enough to spend time on
Projects
None yet
Development

No branches or pull requests

4 participants