wp-api-console
wp-api-console copied to clipboard
Add diff view & Update to React 16
Changes proposed in this pull request
Sometimes I've found myself comparing the result of two endpoints endpoint due to migrations (in my particular case) or some other reason like updating an endpoint.
This pull request is adding a new cool feature, which is the ability to compare two API calls from our beloved WordPress Developer Console.
For this purpose, I had to:
- Start from a previous un-merged branch, which is the ability to retry a call (reviews are welcome!).
- Update to React 16 from React 15, so I had to tweak a few things here and there (I didn't want to go risky and update to the latest one)
- Added a few new packages: A diff-viewer, and a json-stable-strinfigy function that allows an stable comparison (eg: these 2 JSON objects are the same:
{a: 1, b: 2}, {b:2, a:1}
Testing instructions
I am sad to say that extensive testing should be done, probably everything except the query builder parameters, which have been untouched.
If the base branch has been merged. we can skip the refresh thing.
I would prefer if we not mix adding a feature and updating the framework. I updating React a requirement to adding the diff view? If so, can we create a new PR that only updates React?
If updating React, why stop at 16?
Sure I can separate the framework update. It's a requirement for the diff view. I'll do it as soon as I'm allowed!
I updated to 16 to go conservative as this PR was going to be big enough, but I'll update to latest in a different PR.
I updated to 16 to go conservative as this PR was going to be big enough, but I'll update to latest in a different PR.
If there are major changes required to jump to 18 then don't spend too much time on it.