-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
feat(issue-details): Improved UI for viewing object/array values #66153
Conversation
f4dcaf9
to
1b1c7c7
Compare
1b1c7c7
to
5a3efae
Compare
Can we make the toggles less prominent (perhaps with just the icon and no button formatting) and only appear on hover? |
depth, | ||
maxDefaultDepth, | ||
}: CollapsibleValueProps) { | ||
const numChildren = Children.count(children); |
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.
what
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.
@vuluongj20 agree that the toggle buttons make it look a bit busy. Went ahead and removed the background and border, it looks like this (a lot better!): I tried hiding the buttons until hover, but it left gaps that didn't look very good: IMO keeping the buttons all the time isn't so bad now that they are less emphasized. What do you think? |
…ctured-data-obj-array-ui
Ahh yea I agree with you about the gaps. Let's merge the current version then! 🚀 |
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
) Fixes #58573, #48480 Previously, objects/arrays were only collapsible after they reached maxDefaultDepth. The major change here is that now each level is collapsible - Each level is now always collapsible. Before, objects/arrays were only collapsible after a certain depth - Arrays/objects begin collapsed when there are more than 5 items, in addition to when they are at a certain depth - Changed the appearance and location of the toggle buttons to better match commonly-used json viewers - Added `n items` preview text for collapsed objects/arrays (which is clickable!)
Fixes #58573, #48480
Previously, objects/arrays were only collapsible after they reached maxDefaultDepth. The major change here is that now each level is collapsible
n items
preview text for collapsed objects/arrays (which is clickable!)Before:
After:
And here's an example of the new auto-collapse behavior helping out when context values are very large: