Jimbly / regex-crossword

Implementation of a RegExp crossword.
287 stars 27 forks source link

Highlight relevant rules on cell focs #10

Closed EhsanKia closed 3 years ago

EhsanKia commented 3 years ago

This is a fix for https://github.com/Jimbly/regex-crossword/issues/8

It simply highlights the three relevant rules when a cell is selected.

Open questions:

  1. Is bold + underline good? Other ways of highlighting?
  2. Should we unhighlight on focus loss or clicking outside?
  3. Should we also highlight the cell itself
  4. Extra: should we also highlight all 3 rows connected to the cell?
Jimbly commented 3 years ago

Thanks for the PR. I merged this with some tweaks so it triggers on keyboard focus as well, and doesn't crash on IE, though I sure hope no one's running that... ^_^

Jimbly commented 3 years ago

Highlighting the entire row of cells would be cool, and possibly highlighting the background of the text instead of underlining, but due to HTML layout wonkiness I no longer have any recollection of, the size of the divs aren't the whole size of the text on the side, so I gave up after 30s of trying ^_^.

TheCycoONE commented 3 years ago

There's a bug with this highlight: image

Note from the picture the highlight is impossible. The top highlight was the incorrect one.

TheCycoONE commented 3 years ago

So that's cell 9_1 the y and the z are right, but the x should be 4 not 1, so simply taking the second number for x isn't right.