MicrosoftEdge / DevTools

Feedback and discussions about Microsoft Edge Developer Tools
MIT License
151 stars 49 forks source link

The new search UI in the JSON viewer should show current index and total matches AND the old search field shouldn't appear #222

Open captainbrosset opened 5 months ago

captainbrosset commented 5 months ago

It cannot do full search. For example ["aaa", "aaa", ...] if there are 200 "aaa", use Ctrl+F to search aaa, it won't show xxx/200

Originally posted by @imba-tjd in https://github.com/MicrosoftEdge/DevTools/issues/87#issuecomment-1925750811

AB#47800890

captainbrosset commented 5 months ago

Thanks for filing @imba-tjd. I know that there's been some work on search lately, so this might be related.

Just to make sure I understand: you're saying that the "xxx/200" counter is missing, but apart from this, search works, right?

imba-tjd commented 5 months ago

I mean the total number isn't correct. For example xxx/123 even though there are actually 200.

captainbrosset commented 5 months ago

Thanks for clarifying, I was able to reproduce the issue.

If others want to test this, you can use the following URL (just copy the whole string, paste it into the address bar, and press Enter):

data:text/json,["aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa"]

Now, there are 2 ways to search:

My understanding is that, for performance reasons, the JSON viewer only renders what's visible in the viewport, and then renders more content as you scroll. This is why the usual browser search field can't find the total number of instances. These instances simply don't exist in the DOM yet.

The new search UI (first screenshot above) is, I think, supposed to replace the browser search field in the JSON viewer. So I think this issue is really about two things:

  1. It shouldn't be possible to use the usual browser search field in the JSON viewer, because it doesn't work.
  2. The new search UI should show the total number of matches and current index.
captainbrosset commented 4 months ago

It shouldn't be possible to use the usual browser search field in the JSON viewer, because it doesn't work. The new search UI should show the total number of matches and current index.

Or, the other way around: the usual browser search field should just work with the JSON viewer, and the new search UI should be removed.