Git Product home page Git Product logo

prototype's Introduction

prototype

Prototype.

Stage 9: delete nodes

Nodes can now be deleted -- double tap to open the node info box and click 'Delete'.

Also fixes graph deletion bug where graphs would afterward be created with improper graph numbers.

Stage 8: delete graphs

Graphs can now be deleted -- drag to the left to reveal red delete button.

Tappable areas on graph selection screen are now larger. UI slightly less choppy.

Stage 7: persistent graphs and selection screen using ReSwift and UserDefaults

Graphs (nodes and edges) are now persisted across app closures.

We can create and edit multiple graphs.

Also, nodes now display their numbers.

Stage 6: node info; improved node commit coloring

Double-click a node to see the information it contains.

Node commit coloring has been improved -- the ball increases in color and opacity as we drag.

Stage 5: drag to add node; adding and removing edges

Drag to add a new node

To add a new node, drag the node away from its starting point until it becomes completely opaque and then let go. You now have a new node! (If you don't drag far off, the node will snap back!)

Single click to add or remove edges

To add an edge, click a node (turning it red) and then click another node. An edge will be created.

To remove an edge, click a node (turning it red) and then click a node with which it already has a connection. The edge will be removed.

Note:

  • 'enabling or disabling nodes' functionality has been removed until further iterations.
  • be sure to use the app with sound on! ;-)

Stage 4: edit mode

Enabled (red) and disabled (grey) nodes

A node can be enabled (red: showing edges and available to receive new edges) or disabled (gray: hiding edges and not available to receive new edges).

Adding new edges via editing mode (green)

New edges can be created in editing mode.

Double tap any node (enabled or disabled), turning it green. Then single tap any other enabled (ie red) node. An edge will be drawn between the green and red nodes!

Note:

  • double tapping a node also automatically re-enables it, showing its edges etc.
  • when in editing mode, single tapping a disabled node has no effect (disabled nodes cannot receive new edges)

Stage 3: enable and disable nodes

Double tap to enable or disable a node.

Every enabled node connects to (shares edge with) every other enabled node. A disabled node connects to no nodes.

Stage 2: create and remove nodes

Add or remove nodes via simple buttons.

Stage 1: movable nodes with arbitrary edges

Every ball can be moved around and have arbitrary connections with other balls.

Stage 0: movable nodes

Black ball moves around, bounces back to original position. Other balls will stay where dragged.

prototype's People

Contributors

pianostringquartet avatar adammenges avatar

Stargazers

yangfengzzz avatar

Watchers

James Cloos avatar  avatar

Forkers

adammenges

prototype's Issues

UI responsiveness with ReSwift + CoreData + SwiftUI NavigationLink

CoreData and SwiftUI's NavigationLink appear not to play nicely together.

Two intermittently observed issues are described below, and I suspect that in both cases CoreData does not finish saving/creating the data before SwiftUI's NavigationLink sends us to the CoreData-dependent screen. Solutions might involve a queue or the hack workaround described here: https://stackoverflow.com/a/64051395

(There are other known issues with CoreData + SwiftUI, e.g. crashing when a reference is deleted

1. 'Plus ball' unresponsive when graph first created

When we create a new graph, occasionally we are unable to immediately move the 'plus ball' (which, when dragged, becomes a node). The UI element itself is unresponsive -- e.g. dragging the plus-ball does not trigger onDrag callback, clicking does not trigger onTap callback etc.

To do: confirm on different devices; may just be computer performance issues?

buggy_core_data_graph_editor

2. 'Plus ball' not created in time before we navigate to graph creation screen

When we create a new graph, occasionally (when?) the CoreData saving of the 'plus ball' is not completed before SwfitUI NavigationLink sends us to the graph creation screen. The result is that we end up with only a blank screen and a Back button. (Returning to the graph selection screen then going back to the created graph solves the issue.)

To do: determine when exactly this happens and how to fix it. Might be solvable by a queue or awaiting the CD mutation completion.

Screen Shot 2020-11-07 at 9 18 36 PM

Node info editing is hacky

I spent some time looking into editing information on a node using e.g. a popover.

The software keyboard causes rendering and placement issues. But there is likely a solution if this is indeed the UI path we want to take.

(Tested on iPad simulator.)

hacky_node_text_edit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.