Open Bug 1244920 Opened 8 years ago Updated 2 years ago

JSON Viewer: display the corresponding brackets for the given type

Categories

(DevTools :: JSON Viewer, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: clarkbw, Unassigned)

References

Details

Of course I defer to Helen here.  But my opinion is that with an object expanded I think we should wrap them in their rightful bracket.  Objects {} and Arrays []

Such that an object would look like this:
\/ obj {
  attribute: value
}

And an array
\/ arr [
  0 value
]

via bug 1223143 comment 7

> Since we already have the brackets anyway that indicate the type, why not go
> the full way and wrap the expanded values in the brackets? (See
> "proposal-compact-expanded.png".)
Summary: JSON VIewer: display the corresponding brackets for the given type → JSON Viewer: display the corresponding brackets for the given type
Blocks: 1243951
Product: Firefox → DevTools
Not activity here, moving to the backlog (P3)
Honza
Priority: P2 → P3
Severity: normal → S3

I'm ran into trouble on adding the closing bracket because it requires an extra row. Seems like I'll be modifying TreeView but maybe I could get away with just changing the passed render function. What seems like a good approach here?

Flags: needinfo?(odvarko)

Sorry for the dealay!

It feels like this is general feature that should be supported by the TreeView component.
Bomsy, what do you think?

Flags: needinfo?(odvarko) → needinfo?(hmanilla)

Honza, yeah i agree other panels can benefit from it.

Zac, feel free to build it into the TreeView component and we can see how it goes.

Thanks

Flags: needinfo?(hmanilla)
You need to log in before you can comment on or make changes to this bug.