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

FE: Messages: Format JSON arrays #994

Merged
merged 1 commit into from
Apr 2, 2025

Conversation

yardenshoham
Copy link
Contributor

@yardenshoham yardenshoham commented Mar 29, 2025

We currently only format JSON objects, but we can detect and format JSON arrays as well, which will improve the user experience when messages contain arrays of JSON objects.

Before:

image

After:

image

What changes did you make?

Changed JSON message detection to include messages starting with [, not only {.

Is there anything you'd like reviewers to focus on?

No.

How Has This Been Tested?

  • Manually: Created a message containing an unformatted JSON array and made sure its preview is formatted.

Checklist

  • I have performed a self-review of my own code
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

A picture of a cute animal
image

We currently only format JSON objects but we can detect JSON arrays and format them as well for a better user experience when messages contain arrays of JSON objects.

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
@yardenshoham yardenshoham requested a review from a team as a code owner March 29, 2025 10:44
@kapybro kapybro bot added status/triage Issues pending maintainers triage area/messages status/triage/manual Manual triage in progress status/triage/completed Automatic triage completed and removed status/triage Issues pending maintainers triage labels Mar 29, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hi yardenshoham! 👋

Welcome, and thank you for opening your first PR in the repo!

Please wait for triaging by our maintainers.

Please take a look at our contributing guide.

@Haarolean Haarolean added type/enhancement En enhancement/improvement to an already existing feature scope/frontend Related to frontend changes and removed status/triage/manual Manual triage in progress labels Apr 2, 2025
@Haarolean Haarolean added this to the 1.3 milestone Apr 2, 2025
@Haarolean Haarolean merged commit 8e8ff06 into kafbat:main Apr 2, 2025
48 checks passed
@Haarolean
Copy link
Member

@yardenshoham thanks!

@yardenshoham yardenshoham deleted the format-json-array branch April 2, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/messages scope/frontend Related to frontend changes status/triage/completed Automatic triage completed type/enhancement En enhancement/improvement to an already existing feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants