-
Notifications
You must be signed in to change notification settings - Fork 435
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
Beautify JSON and highlight json text #595
base: main
Are you sure you want to change the base?
Conversation
The JSON theme does not match the light mode and dark mode theme we currently use in the app If you go to "View Code" -> "HAR" (which is a JSON, you can see the highlighting) ![]() ![]() The current theme resides here - |
should I use the same color scheme as HAR or we should go for another color scheme. |
All colour scheme flow through the API Dash design system as mentioned in the comment link above. |
key: Key("${selectedHistoryModel?.historyId}-json-body"), | ||
fieldKey: | ||
"${selectedHistoryModel?.historyId}-json-body-viewer", | ||
initialValue: requestModel?.body, | ||
readOnly: true, |
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.
read only feature is important as the user cannot modify the JSON body when viewing history.
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.
On it
@Mrudul111 You forgot adding the following styles in the JSON editor:
|
what should be the color for nullHighlightStyle the same as string? |
You have access to the theme and the code view widget. It is part of the task to figure out how the colors map. |
What is your FOSSHACK project link? |
I am not contributing to FOSSHACK |
cool 👍 |
PR Description
This PR was made to tackle 2 enhancement issues that are beautification of JSON text and highlight of key and string value in JSON text and plug it in body section of History Request page and Request page. Here is a video demonstrating the functionality.
Simulator.Screen.Recording.-.iPhone.SE.3rd.generation.-.2025-02-22.at.13.47.07.mp4
Related Issues
Checklist
main
branch before making this PRflutter upgrade
and verify)flutter test
) and all tests are passingAdded/updated tests?
We encourage you to add relevant test cases.
OS on which you have developed and tested the feature?