Skip to content

[Var-Dumper] Dont expand 1st level per default #16741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
staabm opened this issue Nov 29, 2015 · 2 comments
Closed

[Var-Dumper] Dont expand 1st level per default #16741

staabm opened this issue Nov 29, 2015 · 2 comments

Comments

@staabm
Copy link
Contributor

staabm commented Nov 29, 2015

ATM the var dumper renders a object expanded on the first level by default,
see http://i.imgur.com/PzebmFI.png

We would like to render it collapsed by default, but it seems there is no API to do that atm.
I guess there should be a option which defines how much "levels" are expanded by default of the given object/array.

wdyt?

Thanks,
Markus

@nicolas-grekas
Copy link
Member

This is parameter for the embeded JS. I see two ways to make this possible:

  1. add a new method on HtmlDumper to configure the generated JS
  2. or make it possible to prepend the generated JS with these params, without requiring any API change on HtmlDumper.

I prefer 2. for now, what do you think?

@staabm
Copy link
Contributor Author

staabm commented Nov 29, 2015

I think 2. would also require a api change, because it also requires a new method (like 1. does)?

Atm the component does not define a JS api, does it? Should it have a js api which allows programmatically expand/collapse of the elements beeing rendered?

fabpot added a commit that referenced this issue Jun 28, 2016
…ions (MGDSoft, nicolas-grekas)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Add maxDepth & maxStringLength display options

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #16741
| License       | MIT
| Doc PR        | -

Takes over #18148 to add display options to html dumps.
Status: needs work

Commits
-------

998ff33 [VarDumper] Tweak display options implementation
58eb665 [VarDumper] Add maxDepth & maxStringLength display options
@fabpot fabpot closed this as completed Jun 28, 2016
nicolas-grekas added a commit that referenced this issue Jun 28, 2016
…-grekas)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Allow full collapsing of HTML dumps

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #16741
| License       | MIT
| Doc PR        | -

Because I missed the feature request in #16741 to allow full collapsing.

Commits
-------

633989b [VarDumper] Allow full collapsing of HTML dumps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants