-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix #6016: Limited the selection area of multiple choice option #6029
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #6029 +/- ##
=======================================
Coverage 45.3% 45.3%
=======================================
Files 520 520
Lines 30667 30667
Branches 4597 4597
=======================================
Hits 13893 13893
Misses 16774 16774 Continue to review full report at Codecov.
|
Did you test this on Firefox to make sure that the behavior stated in the comment is retained after changing the width? |
@nithusha21 yes I did. Thanks for asking. |
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 @rakshitkumarcse This looks good to me, but I have a doubt.
If you have an item in item selection (say) which extends over second line but doesn't fills the second line completely then also your PR selects the radio button for the entire width (see the screenshot for the reference). I'm not sure whether this is expected, though I'm satisfied with the behaviour.
@nithusha21, @DubeySandeep what do you say?
extensions/interactions/MultipleChoiceInput/static/multiple_choice_input.css
Outdated
Show resolved
Hide resolved
@bansalnitish Thanks for the review. |
@bansalnitish Can you think of any way this can be dealt with in a better way? |
To me personally, this looks good. Lets wait for other folks to give there opinion. |
@bansalnitish Alright. Thanks. |
@@ -8,7 +8,8 @@ | |||
color: #0D48A1; | |||
text-align: left; | |||
/* This is needed so that images stay bounded by the container in Firefox. */ | |||
width: 100%; |
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.
I was talking about the comment on line 10.
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.
Yes I know. The comment stands correct now as well. I have tested it.
Thanks!
Can we change the mouse pointer from an arrow to the "click" icon? That should clear up some confusion. |
@nithusha21 I find your suggestion pretty good. |
@nithusha21 I just noticed one more thing. I see an arrow itself in the selection area. I am using firefox. |
@nithusha21 If we use the click icon, still we'll get the same issue. The click icon would appear in the second line, where there is no text (as in screenshot above). Also, hovering the mouse over the text and radio button highlights the radio button, isn't this itself indicating something like click? @rakshitkumarcse I used chrome. (I'll test this on firefox too.) |
@bansalnitish I agree with your views. |
@bansalnitish What do we finally do about this? |
@bansalnitish, It's fine to have this behaviour there's nothing wrong here! |
@rakshitkumarcse, this can be merged after testing images as multiple choice option in the interaction (on Firefox). So let's wait for @bansalnitish UI review. |
@DubeySandeep Sure. Thanks for your views. |
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.
LGTM!
Explanation
Fixes #6016: Changed the width property in css of multiple choice option from 100% to auto.
By doing this, the selection area is limited to the radio button and text. This prevents accidental selection of an option by clicking somewhere on the div where no text is present.
Checklist
python scripts/pre_commit_linter.py
andbash scripts/run_frontend_tests.sh
.