GithubHelp home page GithubHelp logo

Comments (5)

bhauman avatar bhauman commented on August 22, 2024

This is a problem. @pkobrien what do you think about rolling back the sorted-map stuff? This is an assumption we can't make.

Also I have been thinking about just using pprint. And dropping the edn rendering. I'm betting that pprint is probably a lot faster and more stable.

Unless we want to grow functionality into edn rendering like editing difference highlighting etc. But if that isn't going to happen pprint is probably a better fit.

from devcards.

darwin avatar darwin commented on August 22, 2024

@bhauman a side note: I'm rendering maps of different sizes. And sometimes devcards decides to render it as EDN (small maps?) and sometimes as code.

I tried to read sources, but I wasn't able to find the exact place where that decision is made. This part looks like the suspect, but I don't see any problem there:
https://github.com/bhauman/devcards/blob/master/src/devcards/core.cljs#L283-L296

I would like to force rendering to always be "as code" in my use-case. Here is the code for reference:
https://github.com/darwin/plastic/blob/b9f8e10d02ec6440df277700caa6a6861fd17c3e/cljs/src/devcards/plastic/devcards/util.cljs#L57

from devcards.

bhauman avatar bhauman commented on August 22, 2024

There is no explicit forcing of rendering as code or data in the edn renderer. You may be seeing some flexbox layout effects? Hard to know from here. You certainly are banging on this code more than I have :)

from devcards.

pkobrien avatar pkobrien commented on August 22, 2024

I agree this is a problem. I guess I learned something about not assuming that all keys could be sorted. We certainly don't want Devcards to choke while displaying unsortable keys. I think the sorting should be rolled back. I also agree that you probably don't want to be in the business of having to maintain rendering logic so if pprint can be used that would be a good move.

from devcards.

bhauman avatar bhauman commented on August 22, 2024

oh we didn't fix this yet

from devcards.

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.