debugger icon indicating copy to clipboard operation
debugger copied to clipboard

Search highlight creates multiple blocks for same search term

Open digitarald opened this issue 8 years ago • 22 comments

STR:

  • https://bl.ocks.org/ColinEberhardt/raw/6ceb7ca74aabac9c8534d7120d31b382/
  • Open js file
  • Search for wasm.

AR: Search highlights wasm and . as separate boxes. Gets worse for wasm.s, creating 3 boxes.

screenshot 2018-08-03 13 17 17

digitarald avatar Aug 03 '18 20:08 digitarald

Hey @bomsy do you remember the details here?

jasonLaster avatar Aug 23 '18 00:08 jasonLaster

Quick ping here @bomsy; do you have more additional information here?

darkwing avatar Aug 29 '18 01:08 darkwing

#1629 and #3885 are related. When I was looking into this I also found #6896 which may be caused by the same code.

kenjiO avatar Aug 29 '18 16:08 kenjiO

@jasonLaster if codeMirror is going to be replaced by Monaco then you might want to put this issue on hold or close it.

kenjiO avatar Aug 31 '18 22:08 kenjiO

sorry just seeing this ping! will take a quick look.

bomsy avatar Sep 14 '18 14:09 bomsy

/claim

Hello @darkwing ,

I am an Outreachy applicant. I would like to attempt resolving this issue. Let me please claim the issue as I see contributors doing it on the other issues.

Thanks.

Lathaguna avatar Oct 08 '18 20:10 Lathaguna

Thanks for claiming the issue! :wave:

!!! Please check your email and confirm the invitation

Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.

:fox_face: Debugger team!

claim avatar Oct 08 '18 20:10 claim

@Lathaguna Are you still working on this issue?

aditya81070 avatar Oct 15 '18 10:10 aditya81070

/claim

aditya81070 avatar Oct 15 '18 10:10 aditya81070

Thanks for claiming the issue! :wave:

!!! Please check your email and confirm the invitation

Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.

:fox_face: Debugger team!

claim avatar Oct 15 '18 10:10 claim

/unclaim

aditya81070 avatar Oct 15 '18 10:10 aditya81070

@violasong @mcroud Could we use Firefox's green background highlight in the debugger instead of trying to search matches? It would make life so much easier. Also, what green color is this?

darkwing avatar Dec 09 '18 23:12 darkwing

Hi. We have a UX issue for "Unify search highlight colors across DevTools", where we talked about maybe using the green background for search highlights, though we didn't focus on that solution much.

I do think it would be interesting to use sync with what Firefox does for search-in-page. For the record, it's using:

  • A magenta background for all matches ("Highlight all" option)
  • A green background for the currently selected match

Edit: deleted the next comment to put all my design proposals in the UX bug. Let's try to make a decision there if possible.

fvsch avatar Dec 10 '18 09:12 fvsch

@aditya81070 how's it going? are you still interested in this?

jasonLaster avatar Dec 20 '18 16:12 jasonLaster

/claim I work on this, if its ok.

baronKilljoy avatar Dec 29 '18 03:12 baronKilljoy

Thanks for claiming the issue! :wave:

Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.

:fox_face: Debugger team!

claim avatar Dec 29 '18 03:12 claim

@jasonLaster I think this is a codemirror issue. it looks like when it hits a special character (punctuation space etc) it is creating a new span. The only thing i found that changes the search is function escapeRegExp(string) { string = toString(string); return (string && reHasRegExpChar.test(string)) ? string.replace(reRegExpChar, '\\$&') : string; } changes wasm. to wasm\. which I guess is needed for regexp. I will be out of town next couple days but will be back to check this tuesday or wendsday.

baronKilljoy avatar Dec 30 '18 20:12 baronKilljoy

This PR is a great start: #7662

Once UX has approved a new look (https://github.com/devtools-html/ux/issues/14), we can move forward 👍

darkwing avatar Jan 09 '19 22:01 darkwing

@darkwing Do we still have this issue in Debugger, and do we have a bug on Bugzilla maybe?

We reached a decision in https://github.com/firefox-devtools/ux/issues/14#issuecomment-537047482 and are going to implement it with 3 theme variables (2 already landed, one to be done)

A quick try in Debugger gives me: Screen Shot 2019-10-02 at 01 18 09

The main issue is that we need a style variation to highlight the currently focused result (vs other results in the same document). I tried a few things but wasn't happy with the results.

fvsch avatar Oct 01 '19 23:10 fvsch

@fvsch Nice! An amazing contributor, Janelle, fixed this issue of multiple blocks in MC. In theory, implementing this new highlighting appearance should be really easy now.

darkwing avatar Oct 01 '19 23:10 darkwing