-
Notifications
You must be signed in to change notification settings - Fork 597
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
Continue the development based on source code from tylingsoft/dagre-layout #232
Comments
Happy to see the enthusiasm and I'd love to pull changes upstream. I would suggest that we do this as focused patches. W.r.t. the changesets, some comments:
+1
I'm willing to do this if someone is demonstrably willing to support this. In other words, potentially down the road, but definitely not the first patch set. I don't personally have the time to invest in a new package manager.
+1.
I would be fine making the switch to ES6 provided we can transpile to reasonable ES5 for IE11.
This is another case where what is there seems good enough. Happy to discuss further the benefits we'd get from this switch. This would also require someone committed to supporting it.
OK, provided we get some clear benefit.
Not a big fan or rewriting all of the tests. If there is a way to support the mocha tests in Jest and migrate over time that would be more palatable.
We currently have this with Istanbul. What do you propose changing here?
I believe we still have folks using this. If there is a better solution for distributing the library for the web, I'd be open to potentially replacing this.
Depends on the context. Willing to look at the changes.
+1 for this in general. We do need to include the dist files currently to support bower. |
My 2c as a consumer of the library:
No opinion
Latest version of NPM includes a lock file which negates the main benefit of yarn.
+1 - I switched to chrome headless from PhontomJS without too much pain.
+1 - With es5 support via babel or equivalent (can Babel generate TypeScript type/definition files?). If it was myself I would switch to TypeScript altogether.
+1 - The current bundling never "just worked" for me.
No opinion
No opinion
No opinion
+1 - I dropped my bower usage a while back (and would have thought >95% of folks are now using npm), plus npm can pull direct from GitHub thus emulating bower support.
No opinion
+1 (on principle) |
@tylerlong can you create a separate issue for each of those items so we can track and discuss them separately? Added #233 for the last one already. |
Hi guys, Thank you for the feedback. For all the items that I propose, I have already done them in https://github.com/tylingsoft/dagre-layout, so there is no "who is going to do the hard work?" concern. The only concern is: if we don't accept all of them, I might need to revert those we don't accept. Let me explain each of them in detail 1. Upgrade all the dependencies (including loadash 3 => 4)It's always a good idea to upgrade all the dependencies to the latest stable version. Because new versions of libraries contain improvements and bug fixes. And it's a good idea to be up-to-date. 2. Yarn instead of NPMI use Yarn for its speed. It's normally faster than NPM. And it is very similar to NPM. Just remember to replace "npm install" with "yarn add" and you are good to go. With above being said, I agree that there is nothing that Yarn could do but NPM couldn't. So it's not a must-have change. 3. Get rid of PhantomJSThe reason is pretty convincing: PhantomJS has been discontinued. It's dangerous to depend on something abandoned. 4. ES6 instead of ES5Just to stay up-to-date. And we will build ES5 distribution files for compatibility. And it is common practice to do so. And we won't have issue to support IE 11. 5. Use webpack instead of browserifyNowadays webpack is way more popular than browserify. I would choose browserify if it's 2014, but it's 2018. Check this google trends page: https://trends.google.com/trends/explore?date=today%205-y&q=webpack,browserify 6. Use JavaScript Standard Style instead of JSHintJavaScript Standard style is opinionated. But JSHint belongs to 5 years ago. Most people use ESLint now (JavaScript Standard style is based on ESLint) 7. Use Jest for testing
I have already done the hard work. Please check https://github.com/tylingsoft/dagre-layout/tree/master/test Just clone the project, run "yarn install" followed by "yarn test" to confirm that all the tests pass. 8. Add test coverage report
And it is powered by Jest. We can use Jest for both testing and coverage and it's one more reason to use Jest. 9. Remove Bower supportPlease google search is bower dead People can continue to use the already published bower packages. We just don't release new versions to bower any more. I don't get the point of bower. NPM is a much better option. If you don't want to use NPM, you should use CDN. All the NPM packages have free CDN: https://unpkg.com/dagre/ 10. Use 0 instead of Number.NEGATIVE_INFINITYI don't remember why I changed it(maybe I thought it's shorter to type and it seems to be elegant). But I have done the change and it just worked.
Please check https://github.com/tylingsoft/dagre-layout. Search for 11. Git ignore auto-generated codeI guess nobody is against this idea. And if people want prebuilt content, here it is https://unpkg.com/dagre@0.8.2/dist/ (We do publish prebuilt content to NPM and all the NPM packages have free CDN) |
@lutzroeder @cpettitt I do think it is necessary to create separate issues. But my overall suggestion is to apply all of them as a whole instead of applying them one by one. Becausehttps://github.com/tylingsoft/dagre-layout was forked in Sep, 2017 and it's not long ago. I have done much more work(I already posted a list of changes above and it is not exhaustive) in tylingsoft/dagre-layout than you have done here since Sep, 2017. There are two options:
Option 2 is much easier. PleaseEvaluate https://github.com/tylingsoft/dagre-layout and see if it is in a good and modern status. And please think about: is it OK to override this project' code base with it? Personally I am pretty confident in tylingsoft/dagre-layout. |
I would like to try this with option 1, for two reasons:
I also like Lutz's proposal to split this out into separate tickets so we can have more focused discussion. |
Understood. It's a community project so we should make everybody on the same page. |
I will try to create separate issues today. But I am not able to implement them recently because it is Chinese New Year 🇨🇳 🎉 . I will take a 10+ days holiday from tomorrow on. |
No problem - we can pick them up when you have time. Happy Chinese New Year! |
@tylerlong did you ever get a chance to get back to this? would be great to get some of these changed merged upstream |
Disclaimer
This is just a proposal. I think it is good for the future of dagre but it's just my opinion.
About tylingsoft/dagre-layout
I am the author of tylingsoft/dagre-layout. It is essentially a forked version of dagre. It was started in September 2017, back then dagre was not being actively developed and I decided to make lots of major changes. So started it as new repo instead of a forked repo.
Changes I have made
The list above is created afterwards so it's not exhaustive. I also remove lots of unused files to simplify the project.
What I propose
Copy source code of tylingsoft/dagre-layout to override dagrejs/dagre, and all of us continue the development on dagrejs/dagre.
Why?
Overall I think tylingsoft/dagre-layout is way more modernized. Yarn, ES6, webpack, Jest ... etc.
Concerns
There are some opinionated changes. For example, I removed PhantomJS because it is discontined. I also removed bower support because bower seems to be discontinued too.
Originally I created tylingsoft/dagre-layout for my personal usage and didn't intend to contribute it back. So I might need to make some changes to make everybody accept it.
The text was updated successfully, but these errors were encountered: