-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[VarDumper] Dynamic HTML dumper #12125
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e400fda
to
ab37bb9
Compare
this.childLen= this.childElts.length; | ||
|
||
while (i < this.childLen) { | ||
elt = this.childElts[i]; | ||
if ("" == elt.className) { | ||
elt.className = "sf-dump-child"; | ||
elt.innerHTML = '<a class=sf-dump-ref onclick="Sfjs.dump.toggle(this)">'+('sf-dump-0' == elt.parentNode.className ? aExpanded : aCompact)+elt.innerHTML+'</span>'; | ||
elt.innerHTML = '<a class=sf-dump-ref onclick="Sfjs.dump.toggle(this)"><span>▼</span></a><span class="sf-dump-expanded">'+elt.innerHTML+'</span>'; | ||
if ('sf-dump-0' != elt.parentNode.className) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does not work well if you have multiple classes on the element
ab37bb9
to
b799844
Compare
Thank you @nicolas-grekas. |
fabpot
added a commit
that referenced
this pull request
Oct 5, 2014
This PR was merged into the 2.6-dev branch. Discussion ---------- [VarDumper] Dynamic HTML dumper | Q | A | ------------- | --- | Bug fix? | yes | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #12109 | License | MIT | Doc PR | - This PR partially reverts #12109 because it didn't take into account that many dumps can share a single style tag. More importantly, this PR enhance dump rendering with some cute JS navigation effects: - references highlighting on hovering - moving references toggling Here is a screenshot (note the yellow background and the fact that `#2` appears after the first `@2`):  Commits ------- b799844 [VarDumper] Dynamic HTML dumper
xabbuh
added a commit
to xabbuh/symfony
that referenced
this pull request
Oct 5, 2014
Make test compatible with the changes from symfony#12125.
nicolas-grekas
pushed a commit
to nicolas-grekas/symfony
that referenced
this pull request
Oct 6, 2014
Make test compatible with the changes from symfony#12125.
nicolas-grekas
pushed a commit
to nicolas-grekas/symfony
that referenced
this pull request
Oct 6, 2014
Make test compatible with the changes from symfony#12125.
nicolas-grekas
pushed a commit
to nicolas-grekas/symfony
that referenced
this pull request
Oct 6, 2014
Make test compatible with the changes from symfony#12125.
fabpot
added a commit
that referenced
this pull request
Oct 6, 2014
This PR was squashed before being merged into the 2.6-dev branch (closes #12142). Discussion ---------- [TwigBridge] fix `DumpExtension` tests | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Make test compatible with the changes from #12125. Commits ------- e3332ad [TwigBridge] fix tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR partially reverts #12109 because it didn't take into account that many dumps can share a single style tag.
More importantly, this PR enhance dump rendering with some cute JS navigation effects:
Here is a screenshot (note the yellow background and the fact that

#2
appears after the first@2
):