Comments (5)
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.
@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.
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.
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.
oh we didn't fix this yet
from devcards.
Related Issues (20)
- How to render devcards into a HTML element other than #com-rigsomelight-devcards-main? HOT 6
- defcard-rg without a name causes compilation error HOT 2
- Document way of forcing a re-render HOT 1
- Feature: render small preview on the devcards overview page
- Devcards 0.2.6 doesn't work with shadow-cljs HOT 5
- Compile warning: var devcards.core/test-doc is not public HOT 3
- Updating react and react-dom versions for react hooks compatibility
- feature request: Integration with React Native Web
- multiple parameters to devcard
- strip off last namespace
- devcards not updating when changed. HOT 1
- Warning: componentWillMount has been renamed
- [Feature request]: `<details>` support
- Require react directly HOT 4
- Doesn't work with cider-jack-in
- Devcards not reloading when using code splitting
- The required namespace "devcards-marked" is not available, it was required by "devcards/util/markdown.cljs". HOT 10
- Error: create-react-class could not find the React object.
- Is there a way to massage the state in history mode?
- `lein new devcards` not working
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 devcards.