Open atopal opened 5 months ago
I think all that's missing is searching by identifier. There's already OR
to string them together.
The name filter (with or without the name:
prefix) does a partial string search on both the name and the id. (We call the feature identifier featurekey
at the database level of our system due to the database tables already having columns called ID)
But we don't make it explicitly clear that the name filter can also search by ID. We can modify the description of that filter.
@foolip is correct that the OR operator can help with this.
avif OR popover
The substring matching means that the matched features could change, for example "avif" could start matching "avif2" if there's ever a future format named as such.
A way to enumerate a list of exact identifiers would solve this, but there's still a problem. How do you maintain such a query and add/remove features? Any links previously shared will always point to that snapshot, after all.
Some kind of named saved queries? Or should we have tags and the ability to filter by them?
https://webstatus.dev/?q=cap is a concrete case of the substring problem. I only want to match https://webstatus.dev/features/cap but 3 other features are included too.
Today I tried to create a view of 100+ "rendering" features and dealing with the problem created by substring matches proved quite hard. Lots of things are substring matches for other things, and I had to edit the query quite a bit and count the number of matches to build confidence in it.
A new id
search atom that is always matched exactly would help here I think. Ideally the name
atom then matches only on the name, not the identifier.
Supporting something like tag:my-favorite-features
would be a nice addition, but we'd need to maintain that data somewhere, and the question of ownership of a tag would arise. It seems best to first ensure that an exact set of features can be pulled out using very long query strings, and thinking about ways to shorten it later.
Ah, the OR operator is case sensitive, that tripped me up.
Let's make this issue about the problem that Philip mentioned instead. Name doing a substring match is great, but yes, let's add another option that gives exact matches.
Re saved searches: That would be possible for logged in users and then you could namespace it "kadirtopal/top-issues" or similar.
Steps:
id
.make gen -B
to regenerate all the generated codeIdentifierID
.
VisitID_term
id:FeatureKeyYouSelected
. run the tests by scrolling to the top of the method in vscode and select Run Test
. The test should fail. But show you the difference. Fix the difference then re-run the tests to succeed. You will use this fixed tree later on in step XopStr := searchOperatorToSpannerBinaryOperator(op)
to get the operator (since we only do = or !=)wf
https://github.com/GoogleChrome/webstatus.dev/blob/684a2857d5acd7c15911510c991d5281414f80b5/infra/storage/spanner/migrations/000001.sql#L16-L23. Something along the lines: `fmt.Sprintf("( wf.FeatureKey_Lowercase %s @%s)", opStr, paramName). Use the computed Lowercase.For reference, take a look at how we added support for the snapshot
term in this PR: https://github.com/GoogleChrome/webstatus.dev/pull/601
Two more things:
we should add a playwright test that always checks that we can support 50 IDs in one query.
The test should input the query and assert that the dashboard returns 50 features
We need to add the new term to the frontend's vocabulary:
The work for this has been split up into #786 #787 #788
It should be possible to have an overview of features by filtering for them with something like "avif, popover, ..."