Closed Charlie-robin closed 1 year ago
@Charlie-robin Thanks for the feedback, I am stoked to get full marks and I really enjoyed this project. Some really nice comments in here and I am very happy.
Some really good feedback here on the constructive side, I particularly liked the refactoring of the precedenceMap to include the logic.
I have implemented every change you have listed here, Cypress is still passing so that good and I added another test case for the bug you found, now if you do 5 + 5 =
you'll get 10 and then I store this as the next number, disabled numbers so that only operator can be used.
Really appreciate the link to that codepen and appeciate you taking the time to make it, I have now implemented this for the toggle here and I must say its way easier now. I also tweaked the colors on the light mode as you said they didn;t stand out too much.
All style tweaks have been implemented, lets changed to const where needed and destructuring in logical places.
Per your second bullet point - I do intend going over board with future projects - see Snake :)
@adampaulsackfield That is good to hear and you deserved all of them, probably more š .
Good, I am glad you added it, to me it made sense to add it to the object. I am stoked you have managed to do all the tweaks as well so quickly.
Yeah of course I look forward to looking at snake, there probably will be a little bit of a delay to give you detailed feedback š .
Feedback
Requirements
eval()
: DONELets Build
Score
MARKING-SCHEME
Feedback
The UI
Positive
var()
CSS function. You can create another class with the same named variables but with different values. This means you can just swap the classes and only the variable values change.Constructive
.container
I would remove themax-width:95vw
and give it some padding insteadpadding: 1rem
. This should put it in the centre and have even spacing on each side. At the moment the right-hand side has more than the left.margin-bottom: 1rem
from your.calculator__button
.calculator
class addedgap: 1rem
to make up for the margin you removedjustify-items : center
to move your buttons into the centre of your grid tiles.The Code
Positive
maps.js
, both for storing values and also the functionality....
cloning your objects & nested objects is great.Constructive
I am not sure if this is a bug but:
In
events.js
you pass arrow functions into your event listeners these get the event and pass them into your function. You shouldn't have to do this. I think the first arg of any function you give to an event listener is the event. You shouldn't have to pass it as you have.decimal.addEventListener('click', (e) => handleDecimal(e));
->decimal.addEventListener('click', handleDecimal)
In
functions.js
a couple of times you get state and only need one key, you could use destructuring here.let
you don't reassign them so they can beconst
.precedenceMap[char] <= precedenceMap[stack[stack.length - 1]]
could be a method on theprecedenceMap
?