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

Fix #193. Add short answers. Improve auto clicking of the Next button. #205

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from

Conversation

glebkema
Copy link

@glebkema glebkema commented Oct 19, 2020

Fix #193

Levels 19 and 24 have two solutions – with a shorthand property flex-flow and without it. When the user types a short solution, the Next button becomes available, but pressing Enter in the code area doesn't automatically activate this button.

To fix this, I've made the following improvements:

  1. Add short alternatives for answers in the level.js file with the styleShort key.
  2. Calculate the two data values min and max for the short and long versions of the answer (instead of the single parameter lines).
  3. Check if the Next button is enabled to automatically click it (instead of comparing the length of the code).
  4. Check if the code is longer than the short answer to start additional checks.
  5. Check if the truncated code is longer than the long answer to prevent new blank lines from appearing.

I've tested the new behavior on my localhost.
Would be glad for your feedback.

@glebkema
Copy link
Author

I've resolved the merge conflict for this PR

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.

On the last level, pressing enter to go to next screen doesn't work
1 participant