Coder Social home page Coder Social logo

Comments (5)

Engelberg avatar Engelberg commented on August 18, 2024

Would this pull request address your concern? #37

I'll likely be merging it this week.

from ubergraph.

jafingerhut avatar jafingerhut commented on August 18, 2024

Given the description, if @thenonameguy is using :auto-label true as an option to viz-graph, then that PR will not change what they are asking about.

I think it is this line of code they are referring to: https://github.com/Engelberg/ubergraph/blob/master/src/ubergraph/core.clj#L828

and they are hoping that the expression (if (keyword? n) (name n) n) would instead be merely n. That would also cause a slight change in behavior where the colon would now appear before all keywords, whether they had namespaces or not.

from ubergraph.

Engelberg avatar Engelberg commented on August 18, 2024

In my own experience, using name on keywords makes the visualization far more readable, far less cluttered. Aside from the : character, are there other formatting issues that make name a problem for you?

from ubergraph.

thenonameguy avatar thenonameguy commented on August 18, 2024

@jafingerhut thanks, you are correct.
@Engelberg My use case is that I use the namespace feature as a "pseudo-attr" for my nodes.
:node-type-1/foo :node-type-2/foo, etc.
Since the namespace part is dropped via the name fn the nodes are indistinguishable in viz-graph.
I would propose to use: (subs (str n) 1) in place of (name n) so that the colon is dropped. This way no breaking change is introduced and my use case is fulfilled.

from ubergraph.

Engelberg avatar Engelberg commented on August 18, 2024

That sounds reasonable to me.

from ubergraph.

Related Issues (20)

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.