-
Notifications
You must be signed in to change notification settings - Fork 411
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
Movie Chatbot #296
Open
Fannyhenriques
wants to merge
11
commits into
Technigo:main
Choose a base branch
from
Fannyhenriques:main
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
Movie Chatbot #296
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ea72aa9
started with project chatbot
Fannyhenriques 8e5546f
removed unessecary code and added variabels and eventlisteners
Fannyhenriques 6854fdd
added options for user to choose between
Fannyhenriques f9742c3
added if statements to the movieoptions
Fannyhenriques 321c568
tried adding correct value to handleselectmovieoption
Fannyhenriques 4f238fe
updated user value
Fannyhenriques fe28ae9
removed wrong code if (event.target.id === 'submit-movie')
Fannyhenriques c0ee57b
tried adding confirmation
Fannyhenriques b2c6dff
tried calling function confirmation
Fannyhenriques 179a390
updated functions and added a readme
Fannyhenriques d17e473
updated readme
Fannyhenriques 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,13 +1,26 @@ | ||
# Project Name | ||
Project Name: Movie chatbot | ||
|
||
Replace this readme with your own information about your project. | ||
|
||
Start by briefly describing the assignment in a sentence or two. Keep it short and to the point. | ||
The purpose of this project was to create an interactive chatbot that engages users in a conversational flow. The chatbot greets the user, allows them to pick a movie genre, select their age group, and then suggests appropriate movies based on their choices. | ||
|
||
## The problem | ||
|
||
Describe how you approached to problem, and what tools and techniques you used to solve it. How did you plan? What technologies did you use? If you had more time, what would be next? | ||
Functionality & Hierarchy: | ||
One of the primary challenges was creating functions that worked correctly while maintaining the proper structure of the website. Organizing the site hierarchically to ensure the right values and variables were filled out, and functions were called properly, was difficult. | ||
|
||
Variable Scope: | ||
Another challenge was understanding where to place variables and values to ensure they were accessible at the right times. I struggled with ensuring that variables were in the correct scope so they could be used within functions. I solved this by restructuring my code and moving variables to the global scope when necessary, ensuring they were introduced before being called in functions. | ||
|
||
Event Listeners: | ||
Setting up event listeners properly was tricky. Ensuring that they triggered the correct actions at the right time required careful structuring. I tested different ways of implementing event listeners, it took some time to learn how to ensure they correctly triggered the right functions. | ||
|
||
I used console.log extensively throughout the project to trace the flow of my code and see where issues were occurring. This helped me a lot with identifying bugs. | ||
|
||
If I had more time: | ||
I would focus on cleaning up the structure of the code to make it shorter and more efficient. Right now, there is a lot of repeated code that I think could be simplified. For example, I believe there are opportunities to combine similar functions so that one function could handle multiple tasks instead of writing the same type of logic repeatedly. | ||
|
||
Fixing the Final Error: I encountered a TypeError: Cannot read properties of null (reading 'value') error when the user clicks "Yes" or "No" at the end of the flow. I couldn't solve this issue in the given time, but with more time, I would focus on fixing this error, possibly by ensuring that the selected movie value is properly stored and accessible when the confirmation step is triggered. | ||
|
||
## View it live | ||
|
||
Have you deployed your project somewhere? Be sure to include the link to the deployed project so that the viewer can click around and see what it's all about. | ||
https://moviechatbot.netlify.app/ | ||
|
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,32 +1,33 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="stylesheet" href="./style.css" /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" | ||
rel="stylesheet" /> | ||
<title>Chatbot</title> | ||
</head> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="stylesheet" href="./style.css" /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" | ||
rel="stylesheet" /> | ||
<title>Movie-chatbot</title> | ||
</head> | ||
|
||
<body> | ||
<h1>Welcome to my chatbot!</h1> | ||
<main> | ||
<section class="chat" id="chat"></section> | ||
<div class="input-wrapper" id="input-wrapper"> | ||
<form id="name-form"> | ||
<label for="name-input">Name</label> | ||
<input id="name-input" type="text" /> | ||
<button class="send-btn" type="submit"> | ||
Send | ||
</button> | ||
</form> | ||
</div> | ||
</main> | ||
<body> | ||
<h1>Welcome to the Movie-chatbot!🍿</h1> | ||
<main> | ||
<section class="chat" id="chat"></section> | ||
<div class="input-wrapper" id="input-wrapper"> | ||
<form id="name-form"> | ||
<label for="name-input">Name</label> | ||
<!-- added required for input field --> | ||
<input id="name-input" type="text" required /> | ||
<button class="send-btn" type="submit"> | ||
Send | ||
</button> | ||
</form> | ||
</div> | ||
</main> | ||
|
||
<script src="./script.js"></script> | ||
</body> | ||
<script src="./script.js"></script> | ||
</body> | ||
|
||
</html> | ||
</html> |
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
Oops, something went wrong.
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.
This could maybe be refactored 👀