-
Notifications
You must be signed in to change notification settings - Fork 0
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
Orthogroup tree table protein filter #1252
Orthogroup tree table protein filter #1252
Conversation
There's something strange about the When you have a large group (OG7_0000011) and no text search at all, it takes around a second for the checkbox clicks to register. When you have a search active (e.g. "123") it's more snappy. I cannot see why! |
Note: there seems to be no urgent need to address the debouncing quirks in |
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.
Overall, this is a good straw man. I anticipate lots of opinions and potential changes, so this is a really good and simple starting point.
I did make a couple of suggestions (see below).
? ` (${volatileProteinFilterIds.length})` | ||
: '' | ||
}`} | ||
key={volatileProteinFilterIds.join(':')} |
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 isn't needed
key={volatileProteinFilterIds.join(':')} |
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.
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 see. This could use a comment.
I'm not a big fan of using keys like this, but it does solve this problem.
There are two ways we can avoid using key, here:
- Have
PopoverButton
take anopen
prop that can be used to control the internal state. - Have
PopoverButton
take a ref that exposes aclose()
and anopen()
method.
Both have their pros and cons. The first option means introducing more state for the consumer, and more state management for the PopoverButton
component, but it uses props, which is more common. The latter doesn't not introduce new state and works better with event handlers, but custom refs are not nearly as common to work with.
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 didn't expose an open()
method just yet. We can grow into that!
buttonDisplayContent={`Proteins${ | ||
volatileProteinFilterIds.length > 0 | ||
? ` (${volatileProteinFilterIds.length})` | ||
: '' | ||
}`} |
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.
Should we change the label when rows are selected, to indicate that the underlying filter is operable?
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've added an asterisk just as a placeholder (though the asterisk is also used inside the popover, so maybe it's good)
There's an edge case where say you are filtered on 6 proteins and you select-all 6 proteins and then click "refine filter" the filter widget doesn't close automatically (because ourSolved ✔️key
doesn't change)