Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement core features of "The Guardian" style crossword #25

Open
9 tasks
dwmkerr opened this issue Feb 21, 2023 · 6 comments
Open
9 tasks

Implement core features of "The Guardian" style crossword #25

dwmkerr opened this issue Feb 21, 2023 · 6 comments

Comments

@dwmkerr
Copy link
Owner

dwmkerr commented Feb 21, 2023

Here's a sample:

image

https://www.theguardian.com/crosswords/quick/16472#5-across

Features that this has, that we might implement (note that we should split the samples to have a 'vanilla' sample, then a 'guardian' sample, that changes the styles (showing you can style your crosswords how you like):

  • url includes current clue, meaning we can share links to clues
  • clue list on RHS
  • blinking cursor, better cell highlight
  • backspace to delete cells, rather than move back
  • reveal
  • check
  • reveal all
  • check all
  • TODO check what else is missing!
@pvspain
Copy link
Contributor

pvspain commented Feb 23, 2023

This all looks great Dave! @dwmkerr
[reveal, check, reveal all, check all] is core functionality that I'm keen to see RSN.

This will require some design for integration of the crossword solution into the crossword model. Perhaps we start a design document to aid comms and serve as developer documentation as well?

I like the clue URL - great for sharing. We'll need to add a routing interface to the API. Routing would also be a good solution for puzzle selection. Again, we should document the design as a basis for sequencing implementation and breaking into features.

I've been thinking a bit about how to abstract keyboard behaviour to support multiple collections of keyboard shortcuts - guardian, age, nytimes etc. The behaviour is spread across multiple event handlers. I was thinking we could add operation primitives to the crossword model - select a given (clue,cell index), move to next/prev cell, move to next/prev clue. This would move a lot of that code out of the DOM event handlers and simplify implementation of other selection methods like URL.
The different short cut collections could then be implemented as collections of event handler groups.

My big picture view is to be able to cooperate on a crossword with other people in real time. This would require socket I/O as well as keyboard events. It may be out of scope for this package. What do you think? @dwmkerr

@pvspain
Copy link
Contributor

pvspain commented Oct 15, 2023

https://www.theguardian.com/crosswords/quick/16472#5-across

Features that this has, that we might implement (note that we should split the samples to have a 'vanilla' sample, then a 'guardian' sample, that changes the styles (showing you can style your crosswords how you like):

Are you offering to do the Guardian sample? ;)
The anagram helper doesn't seem very helpful! Perhaps I'm missing something?!

  • url includes current clue, meaning we can share links to clues

Perhaps we could overload the setter for controller.currentClue to take a clue.id string value. This would allow the current clue to be set programmatically from a separate context; for example, a container application.
Perhaps a separate controller method would be better, so we don't take the overload parsing hit whenever the controller.currentClue changes.

  • clue list on RHS

This feature has been added

  • blinking cursor, better cell highlight

These are styling issues, and can be overridden in the user's application.

  • backspace to delete cells, rather than move back

This has been fixed

  • reveal

Feature added for letters and whole clues.

  • check
  • reveal all
  • check all

These features have all been added.

@dwmkerr
Copy link
Owner Author

dwmkerr commented Oct 17, 2023

Yep I'd like to work on this! Should be able to carve out some time in a couple of weeks when my current project winds down :)

@pvspain
Copy link
Contributor

pvspain commented Oct 17, 2023

Awesome! Thanks.

@pvspain
Copy link
Contributor

pvspain commented Oct 17, 2023

I've been doing some research on monorepos. I have an O'Reilly subscription which includes access to the Packt book Modern Frontend Development with Node.js. It includes a survey of the monorepo solutions out there.
It seems that the npm workspaces feature may be sufficient for our initial needs. I'd prefer not to drag in additional tooling until we need the benefits.

@dwmkerr
Copy link
Owner Author

dwmkerr commented Oct 23, 2023

Yeah I think actually a single repo is probably easier, being able to clone a single repo and see various samples and so on is more convenient that cloning multiple. A monorepo would make sense - I'll hold off any large changes for now though, got a couple of busy weeks at work then should get some more time!

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

No branches or pull requests

2 participants