Skip to content

Add diagonal clues (optional feature) - #618

Open
ianfhunter wants to merge 6 commits into
crosshare-org:masterfrom
ianfhunter:feat/diagonal-clues
Open

ianfhunter wants to merge 6 commits into
crosshare-org:masterfrom
ianfhunter:feat/diagonal-clues

Conversation

@ianfhunter

@ianfhunter ianfhunter commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Have you wanted to make a diagonal crossword? No? Well now you can!
image

Simply enable the setting (default off)
image

And you can write clues for ↘︎ and ↙︎! (Not the other directions though, we dont do backwards downs and acrosses, so we shouldnt do some backward diagonals. Standard seems to be to have them down.)
image

And then players can solve them:
image

Other notes:

  • The auto-fill has not changed and does not take into account the diagonals (otherwise it would probably never solve).
  • The "word is not clued" blocked to publication has been replaced with a "letter has no associated clue" (or similar wording) so that setters can have a diagonal-only clued cell
  • export/import ipuz files (not supported in puz)

@ianfhunter ianfhunter changed the title Add optional diagonal clues (↘ and ↙) Add diagonal clues (optional feature) Nov 25, 2026
@ianfhunter
ianfhunter marked this pull request as ready for review November 25, 2026 13:58
@mdirolf

mdirolf commented Nov 25, 2026

Copy link
Copy Markdown
Member

Wow - thanks! Might take me a bit to go through all of this - it's a big change - but it looks like you've covered most (if not all) of the bases.

If you enable diagonal clues do you have to enter a clue for every diagonal? Or is it possible to just have a couple of diagonal clues and the rest just don't appear in the solver UI?

I guess that gets at a broader issue which is rn crosshare requires an across and down clue for every entry but some formats (like drop-offs) don't use any downs. Perhaps we shouldn't be forcing constructors to add gibberish or dummy clues for all of those entries either. I suppose it just seems like the diagonal case might be more common where a constructor wants clues for the two long diagonals and none others.

@ianfhunter

Copy link
Copy Markdown
Contributor Author

Wow - thanks! Might take me a bit to go through all of this - it's a big change - but it looks like you've covered most (if not all) of the bases.

If you enable diagonal clues do you have to enter a clue for every diagonal? Or is it possible to just have a couple of diagonal clues and the rest just don't appear in the solver UI?

I guess that gets at a broader issue which is rn crosshare requires an across and down clue for every entry but some formats (like drop-offs) don't use any downs. Perhaps we shouldn't be forcing constructors to add gibberish or dummy clues for all of those entries either. I suppose it just seems like the diagonal case might be more common where a constructor wants clues for the two long diagonals and none others.

Yes, and the diagonals create a lot of potential unwanted ones. I changed the logic so that if you have not clued an across/down/diagonal it will not be shown (For the case where you maybe only had valid words in certain directions) - but with the pre-submission check it will guarantee that there must be at least one clue used for any given letter 👍

@mdirolf

mdirolf commented Nov 30, 2026

Copy link
Copy Markdown
Member

I haven't done a code review yet but a couple of thoughts while testing locally - curious to see what you think:

  • I think the toggle to enable diagonal cluing should be in the advanced section of the clues tab. I don't mind if it's also in the "more" menu where it is currently - that might be nice if/when we add an option to view/edit clues from the grid view.

  • Relatedly, there isn't currently a way to toggle diagonal mode on the edit puzzle screen for puzzles that are already published.

  • I think we should go back to the "missing clue" warning but add a checkbox or something next to each clue explicitly saying you want to skip it. Potentially with "toggle all across", "toggle all diagonal", etc. buttons or something to still make it painless to only clue one diagonal. I just think that the default is to want a clue for every across and down and this keeps the warnings nice and explicit for that case.

  • On the edit puzzle screen we'd also need to show those checkboxes and show all the potentially entries that are currently unclued - as of now once a puzzle is published you can't remove a clue that you included originally or add one that you didn't.

  • At the mobile breakpoint I can correctly highlight a diagonal entry but am not seeing the clue - probably something to do with TinyCol:

Screen Shot 2026-11-30 at 11 02 02
  • The above screenshot has only a single diagonal clue, but there are cell numbers added for (7, 9, and 11) as if there would be other diagonal clues originating there. I'm not sure if you think that's correct behavior any time diagonal clues are enabled? It seems if feasible the cleanest behavior would be to only number cells that actually have a clue requiring that number.

  • At larger breakpoints the across clue section scrolls independently and you need to scroll the outer container before the diagonal clue section below it appears - I think those should be in one container that scrolls altogether (same for down + the other diagonal direction).

Hopefully this isn't overwhelming! I really like the idea for the feature and implementation seems off to a good start :)

@ianfhunter

Copy link
Copy Markdown
Contributor Author
* I think the toggle to enable diagonal cluing should be in the advanced section of the clues tab. I don't mind if it's also in the "more" menu where it is currently - that might be nice if/when we add an option to view/edit clues from the grid view.

Sure, I can move it there 👍 I had it in the "more" section because it seemed similar to other toggles there but I don't mind either way.

* Relatedly, there isn't currently a way to toggle diagonal mode on the edit puzzle screen for puzzles that are already published.

I'll have a look

* I think we should go back to the "missing clue" warning but add a checkbox or something next to each clue explicitly saying you want to skip it. Potentially with "toggle all across", "toggle all diagonal", etc. buttons or something to still make it painless to only clue one diagonal. I just think that the default is to want a clue for every across and down and this keeps the warnings nice and explicit for that case.

Right, I can't see someone doing a fully diagonal-across-down crossword so we would need some helper for sure. I suppose if we have the diagonal toggle in the clue section those "select all" buttons could be nearby.

* On the edit puzzle screen we'd also need to show those checkboxes and show all the potentially entries that are currently unclued - as of now once a puzzle is published you can't remove a clue that you included originally or add one that you didn't.

👍

* At the mobile breakpoint I can correctly highlight a diagonal entry but am not seeing the clue - probably something to do with TinyCol:

That does seem odd. I'll replicate and fix.

* The above screenshot has only a single diagonal clue, but there are cell numbers added for (7, 9, and 11) as if there would be other diagonal clues originating there. I'm not sure if you think that's correct behavior any time diagonal clues are enabled? It seems if feasible the cleanest behavior would be to only number cells that actually have a clue requiring that number.

I think this can be folded into the "unsetting" of clues. At present I guess clues are ignored, but their numerations not removed if there are none attached to it.

* At larger breakpoints the across clue section scrolls independently and you need to scroll the outer container before the diagonal clue section below it appears - I think those should be in one container that scrolls altogether (same for down + the other diagonal direction).

Hard to visualize this, but I'm sure I'll be able to see it if I try it out 👍

Hopefully this isn't overwhelming! I really like the idea for the feature and implementation seems off to a good start :)

Thanks for the useful feedback! I'll hopefully be able to polish it up and get a more solid v2!

@mdirolf

mdirolf commented Nov 30, 2026

Copy link
Copy Markdown
Member

Right, I can't see someone doing a fully diagonal-across-down crossword so we would need some helper for sure. I suppose if we have the diagonal toggle in the clue section those "select all" buttons could be nearby.

Yeah putting the toggle in / near the clue section instead of the "advanced" section is OK with me too - whatever makes the most sense.

  • At larger breakpoints the across clue section scrolls independently and you need to scroll the outer container before the diagonal clue section below it appears - I think those should be in one container that scrolls altogether (same for down + the other diagonal direction).

Hard to visualize this, but I'm sure I'll be able to see it if I try it out 👍

LMK if you have trouble replicating - the key was to add a diagonal clue to a large grid with across/down clue lists that were already scrolling.

ianfhunter and others added 4 commits November 30, 2026 17:23
Support top-left→bottom-right and top-right→bottom-left entries alongside
Across/Down in the builder, solver, ipuz import/export, and PDF output.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sort imports, use an interface for DiagonalClueArrays, and flatten the
clue-reference regex to satisfy redos/no-vulnerable.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Add intentionally-blank clue skips, fix TinyCol/shared scroll and numbering, and expose diagonal controls on the clues/edit UIs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ianfhunter

Copy link
Copy Markdown
Contributor Author

Moved it around:
image

The mobile issue is at least addressed when i have a small desktop window:
image
You can see the fix for cells without clues too (i only have like 2 clues here).

This does mean we can theoretically have crosswords that just have no clues whatsoever, and while I can see some meta crosswords wanting one or two, you could just submit an entirely blank crossword. I could re-enable that "unclued cell" rule here. I think it probably makes sense. If someone wants it for meta they can still use the markdown trick for empty cells []().

Have not checked the scrolling in big crossword yet

@mdirolf

mdirolf commented Dec 1, 2026

Copy link
Copy Markdown
Member

Great I'll run this again today and take a look! I'd say adding unclued cell rule makes sense - let's just add it as a warning instead of an error so folks can still publish that way if they so choose.

ianfhunter and others added 2 commits December 1, 2026 16:10
Keep intentionally blank entries publishable, but surface uncovered cells as a non-blocking warning.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants