Skip to content

feat: Sort JSON fields, and show JSON default mostly collapsed#224

Merged
regeter merged 1 commit intogooglemaps:mainfrom
regeter:follow
Mar 14, 2025
Merged

feat: Sort JSON fields, and show JSON default mostly collapsed#224
regeter merged 1 commit intogooglemaps:mainfrom
regeter:follow

Conversation

@regeter
Copy link
Copy Markdown
Contributor

@regeter regeter commented Mar 13, 2025

Small Quality of Life change.
Easier to compare some data over multiple rows without adding the value to the table. Makes the page look less crowded by default.

@regeter regeter requested a review from bshi March 13, 2025 23:41
export function parseJsonContent(content) {
log("Parsing JSON content");

const sortObjectKeys = (obj) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this used to modify inputs to ReactJson in the change above? Doesn't ReactJson have a mode/option to sort keys built-in?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used when ingesting the raw logs and storing them in indexedDB. ReactJson does have a sorted param, but it would have to do this sorting on each dataset switch. I also like that it's now sorted when exporting the logs.

@regeter regeter merged commit 6f35d20 into googlemaps:main Mar 14, 2025
10 checks passed
googlemaps-bot pushed a commit that referenced this pull request Mar 14, 2025
## [1.12.0](v1.11.1...v1.12.0) (2025-03-14)

### Features

* Sort JSON fields, and show JSON default mostly collapsed ([#224](#224)) ([6f35d20](6f35d20))

### Build System

* **deps:** bump @babel/helpers from 7.25.0 to 7.26.10 ([#223](#223)) ([cb56efe](cb56efe))
@googlemaps-bot
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants