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

Possible refactoring of the code base #38

Closed
FloChehab opened this issue Apr 18, 2020 · 5 comments
Closed

Possible refactoring of the code base #38

FloChehab opened this issue Apr 18, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@FloChehab
Copy link
Contributor

FloChehab commented Apr 18, 2020

Hi @cracker0dks
First of all, very nice project :)

Due to the confinement I have a bit of extra free time. @jb-leger is interested in adding a pressure sensitive feature and suggested I take a look at it. I did a little POC here https://github.com/FloChehab/whiteboard/tree/feat/pressure_drawing .

By doing so, I was thinking about updating the code base to ES6+ and adding some tooling (webpack, babel, etc.) to change the way libs are handled, simplify the code base and make it easier to dive in / extend.

As this would require a big refactoring / rewrite, adding dependencies, etc. I wonder if you'd be interested in such a thing: I won't do it, if you don't want it.

@cracker0dks
Copy link
Owner

oh, I thought about the pressure feature as well. Nice Demo! As improvement maybe disable the feature on pc or devices without the pressure function, because they are not able to draw a long thin line anymore :)

Thanks for your offer.
A refactoring would be nice. I personaly like apps where you don't need to build for every little change you make in the code. So don't know if we really need a build system for such a "small" project. Do you find it hard to add / change things in the project? Where do you see the biggest problems right now?

@cracker0dks cracker0dks added the enhancement New feature or request label Apr 18, 2020
@FloChehab
Copy link
Contributor Author

FloChehab commented Apr 18, 2020

I do like simplicity. Still, I personally prefer when things are a bit more modularized / in several files. Which requires some kind of a build chain with Javascript.

I see the following other advantages of having a JS build chain:

  • Being able to use latest Js features (great for devs) while still transpiling to "older" Javascript for compatibility,
  • Bundling your dependencies with your code,
  • Outputting one single Js file so you are sure things are executed in the right order,
  • Creating uniquely identified Js files so you don't have to worry about browser caching when releasing a new version.

Also with Javascript we should be able to have hot reloading so it wouldn't be necessary to reload the webpage or rebuild in dev.

If you are ok, I can take a bit of time to set up such a build chain for this project ; we shall see if we move forward with a bit of refactoring later.

@cracker0dks
Copy link
Owner

ok, lets give it a try. Please keep it simple :)

@FloChehab
Copy link
Contributor Author

Well, it took me a bit more time than I thought, but the result is here: #39

Even if I don't know how I could make it more complicated, I think it is fairly simple :)

@cracker0dks
Copy link
Owner

Thanks again 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants