wpt.fyi icon indicating copy to clipboard operation
wpt.fyi copied to clipboard

Pasting paths into search box lowercases them, breaking them

Open gsnedders opened this issue 2 years ago • 4 comments

I was trying to search for shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html or shadow-dom/MouseEvent-prototype-offsetX-offsetY.html, however in both STP 156 and Chrome 109 this gets lowercased and finds nothing.

Oddly, copying the URL gives me the search query before it gets lowercased… and that does manage to find the tests!

gsnedders avatar Oct 21 '22 21:10 gsnedders

Hi @KyleJu, I would like to work on this issue. Just to clarify, we should only need to modify webapp/components/test-search.js right?

LeonardYam avatar Mar 22 '23 16:03 LeonardYam

Hi @KyleJu, I would like to work on this issue. Just to clarify, we should only need to modify webapp/components/test-search.js right?

Yup It is likely a frontend issue and webapp/components/test-search.js should be the place

KyleJu avatar Mar 22 '23 18:03 KyleJu

Hi, I want to check my understanding of the search box.

Right now the search box supports two functions:

  1. Parse a search into the required structured query object using Ohm to pass into the api/search endpoint.
  2. Navigate to a given file-path. E.g. Entering /encoding/encodeInto.any.html should navigate you to the results for that test. (this process is actually automatic and does not require a query commit)

Side-notes:

  • In webapp/components/test-search.js, how does value="{{ queryInput::input }}" work? From my understanding, this is equivalent to having an oninput listener that does this.queryInput = e.target.value and that this is a virtual method call, but I can't find where the input method is binded.
  • For the navigation/auto-complete function, it involves a lot of querySelector calls and code-coupling with webapp/components/wpt-results.js and webapp/components/wpt-app.js. Is there a better way to perform this operation?

LeonardYam avatar Apr 06 '23 10:04 LeonardYam

I ran into this now when trying to search for "enumerateDevices" tests for https://github.com/web-platform-tests/interop/issues/532. The UI keeps changing it to "enumeratedevices" which doesn't find anything. Editing the URL does work though: https://wpt.fyi/results/?label=master&label=experimental&aligned&q=%28path%3A%2Faudio-output%20or%20path%3A%2Fmediacapture-streams%29%20enumerateDevices

@KyleJu can you take a look at https://github.com/web-platform-tests/wpt.fyi/pull/3577?

foolip avatar Nov 13 '23 14:11 foolip