malte-wessel / react-textfit

React component to fit headlines and paragraphs into elements
http://malte-wessel.github.io/react-textfit/
MIT License
470 stars 143 forks source link

Refactor #13

Closed chrisdrackett closed 7 years ago

chrisdrackett commented 7 years ago

So I've made some pretty major changes and figured I would submit them to see what others think:

(this also pulls in @tbroadley's changes)

closes #12

tbroadley commented 7 years ago

@chrisdrackett Nice! Just a comment: I wrote the bugfixes branch so that I could include my fork of react-textfit in a project directly from Github, rather than pulling the released version from NPM. I would suggest including just the changes from https://github.com/malte-wessel/react-textfit/pull/10, rather than all the changes from the bugfixes branch.

chrisdrackett commented 7 years ago

Unless this branch actually gets merged I'm doing the same :) that being said, I probably should separate the two.

tbroadley commented 7 years ago

Aha makes sense :)

malte-wessel commented 7 years ago

Sorry guys, I don't want to change the whole API. Would be cool if each change would be a single PR.

chrisdrackett commented 7 years ago

@malte-wessel I want to understand your thinking on the API and the future of this project so I can decide how best to move forward with my work. My goals with this work was to update the API to solve some of my confusion and similar confusion coming from issues on this repo. I'm pretty happy with what I came up with, but understand its a big change and might still need some work and improvement.

If there isn't a place for this new thinking in this project I'm happy to create a new project, but my work is similar enough (and uses just about all your code) that I feel like it is worth keeping it here if that is a possibility.

I'm happy to break what I did into smaller chunks and/or start a 2.0 branch, but I want to make sure that work in welcome before I put in the effort.

/cc @tbroadley

denis-sokolov commented 7 years ago

@chrisdrackett, @tbroadley, please note the updated code in master.

Small PRs implementing a small feature or a bug fix are very welcome.

For big features and bug fixes, you are encouraged to discuss them in issues before implementing, so that in case there are disagreements you won’t lose any effort.

Consider avoiding PRs that are about refactoring, or PRs that have a lot of unrelated changes all in one.