crosshare icon indicating copy to clipboard operation
crosshare copied to clipboard

Unexpected behavior with downs-only

Open revuluri opened this issue 1 year ago • 1 comments

When an across clue is referenced in the Constructor's Note (which is visible pre-solve), as it is in this puzzle, the clue is visible even if one is in Downs-Only mode. Not a big deal, but seemed like unexpected behavior so wanted to mention it here.

revuluri avatar Jun 21 '24 21:06 revuluri

Thanks for the heads up!

mdirolf avatar Jun 22 '24 11:06 mdirolf

I have a good idea of what the problem is here. The puzzleView in Puzzle.tsx is wrapped in the DownsOnlyContext.Provider but the PuzzleOverlay component, also rendered in Puzzle.tsx, is not. However, PuzzleOverlay does receive a prop for downsOnly but it doesn't pass it along to PuzzleHeading and, while it does pass it to Comments, it is not leveraged for obscuring clue tooltips for Across clues mentioned in comments.

I can't fully verify this just yet because I'm having some trouble with Firestore locally so I don't think changes to the Downs Only flag in user settings is sticking but I should be able to once that is working again.

I think the best solution is to promote the DownsOnlyContext.Provider so that it covers all of the components rendered within Puzzle.tsx. Then we can pull the value out of context where needed and stop drilling it down where it is currently used. That should also make the ClueReference just work because it is already attempting to useContext(DownsOnlyContext).

Fargrim avatar May 03 '25 17:05 Fargrim

That sounds exactly right to me

mdirolf avatar May 03 '25 17:05 mdirolf

Fixed in #543 - awaiting deploy

mdirolf avatar May 04 '25 23:05 mdirolf