day8 / re-frame-10x

A debugging dashboard for re-frame. X-ray vision as tooling.
MIT License
632 stars 68 forks source link

[Bug]: app-db inspector incorrectly indents elements on "more" pagination #321

Closed hipitihop closed 2 years ago

hipitihop commented 2 years ago

What happened?

When a list/vector is expanded, there is a limited number of elements shown followed but a button to show more elements. When pressed, more elements are shown, however they are rendered indented.

image

10x Version

1.1.13

Reagent Version

1.1.0

React Version

17.0.2

re-frame Version

1.2.0

What browsers are you seeing the problem on?

Chrome

Relevant console output

No response

superstructor commented 2 years ago

@MawiraIke please have a look at this.

MawiraIke commented 2 years ago

Okay @superstructor , I will post more information here after I reproduce the issue.

MawiraIke commented 2 years ago

@superstructor @hipitihop this seems to be linked to max-no-body-items pref in devtools.

:max-number-body-items 100

Since the default is 100, devtools renders a sequence's first 100 items and then recursively renders the rest in batches of 100 as different objects. I am pushing a commit to increase this to a bigger number like 10000. This is safe as devtools uses clojure.core/take and clojure.core/drop to parse the first n items in a sequence which happens in devtools.markup. Both take and drop stop recurring when the sequence is exhausted.