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

Trattoria pizzeria #147

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open

Trattoria pizzeria #147

wants to merge 25 commits into from

Conversation

zoe-lindqvist
Copy link

Copy link
Contributor

@HIPPIEKICK HIPPIEKICK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on your project! I can see you have put in a lot of effort to make this dynamic 🍕

JavaScript

  • Really nice that you're preloading the background image! Clever 👀
  • Excellent validation, super nice that you've created a function for this!
  • Nice usage of objects as well! For future reference: name object keys in lowercase
  • Nice usage of the while loop, and nice validation with isNan 👍

Clean Code
Your code is easy to follow and is well-formatted too.

Keep up the good work, I'm impressed by the complexity of this project. Shows that you're eager to proceed to coming weeks' material 😉

code/script.js Outdated
Comment on lines 151 to 154
document.getElementById("startOrder").addEventListener("click", (event) => {
event.preventDefault(); //the default action is stopped i.e promt
startOrder();
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

@HeleneWestrin HeleneWestrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late review Zoe!

Your code was really easy to follow and very nice overall. Very inspiring. It was hard to find anything to suggest improvement on 😄 Great work!! I just had one suggestion that could improve the user experience somewhat.

Keep up the good work!

@@ -1,19 +1,160 @@
// Start here
// preloads the background img to avoid delays

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very smart to preload the background image 👍

// Your code goes here
// Function to get valid user selection
// Two parameters (promptText: for questions), (options: for valid inputs)
const getValidSelection = (promptText, options) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really like this approach, wish I had thought of it ⭐

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only thing I thought of while trying your bot was that as a user I couldn't cancel during the order process. Clicking "Cancel" just prompted the "Invalid option" alert over and over. Maybe find a way to check if the user has clicked "Cancel" and then cancel the order instead.

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.

3 participants