Skip to content
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

Pretty-print event JSON in debug view #2771

Merged
merged 2 commits into from
Apr 30, 2024

Conversation

frebib
Copy link
Contributor

@frebib frebib commented Apr 30, 2024

Significantly improves readability

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Format the JSON (when it's valid JSON, at least) to make reading it easier

Motivation and context

See above

It would be even cooler to use something like https://github.com/snappdevelopment/JsonTree to get a syntax-highlighted/interactive view as was seen in Element Android.

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@frebib frebib requested a review from a team as a code owner April 30, 2024 11:03
@frebib frebib requested review from jmartinesp and removed request for a team April 30, 2024 11:03
Copy link
Contributor

Thank you for your contribution! Here are a few things to check in the PR to ensure it's reviewed as quickly as possible:

  • Your branch should be based on origin/develop, at least when it was created.
  • There is a changelog entry in the changelog.d folder with the Towncrier format.
  • The test pass locally running ./gradlew test.
  • The code quality check suite pass locally running ./gradlew runQualityChecks.
  • If you modified anything related to the UI, including previews, you'll have to run the Record screenshots GH action in your forked repo: that will generate compatible new screenshots. However, given Github Actions limitations, it will prevent the CI from running temporarily, until you upload a new commit after that one. To do so, just pull the latest changes and push an empty commit.

Significantly improves readability

Signed-off-by: Joe Groocock <me@frebib.net>
Copy link
Contributor

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

This looks really useful, thanks!

@jmartinesp
Copy link
Contributor

You'll need to either rebase the branch or add an empty commit so the CI runs:

If you modified anything related to the UI, including previews, you'll have to run the Record screenshots GH action in your forked repo: that will generate compatible new screenshots. However, given Github Actions limitations, it will prevent the CI from running temporarily, until you upload a new commit after that one. To do so, just pull the latest changes and push an empty commit.

@bmarty bmarty added the Z-Community-PR Issue is solved by a community member's PR label Apr 30, 2024
Signed-off-by: Joe Groocock <me@frebib.net>
@jmartinesp jmartinesp merged commit 06a519e into element-hq:develop Apr 30, 2024
10 of 12 checks passed
@frebib frebib deleted the frebib/pretty-json branch May 21, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants