Comments (6)
OK, this is something I've been preparing myself for a while now. This change represents the hardest code in the application so far, so it will probably take a while to get it right.
Below is a sample problematic situation we can get into today:
action 3
is a child of both:
question 2
question 3
which results in some problems:
- it and its children should not be rendered twice
- each icon should only be rendered once
- there can be multiple connections from a child to its parents (we already have multiple connections from a parent to many children)
from drakon-renderer.
A reasonable next step would be to flesh out the troubleshooting mode with:
- replace max width with an actually useful information like origin coordinates
- a bool signifying whether an icon has already been rendered
from drakon-renderer.
OK, origin coordinates for troubleshooting done:
from drakon-renderer.
I added a comment to the TODO function a while ago which stated:
-- we should have a bit of new logic here:
-- if, while iterating through the list of icons, you come across an icon
-- that is already in the returned collection of triples (rendering order, max width, (coordinates, diagram))
-- take that found end icon from the returned collection and mappend a connection to the new parent node to it
Now that I:
- started working on adding the "already rendered" troubleshooting indicator
- took the time to read the code very carefully
I realised that it would be impossible. That collection of triples I mentioned only contains nodes that are assigned to the current node as children - it doesn't contain all graph nodes. I will have to rethink how we keep track of already rendered nodes...
from drakon-renderer.
So at this stage I'm convinced that while rendering individual steps, we shouldn't also connect to their parents as, if we spot a new parent while iterating through the list of icons, we would have to retrace back to that already rendered icon and then connect it to the newly found parent. I feel it's unnecessarily complicated.
Additionally, I realised that even if I remove the functionality that connects newly rendered icons with their parents, the positioning will still be wrong (it already is wrong). Icons should not be rendered if they are already rendered.
I fear I will have to rethink this general group of functions:
[Icon] -> [Diagram]
from drakon-renderer.
Transferring the issue here to assign it to a roadmap project: #22
from drakon-renderer.
Related Issues (20)
- Introduce type step
- start and end steps
- text in steps
- no arrows, just straight lines HOT 1
- implement decision step HOT 9
- debug mode HOT 3
- represent diagrams using recursive data types as apposed to lists HOT 1
- multiple connections to end step HOT 2
- use maps instead of lists HOT 1
- cabal project HOT 1
- stop using the βnamedβ function
- Represent simple drakon diagram using the directed graphs. HOT 1
- hlint HOT 1
- make as build system
- change how debugging info is displayed
- more convenient input HOT 7
- N parents where N > 1 and N < 10
- String -> [Icon] input
- not happy with the "programming in haskell" parser
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drakon-renderer.