SIU-CS / Flowchart-Creator-production

0 stars 1 forks source link

Rendering and sending flowchart data #59

Closed regexpressyourself closed 7 years ago

regexpressyourself commented 7 years ago

Properly render and save flowchart data

or how I learned to stop worrying and love CSS and Javascript

This pull request will implement: proper step rendering and posting of flowchart data. Upon completion, this should check off #23, #14, #8, and #7, as well as part of #58 .

Rendering work

Rendering work includes:

  1. Children steps are rendered by their parents
  2. Top-level steps (without parents) are rendered by the canvas
  3. Siblings are rendered on the same row/tier
  4. Steps will be implemented as block-displayed elements, making sure they don't run into one another
  5. Lines will connect steps to their parents and siblings

Post data

Added to the pull request is a button posting flowchart data to the backend. The function handling the post can be found in the Canvas.jsx component, and the button itself is in the FlowchartNav.jsx component. Posting data:

  1. Gets the flowchart id from the url
  2. Sends a post request to /Flowchart/Edit/{id}
    1. The request contains JSON data in the form: { data: [ {stepObject1}, {stepObject2}, ... ,{stepObjectN} ] }
regexpressyourself commented 7 years ago

@taylorflatt @reidtevonian @Mikey1848 Here lies more work

regexpressyourself commented 7 years ago

Woo yeah! We got lines, we got steps, we got trees! We're rolling now!

taylorflatt commented 7 years ago

Did you debug this to verify that it would actually posts to the correct method in the controller? I noticed your other one and apparently my comment didn't post even though it did on my end. >:[

regexpressyourself commented 7 years ago

@taylorflatt It is posting, yeah. It gets a 400 error on post.

post