-
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
OrthoMCL - Custom tree-table for OrthoGroup page #904
base: main
Are you sure you want to change the base?
Conversation
… the Mesa inline option
…cally fixed-height mode)
…de (basically fixed-height mode)" This reverts commit f215762.
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 is looking really good. I made some comments below. Let me know what you think!
<div | ||
style={{ | ||
flexGrow: 1, | ||
width: 1 /* arbitrary non-zero width seems necessary for flex */, | ||
}} | ||
> | ||
<Global | ||
styles={globalStyle` | ||
.DataTable { | ||
margin-bottom: 0px !important; | ||
width: 80%; | ||
} | ||
`} | ||
/> | ||
<Mesa state={tableState} /> | ||
</> | ||
</div> |
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.
Sorry, I'm just noticing this. I'm not sure we should use Global
here, as the style will be reflected on all subsequent pages.
Instead, could you use a css
prop on the parent div
component (line 96), and target .DataTable
in there?
<div
css={{
flexGrow: 1,
width: 1 /* arbitrary non-zero width seems necessary for flex */,
'.DataTable': {
marginBottom: '0px !important',
width: '80%'
}
}}
>
<Mesa state={tableState} />
</div>
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, that's much simpler (and no side effects) - done in 5c896a0 - thanks!
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.
Could we change these identifiers such that they include the "group" prefix? E.g., GroupTreeResponse
, groupTreeResponseDecoder
, etc?
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.
Sure! fd446f8
It's imported here: I'm pretty sure you can just delete the reduce and don't need to make any other changes. |
Ah, thanks, I was missing something fundamental that I get now. |
It looks like we can't avoid the "We're sorry, something went wrong." modal being rendered if the wdkService back end call returns a 404. That hook (useWdkService/useOrthoService) doesn't handle errors the same way as the EDA's However, we can avoid asking for a tree when there are too few sequences, thus avoiding some user-facing errors. Will push a commit soon to address this and make sure the regular table still renders.
|
…ange; fix some imports
@bobular what is the state of the backend for this? Do I need to use the |
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 looks great. I added some comments. Let me know what you think!
@@ -18,7 +18,7 @@ class TableSearch extends React.PureComponent { | |||
clearSearchQuery() { | |||
const query = null; |
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 can be deleted
@@ -26,6 +31,12 @@ const orthoServiceWrappers = { | |||
method: 'get', | |||
path: `/group/${groupName}/layout`, | |||
}), | |||
getGroupTree: (wdkService: WdkService) => (groupName: string) => | |||
wdkService.sendRequest(groupTreeResponseDecoder, { | |||
useCache: true, |
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.
It's worth noting that this property causes the response to be stored in indexeddb, which is governed by the browsers quota policy for domains. If the database exceeds the quota, attempts to cache responses will begin to fail (don't worry, this is handled for a seamless user experience). In all likelihood, important/critical responses will already be cached, so it should not impact website load times.
In the future, we might consider using LRU (least recently used) caches for things like this, where the cache container has an identifier, and we retain up to a certain number of entries, ejecting those used least recently.
For now, this is probably fine.
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.
Interesting. Are the cache entries keyed by the full request payload (like react-query)?
If so, this would seem to be a general WDK problem, not specific to fetching the tree (is it massively bigger than the responses from the other endpoints?)
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.
Entries are keyed by path and, if provided, cacheId. See here. I don't know how big these newick strings can get, so it's hard to say how much of an issue it would be.
Again, I think this is probably fine, but I wanted to mention the current limitations.
] | ||
], | ||
"dependencies": { | ||
"patristic": "^0.6.0" |
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 think this should be declared in packages/libs/components/package.json.
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's
import { parseNewick } from 'patristic';
in Sequences.tsx though.
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.
We don't use patristic directly in components
. If tidytree
needs it then that's its business!
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.
Aha, thanks!
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 think this should be moved to packages/libs/components
Hi all. I've made some expensive synchronous operations into asynchronous effects and added a switch to show only core proteins when #seqs > 2000 OG7_0000009 with 10k sequences is a good test case. The remaining performance issues seem to be My FF still complains sometimes for the full (core+peripheral) and this seems to be a mix of Pfam architecture rendering and tree rendering. Only disabling both seems to prevent any slow-down warnings. We probably need to think a bit more about large groups and what sensible cutoffs are. |
…quence_link column and enabled the link
New optional Mesa inline table behaviour using tooltips
@@ -448,3 +456,21 @@ function createSafeSearchRegExp(input: string): RegExp { | |||
return new RegExp(escapedInput, 'i'); | |||
} | |||
} | |||
|
|||
function summarizeIDMismatch(A: string[], B: string[]) { |
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.
Maybe name this something like logIdMismatchSummary
Testing:
There are only a few tree files available on the back end, so only a few orthogroups work. Here's are the valid OGs at the moment:
Run
ortho-site
locally and access the path/app/record/group/OG6_102443
Back end config for
.env
isTo do:
UX suggestions