publiclab / leaflet-environmental-layers

Collection of different environmental map layers in an easy to use Leaflet library, similar to https://github.com/leaflet-extras/leaflet-providers#leaflet-providers
https://publiclab.github.io/leaflet-environmental-layers/example/
GNU General Public License v3.0
99 stars 77 forks source link

Use ES6 syntax and babel . #239

Open sagarpreet-chadha opened 5 years ago

sagarpreet-chadha commented 5 years ago

Let's refactor code to use the ES6 syntax . Advantages : Less code , more features :)

And ofcourse add babel integration to support all browsers .

alaxalves commented 5 years ago

YES!!!!

j-bitmaker commented 5 years ago

Great opportunity! Can I help you with refactoring?

sagarpreet-chadha commented 5 years ago

Yes i was thinking of starting the work this weekend, but you guys can start early in a branch named refactor_es6 and i can jump in later . Thanks!

deboragaleano commented 5 years ago

Hi, I'm an Outreachy applicant and would like to make my first contribution (all the first-time-only) have been taken already, could I try to work on this one? Thanks!

mmnoo commented 4 years ago

Yes please! @sagarpreet-chadha, what is the status of your work on the feature_es6 branch? If that work is blocked for whatever reason, could we split this ticket into two? One for updating the code to ES6 and another for just configuring Babel? The latter ticket will allow new work to proceed without having to wait for the rest of the code to update... I'd be happy to work on the Babel ticket. Just let me know, and I will create one. :)

sagarpreet-chadha commented 4 years ago

Hey @mmnoo , i started the work some time ago and there is a PR also for the above. I remember i was using the arrow functions inside class and there was some problem with "this" pointer. It was because we cannot use arrow function in leaflet's lifecycle function such as onAdd, onRemove, etc. because we need context's this in those functions. I figured this out but did not get the time to work on it. If you want you can make a PR against my PR and start working. Thanks!

mmnoo commented 4 years ago

Thanks @sagarpreet-chadha. I started working on my own babel-alone branch this morning, and ran into a bunch of issues with a few of LEL's implied global vars when one looks at the files in the example folder. I'm backing out until I understand LEL a bit more.

neelesh17 commented 4 years ago

Is this issue still open I would like to add this to my Gsoc-2020 project.

sagarpreet-chadha commented 4 years ago

Hey, it is not the top most priority as of now. Moreover leaflet is a class based js library, so there is not much es6 migration here. But if you have time and can fit this in your proposal, i would be more than happy to help. Thanks :)

On Wed, 25 Mar 2020, 09:09 Neelesh Singh Thakur, notifications@github.com wrote:

Is this issue still open I would like to add this to my Gsoc-2020 project.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/leaflet-environmental-layers/issues/239#issuecomment-603622538, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSCRRLPNCFOTGY22XIYBOTRJF4FPANCNFSM4ILNDKDQ .