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

Disable checkbox based on policyAccepted #4038

Conversation

manavagr1108
Copy link
Contributor

@manavagr1108 manavagr1108 commented Apr 24, 2023

Summary

Description of the change(s) you made

resolves #4014

Manual verification steps performed

  1. Locally, if the agree checkbox is not checked the continue button is disabled.
  2. Only when we check the checkbox the continue button is clickable.

Screenshots (if applicable)

Unchecked:
Screenshot 2023-04-25 at 2 12 30 AM
Checked:
Screenshot 2023-04-25 at 2 12 33 AM



Contributor's Checklist

PR process:

  • If this is an important user-facing change, PR or related issue the CHANGELOG label been added to this PR. Note: items with this label will be added to the CHANGELOG at a later time
  • If this includes an internal dependency change, a link to the diff is provided
  • The docs label has been added if this introduces a change that needs to be updated in the user docs?
  • If any Python requirements have changed, the updated requirements.txt files also included in this PR
  • Opportunities for using Google Analytics here are noted
  • Migrations are safe for a large db

Studio-specifc:

  • All user-facing strings are translated properly
  • The notranslate class been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. icons, user-generated text)
  • All UI components are LTR and RTL compliant
  • Views are organized into pages, components, and layouts directories as described in the docs
  • Users' storage used is recalculated properly on any changes to main tree files
  • If there new ways this uses user data that needs to be factored into our Privacy Policy, it has been noted.

Testing:

  • Code is clean and well-commented
  • 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
  • Any new interactions have been added to the QA Sheet
  • Critical and brittle code paths are covered by unit tests

Reviewer's Checklist

This section is for reviewers to fill out.

  • 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

@manavagr1108 manavagr1108 changed the title - [feat]: disable checkbox based on policyAccepted; Disable checkbox based on policyAccepted Apr 24, 2023
Copy link
Member

@akolson akolson left a comment

Choose a reason for hiding this comment

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

Hi @manavagr1108, the fix looks good to me and fixes the issue. As an additional step, could you please remove the error message displayed when you toggle the checkox as this is not necessary anymore. Thanks again! once this is done, we should be good for a merge!
Screenshot 2023-04-25 at 09 38 46

@manavagr1108
Copy link
Contributor Author

Sure @akolson , I will remove the error message and update the pr.

@manavagr1108
Copy link
Contributor Author

Have updated the pr @akolson. Do check it out.

Copy link
Member

@akolson akolson left a comment

Choose a reason for hiding this comment

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

This is looking good @manavagr1108 . Thanks for making the changes and for contributing towards making Kolibir better. Your efforts are very much appreciated!

@akolson
Copy link
Member

akolson commented Apr 25, 2023

@manavagr1108 You would also need to clean up an obsolete test that is now failing as regards to the removal of the error message. contentcuration/contentcuration/frontend/shared/views/policies/__tests__/policiesModal.spec.js line 92 to 96. You could also proceed to replace the test to check of the button is disabled instead.

Copy link
Member

@akolson akolson left a comment

Choose a reason for hiding this comment

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

My apologies for not raising this earlier. Please see my comments here

@manavagr1108
Copy link
Contributor Author

No worries @akolson, I will try to fix it and let you know.

@manavagr1108
Copy link
Contributor Author

I have updated the test accordingly. I just felt that its sufficient, if we make sure that the continue button is disabled. If u feel we need to test other parameters do let me know. I will update the pr accordingly. Also sorry if it got delay got caught up with something.

@manavagr1108 manavagr1108 requested a review from akolson April 25, 2023 20:08
@akolson
Copy link
Member

akolson commented Apr 25, 2023

Hi @manavagr1108, I think there are a few linting issues with the code. Could you please run yarn run lint-frontend:format, and then add and commit the changes?

@manavagr1108
Copy link
Contributor Author

Hi @manavagr1108, I think there are a few linting issues with the code. Could you please run yarn run lint-frontend:format, and then add and commit the changes?

Sorry about it, I completely forgot about it.

@akolson
Copy link
Member

akolson commented Apr 25, 2023

Thanks @manavagr1108. We should be good now. I will merge your pull request once the build is done. Please feel free to pick up other issues in out backlog if you like :)

Copy link
Member

@akolson akolson left a comment

Choose a reason for hiding this comment

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

LGTM!

@akolson akolson merged commit 6a90478 into learningequality:unstable Apr 25, 2023
@manavagr1108
Copy link
Contributor Author

Thanks @manavagr1108. We should be good now. I will merge your pull request once the build is done. Please feel free to pick up other issues in out backlog if you like :)

Thankyou for helping me out. I will surely try to complete other issues as well. If u have any suggestions on issues for me, do let me know I will be happy to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants