Code Monkey home page Code Monkey logo

Comments (16)

joachim-n avatar joachim-n commented on August 27, 2024 2

Coming from Drupal, where Kint is being used in the Devel module to output massive arrays, not knowing how to collapse them down to see just the first level is a massive usability problem. I considered Kint completely unusable until I found this was possible.

from kint.

joachim-n avatar joachim-n commented on August 27, 2024 1

That's not really discoverable as a UI feature.
How about having 2 buttons, one to expand by one level and one to expand all children?

from kint.

raveren avatar raveren commented on August 27, 2024

http://raveren.github.io/kint/#navigation

Left click anywhere on a collapsed dump to show its contents. Doing so on the leading [+] will un-collapse all levels of the dump as well.
Double-clicking any plus sign will un-collapse all dumps on the page.

from kint.

winkbrace avatar winkbrace commented on August 27, 2024

Ah, I see.

But how to close all child elements of an element after you opened them all?

from kint.

raveren avatar raveren commented on August 27, 2024

Click the minus - that will collapse all children recursively then click next to it, it will show only immediate children of the selected node.

from kint.

winkbrace avatar winkbrace commented on August 27, 2024

Thanks. 👍

from kint.

raveren avatar raveren commented on August 27, 2024

Hello, thanks for the input - and although I agree that it is a slight usability issue, cluttering the interface is not a solution unfortunately.

from kint.

raveren avatar raveren commented on August 27, 2024

Ok, I can feel your pain :)

So what do you suggest, an another button is not an option IMO, a tooltip would be one solution that's easy to implement as well: on the [+] button This button expands and collapses all nodes, click *next* to it to only collapse top level.

What do you think?

from kint.

joachim-n avatar joachim-n commented on August 27, 2024

a tooltip would be one solution that's easy to implement as well

That would certainly help, but I'm not a UX expert -- I don't know if that would be sufficiently discoverable.

from kint.

raveren avatar raveren commented on August 27, 2024

I'm guessing it's better than nothing, I'll add it.

from kint.

n00b21337 avatar n00b21337 commented on August 27, 2024

We in drupal world were used to krumo, by default it only expanded top levels so we can get an overview of the object. Now Kint goes like this.
image

and what I really want by default is this
image

So maybe some modifier in config files, where we can add (open only first level) would be good. But I would also say that would be best UX for all anyway, but if people differ with that, at least to have option to set it like that. I know 99% of drupal people would use that setting.

from kint.

jnvsor avatar jnvsor commented on August 27, 2024

Click the minus - that will collapse all children recursively then click next to it, it will show only immediate children of the selected node.

from kint.

n00b21337 avatar n00b21337 commented on August 27, 2024

Maybe I am using different version of KINT. I dont see any next. But it does work when I click on the whole highlighted area as I wanted it to work.

from kint.

jnvsor avatar jnvsor commented on August 27, 2024

I dont see any next.

Have trouble finding the "Any" key too? :)

from kint.

n00b21337 avatar n00b21337 commented on August 27, 2024

I was reading above where it says
"This button expands and collapses all nodes, click next to it to only collapse top level." so somehow I got it that it must say next :) but when I read it now, I see I got it wrong.

from kint.

jnvsor avatar jnvsor commented on August 27, 2024

Anyway, the question of the button's lack of clarity continues at #191

from kint.

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.