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
Fixed input checkbox behavior #6663
Fixed input checkbox behavior #6663
Conversation
Move click action to wrapper (parent) to allow clicks on whole area of checkbox. Also update the highlighting and visibility on hover of configuration wheel for better usability. This way the user learns that clicking on the item or wheel opens the configuration and clicking on the text or checkbox toggles the checkbox. Signed-off-by: Christos Malliaridis <c.malliaridis@gmail.com>
Move input selected state from controller to parent component (plugin) to prevent multiple selections and highlighting of checkbox fields from different controllers. Signed-off-by: Christos Malliaridis <c.malliaridis@gmail.com>
339cb12
to
371a741
Compare
Codecov Report
@@ Coverage Diff @@
## master #6663 +/- ##
==========================================
+ Coverage 19.85% 19.98% +0.12%
==========================================
Files 857 858 +1
Lines 12076 12098 +22
Branches 1963 1965 +2
==========================================
+ Hits 2398 2418 +20
- Misses 8093 8095 +2
Partials 1585 1585
Continue to review full report at Codecov.
|
@@ -14,9 +14,8 @@ import InputCheckbox from '../InputCheckboxPlugin'; | |||
|
|||
import { Header, Label, Separator, Wrapper } from './Components'; | |||
|
|||
function Controller({ actions, inputNamePath, isOpen, name }) { | |||
function Controller({ actions, inputNamePath, isOpen, name, inputSelected, setInputSelected }) { |
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.
Can you remove the { useState }
import since it is not needed anymore?
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.
Bad idea to skip once the linter.
Updated the branch and removed the import. :)
P.S. Sorry for the multiple force-pushes (if you got any notifications). I avoided auto formatting issues while commiting. If I should run any formatting to the rest of the code let me know.
ec5d8f8
to
00b1c75
Compare
Signed-off-by: Christos Malliaridis <c.malliaridis@gmail.com>
a1e23c3
to
d77ab73
Compare
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
Description of what you did:
Updated the click behavior of the input checkbox field. Now the fields can be selected without
toggling the checkbox by clicking on the white surface or the config wheel. Toggling still possible
by clicking on the word or checkbox (like before).
Also moved the input selected state to the plugin (from controller) to prevent multiple selections
of input fields (with highlighting) from different controllers. This visibility bug occurred while
fixing the actual behavior of the input checkboxes.
Fix #5437