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

React version of demo #39

Closed
wants to merge 50 commits into from
Closed

Conversation

joelvh
Copy link
Contributor

@joelvh joelvh commented Feb 27, 2020

This is a port to React.

  • Render HTML layout in React
  • Port all blocks to React components
  • Port event listeners to React lifecycle
  • Create adapter from React to Flowy engine
  • Implement minimizing left card
  • Improve highlighting blocks and toggle right card

This builds on the work in #37 and #38

@joelvh joelvh mentioned this pull request Feb 28, 2020
11 tasks
@joelvh joelvh force-pushed the feature/react branch 2 times, most recently from 8464206 to 3fb7f4b Compare February 29, 2020 06:52
@joelvh joelvh marked this pull request as ready for review March 1, 2020 19:45
@joelvh
Copy link
Contributor Author

joelvh commented Mar 1, 2020

@alyssaxuu the React implementation of the demo is done. This focused on getting the current demo working as a React version, with some bug fixes and the ability to minimize the left card.

I will continue refactoring flowy and the React implementation in another branch to implement new features and fix some buggy flowy behavior when clicking blocks.

Any feedback to get this merged?

@alyssaxuu
Copy link
Owner

Nice! Just wondering how that would merge though - I do want to have a non-React version, so would it be in a different branch/folder? Also there's been some bug fixes/enhancements since you made these commits.

@alyssaxuu alyssaxuu added the question Further information is requested label Apr 3, 2020
@joelvh
Copy link
Contributor Author

joelvh commented Apr 3, 2020

@alyssaxuu the goal here was to keep the non-React version in-tact, separating it from the React-based version. In terms of merging things, we'd look at the new commits and port those updates to this branch. As mentioned in #37, we can also keep the build artifacts in the git repository as working demo code for simplicity of showcasing the output (for React- and non-React-based versions). If you get a chance to checkout this branch, you'll see locally, it's organized as separate sets of code -- again, focusing on keeping the non-React as-is and the React version builds on top of that as an example of how to use it with React.

@vinayakkulkarni
Copy link

vinayakkulkarni commented Apr 27, 2020

damn! I have vue version lying around in my repo..

but yeah, keeping flowy framework free would be the best thing

@AllanOricil
Copy link

damn! I have vue version lying around in my repo..

but yeah, keeping flowy framework free would be the best thing
Could you share your vue implementation?

@joshbedo
Copy link

joshbedo commented May 3, 2020

I'd love to use this if it's still a thing :)

@joshbedo
Copy link

joshbedo commented May 3, 2020

Any way i can pull this react version in as a module or something for my project? @joelvh

Also is this functional? I was trying to get it working in my project but im getting weird errors a few minutes after pages loads with snapping/grabme function and some other things.

@joelvh
Copy link
Contributor Author

joelvh commented May 3, 2020

@joshbedo the demo worked when I created the PR - however, I had started refactoring flowy to use ES6 and @alyssaxuu has decided not to go that direction, nor with NPM. I'm afraid this is a bit outdated now (in terms of having the latest from master). I may come back to this in the future, but unsure as to how flowy will be managed going forward.

@joelvh joelvh closed this May 3, 2020
@vinayakkulkarni
Copy link

vinayakkulkarni commented May 3, 2020

It's MIT Licensed! You can always fork and create your own ES6, Vue, Svelte, Angular, Alpine or even React version of it.

Super glad that @alyssaxuu has kept the philosophy as per her understanding and not being forced of making this into a framework specific plugin/pkg.

Kudos to @joelvh for the feature requests too!

♥ OSS

@joelvh
Copy link
Contributor Author

joelvh commented May 3, 2020

@vinayakkulkarni yep - that's absolutely right. Will revisit when I have time.

@joshbedo
Copy link

joshbedo commented May 3, 2020

@joelvh did you happen to see this error at all when running the React version? Can't seem to get the snapping function to execute properly it keeps erroring out with drag.querySelector is undefined. Not too sure what could be causing this. I've been digging through the source code all day.

Screen Shot 2020-05-03 at 6 36 59 PM

@joshbedo
Copy link

joshbedo commented May 3, 2020

Another screenshot, seems really odd.
Screen Shot 2020-05-03 at 6 47 58 PM

@joelvh
Copy link
Contributor Author

joelvh commented May 4, 2020

@joshbedo are you getting those errors when you run npm run react in the root of my branch? That should launch the React demo.

@joshbedo
Copy link

joshbedo commented May 5, 2020

I was using the react branch you created and ran npm start i believe. I ended up just recreating the vanilla version in React and got it working. Looking through all your code helped a lot though!

@PurplePineapple123
Copy link

I was using the react branch you created and ran npm start i believe. I ended up just recreating the vanilla version in React and got it working. Looking through all your code helped a lot though!

Hey Josh! I'm looking to add this to my project as well :) Would you be willing to share the working react version you created?

@VINCIDAO
Copy link

VINCIDAO commented Aug 1, 2022

Hello

Also trying to import this to react. Any way I can get it?

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

Successfully merging this pull request may close these issues.

8 participants