-
Notifications
You must be signed in to change notification settings - Fork 2
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
Added validation to current row submission #8
Open
Jing1524
wants to merge
6
commits into
bgwebagency:main
Choose a base branch
from
Jing1524:validateCurrentRowSubmission
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
67018ca
add validation to curren row submittion
Jing1524 d233404
put back the word list in json file, removed partial for testing purpose
Jing1524 c9c8526
cleaning out logs
Jing1524 7ace9ff
keep track of current row index, to prevent previous row color change…
Jing1524 80d85d3
return after invalid subssion to prevent user going into next row
Jing1524 1f532ce
clear out the logs
Jing1524 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,89 @@ | ||
#root { | ||
max-width: 1280px; | ||
margin: 0 auto; | ||
padding: 2rem; | ||
text-align: center; | ||
max-width: 1280px; | ||
margin: 0 auto; | ||
padding: 2rem; | ||
text-align: center; | ||
} | ||
|
||
.logo { | ||
height: 6em; | ||
padding: 1.5em; | ||
will-change: filter; | ||
transition: filter 300ms; | ||
height: 6em; | ||
padding: 1.5em; | ||
will-change: filter; | ||
transition: filter 300ms; | ||
} | ||
.logo:hover { | ||
filter: drop-shadow(0 0 2em #646cffaa); | ||
filter: drop-shadow(0 0 2em #646cffaa); | ||
} | ||
.logo.react:hover { | ||
filter: drop-shadow(0 0 2em #61dafbaa); | ||
filter: drop-shadow(0 0 2em #61dafbaa); | ||
} | ||
|
||
@keyframes logo-spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
|
||
@media (prefers-reduced-motion: no-preference) { | ||
a:nth-of-type(2) .logo { | ||
animation: logo-spin infinite 20s linear; | ||
} | ||
a:nth-of-type(2) .logo { | ||
animation: logo-spin infinite 20s linear; | ||
} | ||
} | ||
|
||
.card { | ||
padding: 2em; | ||
padding: 2em; | ||
} | ||
|
||
.read-the-docs { | ||
color: #888; | ||
color: #888; | ||
} | ||
|
||
.board { | ||
display: flex; | ||
flex-direction: column; | ||
row-gap: 5px; | ||
display: flex; | ||
flex-direction: column; | ||
row-gap: 5px; | ||
} | ||
|
||
.row { | ||
display: flex; | ||
flex-direction: row; | ||
column-gap: 5px; | ||
display: flex; | ||
flex-direction: row; | ||
column-gap: 5px; | ||
} | ||
|
||
.letter { | ||
width: 62px; | ||
height: 62px; | ||
border: 2px solid #3a3a3c; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
font-size: 2rem; | ||
line-height: 1; | ||
font-weight: bold; | ||
width: 62px; | ||
height: 62px; | ||
border: 2px solid #3a3a3c; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
font-size: 2rem; | ||
line-height: 1; | ||
font-weight: bold; | ||
} | ||
|
||
.letter.incorrect { | ||
background: #3a3a3c; | ||
/* background: #3a3a3c; */ | ||
background: #888; | ||
} | ||
|
||
.letter.correct { | ||
background: #538d4e; | ||
border-color: #538d4e; | ||
background: #538d4e; | ||
border-color: #538d4e; | ||
} | ||
|
||
.letter.nearby { | ||
background: #b59f3b; | ||
border-color: #b59f3b; | ||
background: #b59f3b; | ||
border-color: #b59f3b; | ||
} | ||
|
||
/* keep the p tag in the dom, to avoid grid shifting */ | ||
.visible { | ||
visibility: visible; | ||
} | ||
.invisible { | ||
visibility: hidden; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also do
setInvalidWordError(false)
in your code.Because of this there is a bug now. If you enter a wrong word, it's showing the error message properly. But when user corrects the word, the highlighting of letters does not work. Because invalidWordError is still true.
How to Fix?
setInvalidWordError(false)
here in else condition or,I would prefer the second option since that's what is implemented on the official wordle site https://www.nytimes.com/games/wordle/index.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good Point!
will sort that out later today, and let you know once im done! Thank you for the feedback. :)