antonmedv / fx

Terminal JSON viewer & processor
https://fx.wtf
MIT License
19.08k stars 438 forks source link

Feature ~Request~ Idea: Side-by-side diff-like viewer #188

Closed IdlePhysicist closed 2 years ago

IdlePhysicist commented 2 years ago

Firstly congrats on making a cool tool, the ability to collapse fields is fantastic.

I’m just throwing out this idea, because I think it could be a useful feature. Assuming I find the time, I would be willing to sketch a prototype of this and submit it as a PR for review, if you like the idea.

Use Case

At my job, there is a use case where certain individuals, operators, perform a process to curate some data. This involves having to inspect blobs of JSON returned from our APIs, and they will then perform some action based on the inspections of numerous blobs.

Implementation

I think the feature be something like this. Where 2 files are read by fx, with a flag (e.g. --diff) is passed, and then fx displays the 2 files side-by-side and possibly scrolling both together.

I do not have a clear idea of how this would be implemented though.

antonmedv commented 2 years ago

I rewrote the entire fx in golang. So I belove this issue is no longer needed.

IdlePhysicist commented 2 years ago

@antonmedv can you explain why you rewriting fx in Go means that this issue is no longer needed?

After all I only found this project because you rewrote it in Go and posted it on lobste.rs.

antonmedv commented 2 years ago

Sorry, closed lots of issues in a bulk mode.

dufferzafar commented 2 years ago

This was wrongly closed?

antonmedv commented 2 years ago

No, closed intentionally as this feature really difficult to implement and I don’t think gonna do it in any time soon.