-
Notifications
You must be signed in to change notification settings - Fork 6
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
Make Periodic Table widget toggleable #203
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #203 +/- ##
===========================================
- Coverage 35.96% 35.67% -0.30%
===========================================
Files 17 17
Lines 2138 2161 +23
===========================================
+ Hits 769 771 +2
- Misses 1369 1390 +21
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Before I review this, the binder appears to be broken:
|
Fixed in #205. The link seems to work 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.
If the periodic table can only be toggled if a data base is selected that would defeat the purpose. So at least programmatically it should be possible to toggle the visibility independently. For this I suggest to add a trait to the widget and connect the toggle button internally with that trait. See also in-code comments for details.
Two additional points which are out of scope for this PR:
- Whether the table is available/visible or not, I would expect to be able to always also enter elements "manually" into a text field which would be synchronized with the table.
- It seems to me that there is no clear explanation as to what the various "selection states" represent as part of the query. Clicking elements multiple times makes them change color, and I assume based on the color that it means "included/excluded", but it is not immediately obvious that this is the meaning in the context of the query and it would be completely impossible to discern for a person with red/green color-blindness.
If
This is a conscious UX choice at this point (to only use the Periodic Table widget).
This is already the subject of issue #160. |
I think that the API I'm suggesting provides more control and flexibility, but as long as the widget is hidden by default, it's fine with me.
It feels non-intuitive and unnecessarily restrictive to me, but again, out of scope for this PR anyways. |
@CasperWA Is this ready for another review? |
@csadorf I will rebase and merge some commits and merge. No need to re-approve. |
Change container height when toggling to simulate an accordion kind effect. Add `embedded` option to OptimadeQueryFilterWidget.
98a5d8e
to
e0be053
Compare
Closes #201.
See on binder.
Wrap the checkbox and periodic table widget in a
VBox
container and add a button to change toggle thevisibility
layout parameter betweenvisible
andhidden
.A suggestion from my part would be to minimize the button and/or move it to the left side, but it might also be all right as is?