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

[WIP] Sortable class and conversion to ES6 #397

Closed
wants to merge 3 commits into from
Closed

[WIP] Sortable class and conversion to ES6 #397

wants to merge 3 commits into from

Conversation

jmuzsik
Copy link
Contributor

@jmuzsik jmuzsik commented Mar 25, 2018

Hi!

The primary focus is to convert the sortable function into a class. Basically, I aimed for smaller modules at first then settled for big ones in the end that I can make smaller in the future. This, and the main() function is basically an extension of the original function as it does everything that occurred prior.

Still quite a bit of work to do, mainly I ought to focus more on Typescript and smaller modules as I mentioned.

Otherwise, to silence the linter I had to capitalise the class and change all corresponding references in other files.

Hope it all works the same, made sure that tests all pass, though I had to silence the linter in a few test files because it did not like me doing: new Sortable(...), ie. using it as a side effect.

Thanks!

@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 79.412% when pulling 31106dc on jMuzsik:sortable_class into 267e5de on lukasoppermann:master.

@lukasoppermann
Copy link
Owner

Hey @jmuzsik,

thanks for this work. However I will not merge this. While I do really want to turn this package into a class (see branch class) I want to do it differently.

My current plan is to clean up everything and turning the package into a class only when it can be done very cleanly and easily. There is much work to be done before this is possible.

For example the whole data situation needs to be solve, which is what I am currently working on.
Also all functions need to be cleaned up and condensed. And the dependencies on global variables (with the exception of the store) need to be removed. You basically had to move everything into the class, because of the way the package is currently structured. This makes the class very overwhelming. The class should mostly delegate to small modules so it is much easier to understand.

I hope you understand my reasoning, if not, please do let me know and ask any questions you have.

Also: could you please send a PR with only your changes from src/types/main.d.ts and tsconfig.json. This can be easily merged. If you want I would be very happy to discuss aspects where you can help extract and improve functions of the current code to move us more towards being able to create a good and simple class.

Thanks.

@jmuzsik jmuzsik closed this Mar 25, 2018
@jmuzsik
Copy link
Contributor Author

jmuzsik commented Mar 25, 2018

@lukasoppermann ok I understand! Either way I see most of what I am doing as an experience rather then some sort of expectation driven PR's.

I'd like you to point the way as to what you'd like me to do then, as you mentioned, seeing as you have a very clear picture of what to do as, quite obviously, it's impossible for me to have as clear a concept as to what needs to be done then you do. I'm open to whatever you recommend, obviously I am more junior a coder but with some time I can figure out most tasks.

@lukasoppermann
Copy link
Owner

Hey, I will write you some options of what would be helpful tomorrow and you can see what is interesting for you. Also I would really appreciate the two things I mentioned in a PR.

It is always complicated to see a vision from the outside. Also my not wanting to move into the class yet has nothing to do with your code, but just that the package's current code is not refactored enough yet to transfer it into a clean class.

Either way I am very happy to have you contributing. 👍

@lukasoppermann
Copy link
Owner

Hey @jmuzsik, the following things would be very interesting for the project:

Just let me know which one you are interested in and we can discuss the approach in more detail in the specific issue. 😃

@jmuzsik
Copy link
Contributor Author

jmuzsik commented Mar 26, 2018

@lukasoppermann Definitely appreciate this project, I am quite new to programming and am switching careers towards it soon so this experience is invaluable.

I'm gonna have a go on adding touch events. I just started reading about it and it appears to be something that, while it will be quite a work to implement would nonetheless be very interesting work to do.

I'd defintely need to do much research and get a better understanding of how the library works prior though. I'll being working on it today but it may be some time before I have anything that works properly but I will push [WIP] branches here and there.

Thanks!

@lukasoppermann
Copy link
Owner

Hey @jmuzsik,
I am very happy that you are using this project to improve your skills. This is a really cool thing, as you get experience and also benefit the community by improving this project. 👍

Working on touch event issue sounds very good. If you have any questions please just asked them in the [WIP] PR and I will try to help out. Feel free to push a non-working PR as well. Looking forward to it. Cheers!

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

Successfully merging this pull request may close these issues.

None yet

3 participants