-
Notifications
You must be signed in to change notification settings - Fork 1
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
Out of range on sequence: show message on tooltip on click annotation #232
base: feature/sync-sequence
Are you sure you want to change the base?
Conversation
Note for the cache feature: I used Session Storage to delete the data when the user closes the browser. Unfortunately, that makes also the data not accessible between other windows or tabs. But I think it is best to make the data be deleted when the tab is closed. |
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.
In-line comments:
app/assets/javascripts/3dbio_viewer/src/domain/repositories/PdbInfoRepository.ts
Outdated
Show resolved
Hide resolved
app/assets/javascripts/3dbio_viewer/src/webapp/components/frame-viewer/FrameViewer.tsx
Outdated
Show resolved
Hide resolved
app/assets/javascripts/3dbio_viewer/src/webapp/components/protvista/ProvistaGrouped.tsx
Outdated
Show resolved
Hide resolved
app/assets/javascripts/3dbio_viewer/src/webapp/components/protvista/Tooltip.tsx
Outdated
Show resolved
Hide resolved
app/assets/javascripts/3dbio_viewer/src/webapp/components/protvista/Tooltip.tsx
Outdated
Show resolved
Hide resolved
app/assets/javascripts/3dbio_viewer/src/webapp/components/protvista/Tooltip.tsx
Show resolved
Hide resolved
app/assets/javascripts/3dbio_viewer/src/webapp/components/protvista/Tooltip.tsx
Outdated
Show resolved
Hide resolved
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.
In-line comments:
app/assets/javascripts/3dbio_viewer/src/webapp/components/protvista/Tooltip.tsx
Show resolved
Hide resolved
app/assets/javascripts/3dbio_viewer/src/webapp/components/protvista/Tooltip.tsx
Show resolved
Hide resolved
app/assets/javascripts/3dbio_viewer/src/domain/repositories/PdbInfoRepository.ts
Outdated
Show resolved
Hide resolved
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.
Some in-line comments:
const coverageDetails = { | ||
type I18N = typeof i18n; | ||
|
||
const getCoverageDetails = (i18n: I18N) => ({ |
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.
No need to pass i18n as an argument. You can use the imported i18n normally (it's a state object, so changes will be there without further ado)
{ condition: notCovered, details: getCoverageDetails(i18n).notCovered }, | ||
{ | ||
condition: partiallyCovered && !covered, | ||
details: getCoverageDetails(i18n).partiallyCovered, |
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.
Used twice, so move to local variable: const coverageDetails = getCoverageDetails()
mappings: { | ||
chain_id: ChainId; | ||
struct_asym_id: ChainId; | ||
}[]; |
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.
When we have complex types, like an object, we use Array<...>
const emdbMapping$ = getFromUrl<PdbEmdbMapping>(emdbMapping); | ||
const chains = molecules | ||
.flatMap(({ chains }) => chains) | ||
.map(chain => ({ |
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 are building a ChainIdMapping
, right? in that case, let's be explicit about it: (chain): ChainIdMapping
. This not only helps TS giving better error message, it also link the structure to the type, so we get automatic renaming of props, code navigation, and so on.
Merge into
feature/sync-sequence
📌 References
📝 Implementation
Features
Minor changes
🎨 Screenshots
Screenshots showing: Out of range annotation