-
Notifications
You must be signed in to change notification settings - Fork 185
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
refac: change Checkbox
to be a wrapper around KCheckbox
instead of VCheckbox
#4472
Conversation
Thanks @EshaanAgg! For reference for reviewers, this PR is not coming out of the blue :) @EshaanAgg has discussed high-level approach with @bjester and me (https://learningequality.slack.com/archives/C03S2EN192A/p1709751447068349) |
@EshaanAgg Thanks for working on this! Seems there are some tests failing. They might need updated, but I think there's a possibility the Here's the summary of the failing tests (the link may not properly open and scroll to it, so I've copied the output below): You can run the tests locally with
|
Thanks a lot for the help with debugging, @bjester! I'll try to make the relevant changes so that the same works! Thanks. |
I have worked on fixing most of the tets. When running the tests locally, only 2 tests fail, and I am a bit confused as to how I might go about fixing the same:-
|
For the issue with the Answers Editor component, the state prop is set to false when it should be an array. Updating line 50 in AnswersEditor.vue to use |
Got it. It seem's to be that some logic surrounding all of these interactions and changes needs to be rewritten a bit. Will try to do so ASAP. Thanks so much for your time and help! I really appreciate it! |
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.
Hi @EshaanAgg. I think the changes made look great. Thanks.
Concerning the failing tests, I think that changing this to the correct prop should fix the problem for tests failing in contentDefaults.spec.js
. Hopefully this helps.
@akolson Thanks for the help. I have updated the test suite in the |
Hi @EshaanAgg! I think for your implementation of the Having the |
@akolson That all sounds accurate to me. @EshaanAgg There are some more linting issues |
Hi! Thanks for all your patience! I have updated the PR such that the test suite passes completely locally and addressed all the linting issues. Hopefully, this PR is ready for review. Thanks again. |
HI @EshaanAgg! Great work on resolving the failing tests. However, it looks like we have one more failing test in ......
<Checkbox
v-model="acceptedAgreement"
:label="$tr('agreement')"
required
:rules="tosAndPolicyRules"
:hide-details="false"
class="my-1 policy-checkbox"
/>
...... I am unsure about the decision that was taken on these props apart from the discussion here, so some clarification could help resolve the issue. @bjester? |
Thanks @akolson. I guess that the best way to handle the same would be to provide support for these props in the |
Hey! I had completed adding support for the
Since this method relies on all the children components to be Vuetify components, I guess using I have made this refactoring, removed the props |
Thanks @EshaanAgg for raising your observations and for your dedication to the issue. We'll create a follow up issue to resolve the failure in We'll approve and merge this issue for now.
|
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.
Approved!
@@ -132,7 +132,7 @@ | |||
</VSlideYTransition> | |||
|
|||
<!-- Agreements --> | |||
<Checkbox | |||
<VCheckbox |
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 should be changed to Checkbox
in #4492. Its only a temporal fix
@EshaanAgg Thank you for your contributions! |
Summary
Description of the change(s) you made
Checkbox
component to make use of theKCheckbox
internally and adds support for usingv-model
to the samev-model
is designed to handle three kinds of values:arrays
,number
, andboolean
Manual verification steps performed
Ran
studio
after making all the changes and verified manually if the checkboxes were behaving as expected.Does this introduce any tech-debt items?
No, but this PR must be manually tested before it can be merged. This is because all the occurrences of the
Checkbox
right now have props and values recognized byVCheckbox
. These props need to be added to our new implementation ofCheckbox
as well or need to be handled in the components using them separately.Reviewer guidance
How can a reviewer test these changes?
Running the application locally.
Are there any risky areas that deserve extra testing?
All checkbox-related menus and forms.
Contributor's Checklist
PR process:
CHANGELOG
label been added to this PR. Note: items with this label will be added to the CHANGELOG at a later timedocs
label has been added if this introduces a change that needs to be updated in the user docs?requirements.txt
files also included in this PRStudio-specifc:
notranslate
class been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. icons, user-generated text)pages
,components
, andlayouts
directories as described in the docsTesting:
Reviewer's Checklist
This section is for reviewers to fill out.
yarn
andpip
)