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

Neg num of ques #131

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

Conversation

nishita2104
Copy link

Fixes #112

Describe the changes you've made

I have added an if condition in the getValues() function in main.js file. This if condition checks if the amount of questions is not between 1 and 56, then it displays the said error.
To display the error in the app itself (to avoid using alerts), 2 more functions are made namely showError and clearError. These functions help display the error and clear it when error is fixed, i.e. correct number of questions is entered.

Type of change

What sort of change have you made:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

I entered several possible error cases in the number of questions column and each time the error message was displayed. The test starts if the number of questions entered is between 1 and 56.

Checklist:

  • My code follows the guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly wherever it was hard to understand.

Screenshots (Images)

Before the changes After the Changes
image image

@netlify
Copy link

netlify bot commented May 22, 2023

Deploy Preview for arito ready!

Name Link
🔨 Latest commit 0bc764c
🔍 Latest deploy log https://app.netlify.com/sites/arito/deploys/64972bc8eef196000833ce9f
😎 Deploy Preview https://deploy-preview-131--arito.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congratulations on your First Pull Request! Wish you best on your open-source journey 😊

@nishita2104
Copy link
Author

Kindly review this PR. Thank you

2 similar comments
@nishita2104
Copy link
Author

Kindly review this PR. Thank you

@nishita2104
Copy link
Author

Kindly review this PR. Thank you

@prakhartiwari0
Copy link
Owner

Great job @nishita2104!
One more improvement we can do, please make it more visible by putting a very light background, and making the text red. You can share suggestions too for this :)

@nishita2104
Copy link
Author

sure!

@nishita2104
Copy link
Author

nishita2104 commented Jun 24, 2023

@prakhartiwari0 This is what it looks like after modification:
image
I have already committed this change, if any further modification is required please let me know.

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.

[BUG] Negative number of questions
2 participants