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

Move the search (to structured query) parser to the server-side #4140

Open
gsnedders opened this issue Dec 3, 2024 · 1 comment
Open

Move the search (to structured query) parser to the server-side #4140

gsnedders opened this issue Dec 3, 2024 · 1 comment

Comments

@gsnedders
Copy link
Member

Currently we use a parser written in JS, using ohm.js, to parse the wpt.fyi search syntax.

However, this ties the search syntax to the web front end, and there's many cases where it would be useful to be able to take a wpt.fyi URL from a user and then perform the query again.

Currently to do this requires extracting a bunch of code from webapp/components/test-search.js and then running the JS locally. Even just refactoring this so that TestSearch.parseAndInterpretQuery‎ is something that can be used without including Polymer etc. would be a win, so that such a file can be more directly copied.

Ideally we'd move the parsing to the server-side, so other clients can be given wpt.fyi URLs, extract the query parameter, and then make the request themselves. It's unclear what we gain from the parser being client-side?

@past
Copy link
Member

past commented Dec 13, 2024

I don't see much value in the current setup and agree that we would be better served with a backend query parser, similar to what we use in other projects.

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

No branches or pull requests

2 participants