-
Notifications
You must be signed in to change notification settings - Fork 2
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
add genomics filter #23
Conversation
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.
The following points of the original design is not fully implemented (see figure). I think they are important and would like to know your thoughts on the change of the design.
- Show a folding sign on the "Genomics filter"
- Add a new filter when necessary with the sign "+"; otherwise do not show that filter at all. And when folding the filter, it shows a list of the filter name for users to choose. Here is an example of the effect.
The component I used here is a dcc.Button, which does not have any folding sign. What we wanted here was something like the arrow in the dropdown menu (see the basic example here), that changes direction when clicked. I didn't find anything similar for a button component. I think it would be possible to add a static arrow on the right side of the button to mimic the mockup, but then it wouldn't move and I am not sure if it would still make sense. The multi-value dropdown component seems slightly similar to what we designed in the mockup, but it is not meant to be used in the way we designed the genomics filter component in the mockup (e.g., we do not want the dropdown menu in the filter). I am not sure of how complex it would be to tune it to our purpose.
I haven't added the "+" button since we have only two filters possible at the moment, so I wasn't sure whether we wanted to spend time now on that functionality. Regarding showing the list of the filter name for users to choose, I wasn't convinced by its practicality. What happens if the same name is selected in multiple filters? The ideal would be to show names depending on the ones which have been already chosen, but this is a bit more complex implementation. In general, we can implement all of the above, depending on what we wish to prioritize at the moment. I don't have a very strong opinion about that, what do you think? |
Thanks for bringing this up! I can think of other filter types (i.e., min / max number of BGCs in the GCF, etc.), so having the option to extent this would be good, but the main goal is to facilitate the integrative analysis of the NPLinker results, so let's focus on that part. |
The dbc.Accordion looks promising to meet our requirements. Have a look please.
Considering Justin's comment, it would be necessary to extend the types of filters later. So I would prefer adding the "+" at the beginning. And this functionality is also needed in the scoring part.
It is not a problem even if users choose the same filters. No matter what filters users choose and how many they choose, the chosen filters could only do "AND" logical operations (we define it), which I think is enough for subsetting data. Otherwise, we should add logical operation (AND, OR, NOT) for each filter. What do you think @justinjjvanderhooft ? |
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.
Great changes! I like the new effect.
There are 3 points to improve:
-
The value field of the default filter is empty. We need to set some default value for it.
-
The hints do not really help. Better to change them to e.g. for filter GCF ID , the hint could be
1, 2, 3
.
-
The dark mode needs different CSS for better display. You could work on it later in another PR only for dark mode.
You may want to try Claude Artifacts to assist you, check the video first. |
Regarding the bigscape class, let's change it to To get the actual value, you need to use |
You may receive notifications about some new commits, but I will explicitly ask for a review when I am finished. @CunliangGeng |
Thanks for noticing, now it's not empty anymore.
Done.
I opened a PR (#25) |
This is still missing. Only hint for GCF ID was changed. |
I know, it's in the TODOs indeed (see my comment at the PR's beginning). The PR is not ready yet ;) |
Nice, changing it to draft is clear to me you are still working on it; otherwise it's hard to figure out if it's done or not. |
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.
The layout looks great now! There are a few more comments about the code.
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.
Ready to merge after solving the last minor comments 🎉
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.
Oh yeah! the final of the final review :-)
🟢 Now you can merge it! |
Quality Gate passedIssues Measures |
I had to fix the tests first, now I'll merge :) |
Main changes:
add_block
. Unit testing the other callbacks is possible of course, but I'm not sure whether is worth it to do it at this stage.