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

[Feature] Support JSON highlighting in messages #1362

Closed
ysfscream opened this issue Jul 17, 2023 · 1 comment · Fixed by #1381, #1383, #1385, #1386 or #1390
Closed

[Feature] Support JSON highlighting in messages #1362

ysfscream opened this issue Jul 17, 2023 · 1 comment · Fixed by #1381, #1383, #1385, #1386 or #1390
Assignees
Labels
desktop MQTTX Desktop enhancement New feature or request feature This pr is a feature
Milestone

Comments

@ysfscream
Copy link
Member

Motivation

In the current version of MQTTX, when users select JSON as the data format, there is no distinct visual cue if the data in the messages is in JSON format. This can make it difficult for users to quickly and accurately locate JSON data when viewing large amounts. Users might feel inconvenienced by the inability to quickly identify JSON data.

Detailed Design

To resolve this issue, I propose supporting JSON highlighting for messages in MQTTX. We can add a code block or other types of highlighting for each message in JSON format. The specific implementation is as follows:

  • If the received message is in JSON format, it will be highlighted when displayed.
  • The highlighting could be placing the message in a code block or using other highlighting effects.
  • This highlighting effect should allow users to instantly recognize that the message is in JSON format.

Alternatives

One possible alternative is to add a tag next to the message indicating it's in JSON format. However, this might not be as intuitive and obvious as highlighting. Another alternative is to ignore this feature, which could make it difficult for users to quickly and accurately locate JSON data when viewing large amounts of data.

More Detail (optional)

Implementing this feature would require changes to how MQTTX processes and displays messages. A new feature needs to be developed to check if the received messages are in JSON format and to provide a highlighting effect for messages in JSON format.

This feature aims to enhance the user experience by highlighting messages in JSON format, enabling users to quickly and accurately identify JSON data.

@ysfscream ysfscream added enhancement New feature or request feature This pr is a feature desktop MQTTX Desktop labels Jul 17, 2023
@ysfscream ysfscream added this to the v1.9.5 milestone Jul 17, 2023
@ysfscream
Copy link
Member Author

Actions:

  • Update docs

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