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

Node shapes #884

Merged
merged 10 commits into from
Feb 22, 2016
Merged

Node shapes #884

merged 10 commits into from
Feb 22, 2016

Conversation

foot
Copy link
Contributor

@foot foot commented Jan 29, 2016

Fixes #659.
Fixes #878.
Fixes #826.

@foot
Copy link
Contributor Author

foot commented Jan 29, 2016

gif of new shapes!

@foot
Copy link
Contributor Author

foot commented Jan 29, 2016

Shapes not finallll..

@tomwilkie
Copy link
Contributor

I love it.

  • Is the shape hard coded into the frontend? How do you choose?
  • I think we could add a 'shape' and 'group' (bool) field to a node details struct and have the backend send you this if you like?
  • The hexagon should be use for k8s, for sure

@foot
Copy link
Contributor Author

foot commented Feb 1, 2016

We are dispatching on the tail of the topo's URL (containers|containers-by-name...). pseudo nodes are drawn as circles and theinternet is special cased. [0]

Solutions:

  1. Add type: (host|container|app), grouped: (true|false) props to the node data.
  2. Add a shape: (circle|square|stacked-circle|cloud) and let the BE choose.

I prefer 1. but if 2. makes more sense we could do that.

[0]

const nodeShapes = {
  'hosts': NodeShapeCircle,
  'containers': NodeShapeHex,
  'containers-by-hostname': stackedShape(NodeShapeHex),
  'containers-by-image': stackedShape(NodeShapeHex),
  'applications': NodeShapeRoundedSquare,
  'applications-by-name': stackedShape(NodeShapeRoundedSquare)
};

function isTheInternet(id) {
  return id === 'theinternet';
}

function getNodeShape({id, pseudo, topologyId}) {
  if (isTheInternet(id)) {
    return NodeShapeCloud;
  } else if (pseudo) {
    return NodeShapeCircle;
  }
  return nodeShapes[topologyId];
}

@paulbellamy
Copy link
Contributor

Don't forget pods and services.

@foot
Copy link
Contributor Author

foot commented Feb 1, 2016

Do pods and services exist in the system at the moment?

@paulbellamy
Copy link
Contributor

Yes, but only if connected to a k8s cluster.

@davkal
Copy link
Contributor

davkal commented Feb 1, 2016

Don't forget pods and services.

Maybe the drop shape from the style studies for pods?

And for services maybe a "S" that is a circle? Like
screen shot 2016-02-01 at 12 17 15
Or maybe that is trying to be too smart

More importantly, we need a fall-back shape that gets applied when developing new topologies. Maybe a non-rounded rect?

@tomwilkie
Copy link
Contributor

I'd prefer if the ui didn't hard code any topology names, as we want the
user to be able to define there own topologies when we add the dsl.

On Monday, 1 February 2016, David notifications@github.com wrote:

Don't forget pods and services.

Maybe the drop shape from the style studies for pods?

And for services maybe a "S" that is a circle? Like
[image: screen shot 2016-02-01 at 12 17 15]
https://cloud.githubusercontent.com/assets/859729/12715989/c9f403ce-c8dd-11e5-8da1-4a499b8f63a7.png
Or maybe that is trying to be too smart

More importantly, we need a fall-back shape that gets applied when
developing new topologies. Maybe a non-rounded rect?


Reply to this email directly or view it on GitHub
#884 (comment).

@tomwilkie
Copy link
Contributor

I'll take a stab at adding this to the backend today.

@tomwilkie
Copy link
Contributor

Just wondering if the stacks would look slightly better if the stacked diagonally (vs the current vertical)?

@tomwilkie
Copy link
Contributor

We should also make the uncontained nodes on the containers view a stack of squares, as they are processes...

@tomwilkie tomwilkie assigned foot and unassigned tomwilkie Feb 5, 2016
@errordeveloper
Copy link
Contributor

Very nice!!

@tomwilkie
Copy link
Contributor

Have rebased. Pseudo nodes don't seem to be honouring backend shapes.

@foot
Copy link
Contributor Author

foot commented Feb 8, 2016

Yes I think there is some code in there that forces pseudo = circle. Will fix. And review.

@foot
Copy link
Contributor Author

foot commented Feb 8, 2016

@davkal LGTM

@foot
Copy link
Contributor Author

foot commented Feb 10, 2016

Sooo!

Rational behind the current shapes:

  • Apps/processes: Rounded square. Alternatives: Simple Gear, Hexagon
    • Common association now w/ mobile apps etc.
  • Containers: Hexagon. Alternatives: Rounded Square
    • npolys have an association w/ the container world thanks to k8s.
    • Squares have harsh sharp edges, rounding them would confuse them with Apps. (We could choose another shape for Apps...).
    • Vertical Hexagon gives visual illusion of a 3D cube
  • Hosts: Circle
    • It is the graph super shape. Circles are the base of most graphviz.
    • Host is the super node in the system, nothing beats host, maybe data-center.

@foot
Copy link
Contributor Author

foot commented Feb 10, 2016

I mocked up proc:gears and container:squares, unfortunately squares feel very natural as containers.

alt shapes

But cogs are a bit complicated. Hex maybe.

@foot
Copy link
Contributor Author

foot commented Feb 10, 2016

Re: diagonal stacks, I think they give too much of a 3D feel to our otherwise very flat UI.

screen shot 2016-02-10 at 17 45 55

@foot
Copy link
Contributor Author

foot commented Feb 10, 2016

Nicer, more subtle cog shape, evokes associations w/ ports/connections i think.

screen shot 2016-02-10 at 18 00 21

@davkal
Copy link
Contributor

davkal commented Feb 10, 2016

Re diagonal shapes: I'd keep them as top perspective. you could try having the vanishing point on the right (instead of the bottom), like in the detail cards

Re cogs for processes, I think they are overloaded with "system" or "settings" semantics.

@foot
Copy link
Contributor Author

foot commented Feb 11, 2016

nice thought re: perspective, will try.

Cool. So initial node shape choices seem like a good starting point for everyone it seems. Maybe we can merge this in and see what complaints come in.

@foot
Copy link
Contributor Author

foot commented Feb 11, 2016

I like the gentle perspective!

Vertical feels like looking down onto the topo and makes the highlight shape more natural.

screen shot 2016-02-11 at 21 48 15

@foot foot force-pushed the node-shapes branch 2 times, most recently from 09383a6 to eb1da8b Compare February 15, 2016 17:35
@foot foot changed the title [WIP] Node shapes Node shapes Feb 15, 2016
@foot
Copy link
Contributor Author

foot commented Feb 15, 2016

@pidster check it out and have a play when you get a chance! Great to get your feedback on this one.

@pidster
Copy link
Contributor

pidster commented Feb 15, 2016

Tom's suggestion for the stacks showing as 1x, 2x and all >2x as 3 layers is a good idea.
An aggregate that indicates multiple but only has one member will be confusing.

@pidster
Copy link
Contributor

pidster commented Feb 15, 2016

The vertical perspective stack looks great.

So, where does it stand now: Processes are squircles, Containers are hexagons (or cogs?) and Hosts are circles? (I tend to agree that cogs now have an association with 'settings').

Are the line weights the same in all of the shapes, or is that just a side-effect of the cog rendering?

@foot
Copy link
Contributor Author

foot commented Feb 17, 2016

The variants, in a classic rustic saddle brown.

screen shot 2016-02-17 at 09 27 47

@davkal
Copy link
Contributor

davkal commented Feb 18, 2016

An aggregate that indicates multiple but only has one member will be confusing.

@foot while I like the gray disks a lot, I concur with @pidster
Could we get rid of the gray ones?

@foot foot force-pushed the node-shapes branch 2 times, most recently from b2423d5 to 47aee90 Compare February 22, 2016 11:40
foot and others added 10 commits February 22, 2016 12:42
- circle
- rect (w/ radius)
- fluffy cloud shape
- hexagons
- stacks
- They get a little bit smaller as they go down.
- Small tweak for shape stacks + high contrast mode.
E.g. greying out the bottom 2/3 visual nodes if the stack actually only
has a single node.

- Server returns "node_count" for agg nodes.
- May give the feeling something is not there when it should be, or
  incomplete.
- They create visual noise
We're not using greyed out lower stacks for now.
foot added a commit that referenced this pull request Feb 22, 2016
@foot foot merged commit 88684aa into master Feb 22, 2016
@foot foot deleted the node-shapes branch February 22, 2016 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants