zalando-incubator / bro-q Goto Github PK
View Code? Open in Web Editor NEWChrome Extension for JSON formatting and jq filtering in your browser.
License: MIT License
Chrome Extension for JSON formatting and jq filtering in your browser.
License: MIT License
The Preact implementation does not quite match up with the 1.4 version of bro/q.
Some regression items I noticed in no particular order:
It would be great if bro-q could hide the url fragment #broq-filter=
, if only the default filter .
is currently applied.
The bro-q plugin appends the currently active filter as fragment to the URL address. By default the .
filter is active. E.g. when opening the document http://some.api/resource.json
, bro-q will immediately change the content of the address bar to http://some.api/resource.json#broq-filter=.
.
Show the fragment broq-filter
only if
*
Often I just want to display a JSON document and copy the URL in the browser's address bar to share with others. While the broq-filter
is useful when some filter was actually applied, it just adds "noise" to the address, in cases where just the .
was used. As I don't like to share unnecessary things, I usually try to cut away the filter before copying the content of the address bar.
While opening the first time a web address returning a json, bro/q will render only the first 2 rows
the page https://www.postgresql.org/docs/current/static/monitoring.html opens without bro-q popping up at the bottom.
the page https://www.postgresql.org/docs/current/static/monitoring.html has at the bottom bro-q attached, which should not be.
go to the page https://www.postgresql.org/docs/current/static/monitoring.html with bro-q enabled
its not affecting the use of the website much, but it disturbs. also i'm wondering if it happens on other pages as well.
We don't need jQuery because everything can be done with DOM API.
No jQuery
We have jQuery as dependency just for the option page
curl https://raw.githubusercontent.com/LearnWebCode/json-example/master/pets-data.json | jq '.pets[]'
should return
{
"name": "Purrsloud",
"species": "Cat",
"favFoods": [
"wet food",
"dry food",
"any food"
],
"birthYear": 2016,
"photo": "https://learnwebcode.github.io/json-example/images/cat-2.jpg"
}
{
"name": "Barksalot",
"species": "Dog",
"birthYear": 2008,
"photo": "https://learnwebcode.github.io/json-example/images/dog-1.jpg"
}
{
"name": "Meowsalot",
"species": "Cat",
"favFoods": [
"tuna",
"catnip",
"celery"
],
"birthYear": 2012,
"photo": "https://learnwebcode.github.io/json-example/images/cat-1.jpg"
}
If I try the previous on
curl https://raw.githubusercontent.com/LearnWebCode/json-example/master/pets-data.json | jq '.pets[]'
Current behavior :
[
{
"name": "Purrsloud",
"species": "Cat",
"favFoods": [
"wet food",
"dry food",
"any food"
],
"birthYear": 2016,
"photo": "https://learnwebcode.github.io/json-example/images/cat-2.jpg"
},
{
"name": "Barksalot",
"species": "Dog",
"birthYear": 2008,
"photo": "https://learnwebcode.github.io/json-example/images/dog-1.jpg"
},
{
"name": "Meowsalot",
"species": "Cat",
"favFoods": [
"tuna",
"catnip",
"celery"
],
"birthYear": 2012,
"photo": "https://learnwebcode.github.io/json-example/images/cat-1.jpg"
}
]
This doesnt deference the array, so every filter after this breaks.
Enable switch between JsonPath and jq filtering.
Switch from jq to json path
Make jq options available.
https://stedolan.github.io/jq/manual/
Be able to apply options like -r
Currently is not possible to provide options.
See: fiatjaf/jq-web#9
Opening the inspect element window on the latest chrome will let the filter bar disappear
If you delete the last filter the alert will continue to say that you do not have filer available.
We need to add unit tests to produce high quality codebase.
We have unit tests and basic code coverage should be 20%.
We don't have tests at all.
If you remove a filter, the output should show the same JSON as the input.
If you delete the filter that you entered the output will not update.
change if-statement in /src/ts/index.ts - line 65-75
For example go to: https://api.cryptonator.com/api/full/btc-usd
The same issue happens, when you remove a normal filter query.
Otherwise when you remove a whole query at once (marked and then cutted out with ctrl+x)
the output still shows the filtered content.
Chrome 67 (67.0.3396.62) on linux
Dependabot couldn't parse the package-lock.json found at /package-lock.json
.
You can mention @dependabot in the comments below to contact the Dependabot team.
What do you think in displaying only one editor, to improve readability, when not filter is provided?
wrong link in readme to releases
link to releases in readme works
links to old private GH repo
will create PR with updated link
click link in readme to releases
n/a
n/a
I did some poking around the codebase today to put together a pull request.
I found a couple things that I think could be improved.
jQuery is included but barely used. Markup for the UI is hand made by calling document.createElement
, then setting properties and then doing appendChild
on other elements
This makes it pretty difficult to reason about the markup that is generated.
I would suggest either:
Personally I lean towards option 2 and I would be happy to put together a PR to show what it would be like.
I think option 1 would be minimal effort which is appealing.
I dont think option 3 is a good choice. The application will never scale to a point where there is a return on this sort of investment.
If jQuery can be removed and Preact gets added in it's place the resulting application would be much smaller overall as well which is nice.
I would love to hear your thoughts.
Sometimes when I'm doing a filter nothing seems to change (even with the new display error functionality). I would like to see a spinner/loader that indicates that the filter has finished updating. This is especially helpful when working with large data sets.
I type in a filter and a simple loader lets me know that the filter has completed, especially when working with larger data sets and when I have a error in my filter syntax.
When I type in a filter (especially on a large data set), I don't see any obvious update to the results (especially if I have an error in my filter syntax).
When I open a plain application/json document with bro/q and no filter is applied in the url, the filtered json view should contain the full unfiltered document.
Sometimes, usually when bro/q opens a document for the first time, the filtered json view just contains {}
instead of the unfiltered document, even if no filter was applied.
Open an arbitrary application/json document or page
All other extensions were disabled during this experiment.
It works for all URLs.
It does not.
Seems like it reaches some failure state inside its background hidden tab for the second URL, regardless of the response structure (but maybe status).
Mac OS X.
Chrome: Version 64.0.3282.186 (Official Build) (64-bit)
Extension version: 1.0.0
Installed from the archive, which was downloaded at https://github.com/zalando-incubator/bro-q/releases
liveUrlQuery functionality is missing in the preact implementation
are there any plans to officially submit this extension to the chrome extension store?
And if not why?
I couldn't find any closed issues discussing this.
When an error to the filter occurs, it is not obvious what the issue might be. We should add a box that displays the resulting error message from JQ.
Add a box next to the filter input to display any error messages that might occur.
No errors are being displayed
I'd like to know when my filter input is wrong and any helpful info on what needs fixed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.