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

make sure the question count v-model uses .number #12407

Merged

Conversation

marcellamaki
Copy link
Member

Summary

Fixes #12406 by adding .number to the questionCount v-model. I think this is okay, but alternatively I could update the increment to parseInt() if that's preferable

References

add-not-concat.mp4

Reviewer guidance

In develop, input a number of questions typing into the textbox (i.e. 5) and then click the "+" button. You should see 51, rather than 6.
Checkout PR, and do the same. It should add the value, not concat as strings

Testing checklist

  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • Critical user journeys are covered by Gherkin stories
  • Critical and brittle code paths are covered by unit tests

PR process

  • PR has the correct target branch and milestone
  • PR has 'needs review' or 'work-in-progress' label
  • If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')
  • If this is an important user-facing change, PR or related issue has a 'changelog' label
  • If this includes an internal dependency change, a link to the diff is provided

Reviewer checklist

  • Automated test coverage is satisfactory
  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

@marcellamaki marcellamaki requested a review from rtibbles July 3, 2024 14:36
@github-actions github-actions bot added APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend labels Jul 3, 2024
@rtibbles
Copy link
Member

rtibbles commented Jul 3, 2024

I think this is okay, but alternatively I could update the increment to parseInt() if that's preferable

I think this is exactly what .number is intended to do: https://v2.vuejs.org/v2/guide/forms#number

It also guarantees that we're emitting a consistent data type always (because if we left the type coersion just to when we press the buttons, then we're still going to have a string sometimes).

Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

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

Code changes make sense, video and manual testing confirms the fix.

@rtibbles rtibbles merged commit f1644a3 into learningequality:develop Jul 3, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix "Number of questions" field to increment rather than concat
2 participants