superfluid-finance / superfluid-explorer

The new and improved Superfluid Explorer, built with SDK-Core, SDK-Redux & Next.js & MaterialUI
https://explorer.superfluid.finance
MIT License
22 stars 28 forks source link

[CONSOLE] UI errors in Map view #218

Open MidnightLightning opened 8 months ago

MidnightLightning commented 8 months ago

Overview

User story: As a visual learner who wants to understand the streams coming in and out of an address, I want the "map" view to be as understandable as possible, with no visual distractions that would hamper my understanding of the visualization. I want as clean a visual as possible to be able to screenshot it and share with others as an explanation for what's happening with my or their wallet.

User Persona/Target Audience: Visual learners who wish to use and share the Map view to explain the current state of streams to/from an address.

Deadline: ??

UI/UX Design:

image The central node of the graph has extra links both top and bottom that appear to be connecting the central node to themselves. Those are not needed and visually distracting from the other connections.

image

Acceptance criteria

Links/Resources

Readiness criteria

kasparkallas commented 8 months ago

Thank you for the issue!

I can't promise when I'd get around to this. Maybe you're interested in submitting a PR yourself?

This is the component that renders the diagram: https://github.com/superfluid-finance/superfluid-console/blob/313c023235f9cad965fefa53398f049d133ddedb/src/components/Map/Map.tsx#L40

The part that configures how ReactFlow looks is straightforward. The positions of the nodes are set by simple multiplications (e.g. position: { x: i * 300, y: 100 }). The connection points of the edges are not configured at all, i.e. they're the default.

I haven't investigated this much but I have a hunch ideally we'd use an auto-layout algorithm: https://reactflow.dev/learn/layouting/layouting & https://reactflow.dev/examples/layout/auto-layout

kasparkallas commented 7 months ago

Hey @MidnightLightning

I ended up hacking together this separate app to experiment with full range of possibilites for the visualizations: https://supervisual.netlify.app

Example link (everything is perfectly stored in the URL): https://supervisual.netlify.app/?chain=10&tokens=0x4ac8bd1bdae47beef2d1c6aa62229509b962aa0d,0x1828bff08bd244f7990eddcd9b19cc654b33cdb4,0x8430f084b939208e2eded1584889c9a66b90562f&accounts=0x605a2903c819cfa41ea6dd38ae2d1aaf6d01ec33,0x4ea8d965e3337afd4614d2d42ed3310ad7d0b550,0x2a90d7fdcb5e0506e1799b3ed852a91ac067d36e,0x82d28b941db301ea7f32d4389bbb98b1a3ea3235