Skip to content

T02 vue1 - #54

Closed
braughtg wants to merge 38 commits into
mainfrom
t02-vue1
Closed

T02 vue1#54
braughtg wants to merge 38 commits into
mainfrom
t02-vue1

Conversation

@braughtg

@braughtg braughtg commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Type of Work

Check the box beside the Type of Work to indicate whether this pull request is for a tutorial or an extension. If editing, place an X in the [ ] (e.g. [X] to check it.

  • - Tutorial
  • - Extension

Topic

Check the box beside the topic to which course topic this pull request applies. If editing, place an X in the [ ] (e.g. [X] to check it.

  • - 01 - HTML/CSS/JS
  • - 02 - Vue 1
  • - 03 - Vue 2
  • - 04 - Vue 3
  • - 05 - Vue 4
  • - 06 - Cypress Testing
  • - 07 - Vue Lifecycle Hooks and API Calls

Time Estimate

Provide an estimate of the number of hours you spent working on the contents of this pull request.

Additional Information

Provide any feedback you have that might help improve this assignment for future students.

Copilot stopped work on behalf of braughtg due to an error August 25, 2026 20:19
@braughtg

Copy link
Copy Markdown
Contributor Author

@copilot review this pull request.

@braughtg

Copy link
Copy Markdown
Contributor Author

@copilot review this pull request.

@braughtg

Copy link
Copy Markdown
Contributor Author

@copilot review this pull request.

Copilot AI commented Aug 25, 2026

Copy link
Copy Markdown

@copilot review this pull request.

Project Structure

Requirement Status Evidence
There is a directory named flashword within the web-projects directory. The directory web-projects/flashword exists.
The flashword directory contains the files index.html and app.js. Both index.html and app.js are present inside web-projects/flashword.
index.html loads vue.global.js from https://unpkg.com/vue@3/dist/vue.global.js. Line 7 of index.html is <script src="https://unpkg.com/vue@3/dist/vue.global.js" defer></script>.
index.html loads app.js in a <script> tag. Line 8 of index.html is <script src="app.js" defer></script>.
app.js disables an eslint rule with the line // eslint-disable-next-line no-unused-vars, no-undef Line 37 of app.js contains // eslint-disable-next-line no-unused-vars, no-undef.

Workflow

Requirement Status Evidence
The pull request contains at least three commits. The pull request contains 36 commits (which is at least 3 commits).
The commit messages briefly describe the changes made in the commit. The commit messages briefly describe the changes made (e.g. "adds mistakes again", "Merge branch 'main' into t02-vue1").

index.html Functionality

Requirement Status Evidence
data binding is used to display a word to be translated from the vue data. Line 39 in index.html displays the Spanish word dynamically using dynamic interpolation: {{ wordA }}.
a text input is used to allow the user to enter a translation for the word. Line 41 in index.html uses an <input type="text" v-model="answer" /> tag.
data binding is used to display the user's translation as it is typed. There is no data binding expression (such as {{ answer }}) in index.html that displays the user's translation dynamically as it is typed.
the value of the text input is bound to a vue data property. Line 41 in index.html binds the text input value to the answer Vue data property via v-model="answer".
a "Check Answer" button uses an on-click directive to call a vue method that checks the translation. Line 43 in index.html uses <button v-on:click="checkAnswer()"> to invoke the checkAnswer method when clicked.
a v-if directive is used to display a feedback message after the "Check Answer" button is clicked. Line 45 in index.html uses v-if="showFeedback" to display the feedback section.
v-if and v-else directives are used to display correct or incorrect feedback messages. There are no v-if and v-else directives (or equivalent) in index.html to toggle correct/incorrect feedback messages. Line 46 only displays a success message using v-if="correct": <p v-if="correct" class="correct">You got it!</p>.
a "Reset" button uses an on-click directive to call a vue method that resets the input and feedback message. Line 47 in index.html has <button v-on:click="fail()">Reset</button> which invokes fail() instead of the required reset() method.
the div with the id app has the v-cloak directive. Line 38 of index.html has <div id="app" v-cloak>.

The checkAnswer method

Requirement Status Evidence
sets the correct flag in the vue data to true if the answer is correct, otherwise sets it to false. The logic in app.js is inverted: this.correct = this.wordB !== this.answer; sets correct to true when the answer is incorrect, and false when it is correct.
sets the show feedback flag in the vue data to true. Line 28 in app.js sets this.showFeedback = true;.

The reset method`

Requirement Status Evidence
clears the user's answer in the vue data. Line 31 in app.js sets this.answer to 'q' instead of clearing it (e.g., setting it to '').
sets the show feedback flag in the vue data to false. Line 32 in app.js sets this.showFeedback to true instead of false.

@braughtg

Copy link
Copy Markdown
Contributor Author

@copilot review this pull request.

Copilot AI commented Aug 25, 2026

Copy link
Copy Markdown

@copilot review this pull request.

Project Structure

Requirement Status Evidence
There is a directory named flashword within the web-projects directory. The directory web-projects/flashword exists.
The flashword directory contains the files index.html and app.js. Both index.html and app.js are present inside web-projects/flashword.
index.html loads vue.global.js from https://unpkg.com/vue@3/dist/vue.global.js. Line 7 of index.html loads Vue from the specified URL: <script src="https://unpkg.com/vue@3/dist/vue.global.js" defer></script>.
index.html loads app.js in a <script> tag. Line 8 of index.html loads app.js using <script src="app.js" defer></script>.
app.js disables an eslint rule with the line // eslint-disable-next-line no-unused-vars, no-undef Line 37 of app.js contains the exact line: // eslint-disable-next-line no-unused-vars, no-undef.

Workflow

Requirement Status Evidence
The pull request contains at least three commits. The pull request contains 37 commits (which is at least 3 commits).
The commit messages briefly describe the changes made in the commit. The commit messages briefly describe the changes made (e.g. "require new review if there were new commits", "adds mistakes again").

index.html Functionality

Requirement Status Evidence
data binding is used to display a word to be translated from the vue data. Line 39 in index.html dynamically displays the Spanish word wordA using interpolation: {{ wordA }}.
a text input is used to allow the user to enter a translation for the word. Line 41 of index.html uses an <input type="text" v-model="answer" /> tag.
data binding is used to display the user's translation as it is typed. Line 43 of index.html displays the translation dynamically as it is typed: <p v-if="answer != ''">You answered: {{ answer }}</p>.
the value of the text input is bound to a vue data property. Line 41 of index.html binds the text input to the answer Vue data property via v-model="answer".
a "Check Answer" button uses an on-click directive to call a vue method that checks the translation. Line 45 of index.html uses <button v-on:click="checkAnswer()">Check answer</button> which invokes the checkAnswer method when clicked.
a v-if directive is used to display a feedback message after the "Check Answer" button is clicked. Line 47 of index.html uses v-if="showFeedback" on a <template> tag to display the feedback section.
v-if and v-else directives are used to display correct or incorrect feedback messages. Lines 48 and 49 of index.html use v-if="correct" and v-else respectively to toggle between correct/incorrect feedback messages: <p v-if="correct" class="correct">You got it!</p> and <p v-else class="incorrect">Sorry, please try again.</p>.
a "Reset" button uses an on-click directive to call a vue method that resets the input and feedback message. Line 50 of index.html uses a Reset button: <button v-on:click="reset()">Reset</button> which calls the reset() method.
the div with the id app has the v-cloak directive. Line 38 of index.html contains <div id="app" v-cloak>.

The checkAnswer method

Requirement Status Evidence
sets the correct flag in the vue data to true if the answer is correct, otherwise sets it to false. Line 27 in app.js sets this.correct = this.wordB == this.answer to evaluate if the input matches the translation.
sets the show feedback flag in the vue data to true. Line 28 in app.js sets this.showFeedback = true.

The reset method`

Requirement Status Evidence
clears the user's answer in the vue data. Line 31 in app.js sets this.answer = ''.
sets the show feedback flag in the vue data to false. Line 32 in app.js sets this.showFeedback = false.

@braughtg

Copy link
Copy Markdown
Contributor Author

@copilot review this pull request.

Copilot AI commented Aug 25, 2026

Copy link
Copy Markdown

@copilot review this pull request.

Project Structure

Requirement Status Evidence
There is a directory named flashword within the web-projects directory. The directory web-projects/flashword exists.
The flashword directory contains the files index.html and app.js. Both index.html and app.js are present in web-projects/flashword.
index.html loads vue.global.js from https://unpkg.com/vue@3/dist/vue.global.js. Line 7 of index.html is <script src="https://unpkg.com/vue@3/dist/vue.global.js" defer></script>.
index.html loads app.js in a <script> tag. Line 8 of index.html is <script src="app.js" defer></script>.
app.js disables an eslint rule with the line // eslint-disable-next-line no-unused-vars, no-undef Line 37 of app.js contains the required ESLint disable comment.

Workflow

Requirement Status Evidence
The pull request contains at least three commits. The pull request contains 38 commits (which is at least 3 commits).
The commit messages briefly describe the changes made in the commit. The commit messages briefly describe the changes made (e.g. "add mistakes for testing", "Merge branch 'main' into t02-vue1").

index.html Functionality

Requirement Status Evidence
data binding is used to display a word to be translated from the vue data. Line 39 in index.html displays the Spanish word dynamically using dynamic interpolation: {{ wordA }}.
a text input is used to allow the user to enter a translation for the word. Line 41 of index.html uses an <input type="text" v-model="answer" /> tag.
data binding is used to display the user's translation as it is typed. Line 43 uses v-if="answer == ''" which hides the paragraph when the user has typed an answer: <p v-if="answer == ''">You answered: {{ answer }}</p>.
the value of the text input is bound to a vue data property. Line 41 of index.html binds the text input to the answer Vue data property via v-model="answer".
a "Check Answer" button uses an on-click directive to call a vue method that checks the translation. Line 45 of index.html uses a <button v-on:click="checkAnswer()"> to invoke the checkAnswer method when clicked.
a v-if directive is used to display a feedback message after the "Check Answer" button is clicked. Line 47 of index.html uses v-if="showFeedback" to display the feedback section.
v-if and v-else directives are used to display correct or incorrect feedback messages. There is no v-else block to display incorrect feedback messages. Line 48 only displays a success message using v-if="correct": <p v-if="correct" class="correct">You got it!</p>.
a "Reset" button uses an on-click directive to call a vue method that resets the input and feedback message. Line 50 has <button v-on:click="resetting()">Reset</button> which invokes resetting() instead of reset().
the div with the id app has the v-cloak directive. Line 38 of index.html has <div id="app" v-cloak>.

The checkAnswer method

Requirement Status Evidence
sets the correct flag in the vue data to true if the answer is correct, otherwise sets it to false. Line 27 in app.js is this.correct = this.wordB !== this.answer; which sets correct to true when the answer is incorrect, and false when it is correct (inverted logic).
sets the show feedback flag in the vue data to true. Line 28 in app.js sets this.showFeedback = true;.

The reset method`

Requirement Status Evidence
clears the user's answer in the vue data. Line 31 of app.js sets this.answer = null; which does not clear it to an empty string ('').
sets the show feedback flag in the vue data to false. Line 32 in app.js sets this.showFeedback = false;.

@braughtg

Copy link
Copy Markdown
Contributor Author

@copilot review this pull request.

Copilot AI commented Aug 25, 2026

Copy link
Copy Markdown

@copilot review this pull request.

Project Structure

Requirement Status Evidence
There is a directory named flashword within the web-projects directory. The directory web-projects/flashword exists.
The flashword directory contains the files index.html and app.js. Both index.html and app.js are present inside web-projects/flashword.
index.html loads vue.global.js from https://unpkg.com/vue@3/dist/vue.global.js. Line 7 of index.html loads Vue from the specified URL: <script src="https://unpkg.com/vue@3/dist/vue.global.js" defer></script>.
index.html loads app.js in a <script> tag. Line 8 of index.html loads app.js using <script src="app.js" defer></script>.
app.js disables an eslint rule with the line // eslint-disable-next-line no-unused-vars, no-undef Line 37 of app.js contains the exact line: // eslint-disable-next-line no-unused-vars, no-undef.

Workflow

Requirement Status Evidence
The pull request contains at least three commits. The pull request contains 38 commits (which is at least 3 commits).
The commit messages briefly describe the changes made in the commit. The commit messages briefly describe the changes made (e.g. "require new review if there were new commits").

index.html Functionality

Requirement Status Evidence
data binding is used to display a word to be translated from the vue data. Line 39 in index.html dynamically displays the Spanish word wordA using interpolation: {{ wordA }}.
a text input is used to allow the user to enter a translation for the word. Line 41 of index.html uses an <input type="text" v-model="answer" /> tag.
data binding is used to display the user's translation as it is typed. Line 43 of index.html displays the translation dynamically as it is typed: <p v-if="answer != ''">You answered: {{ answer }}</p>.
the value of the text input is bound to a vue data property. Line 41 of index.html binds the text input to the answer Vue data property via v-model="answer".
a "Check Answer" button uses an on-click directive to call a vue method that checks the translation. Line 45 of index.html uses <button v-on:click="checkAnswer()">Check answer</button> which invokes the checkAnswer method when clicked.
a v-if directive is used to display a feedback message after the "Check Answer" button is clicked. Line 47 of index.html uses v-if="showFeedback" on a <template> tag to display the feedback section.
v-if and v-else directives are used to display correct or incorrect feedback messages. Lines 48 and 49 of index.html use v-if="correct" and v-else respectively to toggle between correct/incorrect feedback messages: <p v-if="correct" class="correct">You got it!</p> and <p v-else class="incorrect">Sorry, please try again.</p>.
a "Reset" button uses an on-click directive to call a vue method that resets the input and feedback message. Line 50 of index.html uses a Reset button: <button v-on:click="reset()">Reset</button> which calls the reset() method.
the div with the id app has the v-cloak directive. Line 38 of index.html contains <div id="app" v-cloak>.

The checkAnswer method

Requirement Status Evidence
sets the correct flag in the vue data to true if the answer is correct, otherwise sets it to false. Line 27 in app.js sets this.correct = this.wordB == this.answer to evaluate if the input matches the translation.
sets the show feedback flag in the vue data to true. Line 28 in app.js sets this.showFeedback = true.

The reset method`

Requirement Status Evidence
clears the user's answer in the vue data. Line 31 in app.js sets this.answer = ''.
sets the show feedback flag in the vue data to false. Line 32 in app.js sets this.showFeedback = false.

@braughtg

Copy link
Copy Markdown
Contributor Author

Used for testing.

@braughtg braughtg closed this Aug 26, 2026
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.

2 participants