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

Edit auto-generated notes #7

Closed
lelandbatey opened this issue May 2, 2024 · 4 comments
Closed

Edit auto-generated notes #7

lelandbatey opened this issue May 2, 2024 · 4 comments

Comments

@lelandbatey
Copy link

I'm hoping for some way to edit the notes generated by the "Show auto-generated notes" toggle. For example, in the following image I can't remove 2 and 9 candidates from the other cells (the"other cells" are the cells which have 1,4,2,9 in them) in the center 3x3 even though logically I can eliminate the 2&9

Screenshot_20240502-092250~2


On more difficult sudokus when playing with "show generated notes" turned on, sometimes I want to alter the notes that are visible, even though they're generated. Right now, if the "show generated notes" is on, I can't change the notes in the squares. Usually I just deal with not being able to change the notes, but sometimes I will get desperate. In those times, I'll have to manually copy all the generated notes to the "normal notes"/"user notes" and then make my changes to the notes. But then I lose the ability for future correct guesses to be automatically tracked in the notes.

I'd like some way to be able to turn on auto-generated notes while also being able to change those auto-generated notes somehow. I realize though that might be quite annoying to implement.

If I were to speculate about implementing this feature (I've not looked at the code) the most complete solution seems like you'd have to track both the auto-generated notes and the users changes to those notes and reconcile them somehow; maybe via a kind of "layer" system.

A potentially easier but less comprehensive implementation would be a button labeled something like "copy auto-generated notes into user notes" which does a one-time copy of the auto-notes to the notes which are editable by the user when the the button is clicked. This approach would cut out the step I described where I manually copy the auto-notes, but that'd still leave me to manually manage the notes going forward. Though I suppose manually managing the notes would be much easier now that I've got a buttong that does a one-way sync from auto-notes to user notes...

Anyway, thank you again for such a snappy, polished, accessible, and fun sudoku implementation!

@TN1ck
Copy link
Owner

TN1ck commented May 7, 2024

Thank you for the detailed request, I will get to it in the next weeks.

@TN1ck
Copy link
Owner

TN1ck commented May 25, 2024

You are right, the best way is to reconcile both the auto and manual notes.

I think the best is to make to:

  • Add a notion of added / rejected note, currently the notes are just a list of numbers
  • With that I can make the auto generated notes be be preselected for the user and they can reject them
  • When the auto generated notes change, the rejected notes will still be there and I can remove them from the auto generated notes

I think there is no value in showing a manual note that is already rejected by the auto notes, so I will make sure those cannot be selected.

@TN1ck
Copy link
Owner

TN1ck commented May 25, 2024

@lelandbatey Actually it was easier. I'm not doing a reconciliation, but instead I use the auto generated notes as a starting point for the user notes when they set one. I added some highlighting of notes on the buttons to make this more obvious. When all user notes are deselected, the auto notes are used again for that specific cell. Let me know if this works as expected or if some behaviour is unusual / could be improved.

@lelandbatey
Copy link
Author

I love this change, it allows me to remove auto-generated notes just like I asked. Thank you so much for making this change!

@TN1ck TN1ck closed this as completed Jul 26, 2024
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