Giter Club home page Giter Club logo

rentable's People

Contributors

djghosh13 avatar karu-des avatar ren-zhou avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

rentable's Issues

Clearing puzzle after validation causes typing to be blank

Describe the bug
when you clear all on a puzzle then type into words that were previously validated, the letters do not show up and then letters afterwards are moved upwards.
To Reproduce
Steps to reproduce the behavior:

  1. Go to any puzzle
  2. complete one word and validate it
  3. click the clear button
  4. type into the spaces and after
  5. observe

Expected behavior
should behave it normally would on a fresh crossword

Selecting clues sometimes selects wrong direction

Describe the bug
Selecting a clue by clicking on the clues list sometimes results in the wrong clue direction being highlighted (e.g. 1 Across when clicking on 1 Down).

To Reproduce
Steps to reproduce the behavior:

  1. Open up any puzzle with an across and down clue with the same number (for example, 1A and 1D)
  2. Click on the cell that is the start of both clues (the cell with the clue number)
  3. One of the clues will be highlighted, and corresponding cells will also be highlighted correctly
  4. Clicking on the other clue will highlight the clue but not change the highlighted cells, resulting in incorrect cell highlighting
  5. Clicking back to the first clue will highlight the wrong cells again

Expected behavior
Clicking on a clue should cause the corresponding cells in the correct direction to be highlighted. Regardless of navigation behavior, the highlighted clue should match the highlighted cells.

Screenshots
image
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Edge
  • Version 91.0.864.67

Additional context
The problem occurs due to how clue selection is handled:

rentable/clues.js

Lines 73 to 85 in 54b9eb5

function selectClue(clue, across) {
if (clue == prevClue) return;
let num = across? acrossNum : downNum;
puzzle.inputAcross = across;
let clueNum = numOfClue(clue);
for (let cell of puzzle.cells) {
if (num(cell) == clueNum) {
selectCell(cell);
highlightClue(clue);
return;
}
}
}

The clue selection behavior forces the cells direction to match the direction of the clue that was selected. This would usually result in correct behavior, but the clue selection is handled by calling selectCell on the first cell of the clue.
If the cell is already selected (as it would be if you had selected the other clue starting from the same cell), then smartSwitch is called:

rentable/cell.js

Lines 6 to 11 in 54b9eb5

if (cell.classList.contains("cell-selected")) {
deselectCurrent();
smartSwitch(cell);
selectCell(cell);
return;
}

And this toggles the direction yet again, causing the actual selected cells direction to be incorrect.

Hope this helps!

Grid navigation when typing

When you finish typing in a clue, the cursor moves to the next cell, often in a way that breaks the flow of navigation, rather than jumping to the next across or down clue as appropriate.

Pencil-in feature

Is your feature request related to a problem? Please describe.
There is no way to mark that you are uncertain about a cell and would want to verify it with crosses.

Describe the solution you'd like
You should be able to have a "pencil" mode where you can fill in answers that are displayed differently than normal filled in cells and will not be considered for validation.

Button to validate entire puzzle

Is your feature request related to a problem? Please describe.
Often, you don't check words as you go and instead want to check that everything is correct when you're stuck and cannot progress in the puzzle. In these cases, clicking on every word and validating it is annoying.

Describe the solution you'd like
There should be an option under validate to either validate all clues or just the currently selected one.

Describe alternatives you've considered
Alternatively, a separate button for grid/all clue validation could be added.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.