-
Notifications
You must be signed in to change notification settings - Fork 11
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
[Platform] Add metadata to variant page #369
Conversation
@@ -0,0 +1,95 @@ | |||
import { ProfileHeader as BaseProfileHeader, Field } from "ui"; |
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.
create a new component named as ProfileHeader.tsx
which will have all the header data and import it in Profile.tsx
page as it will contain other widgets and summary as well
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.
Pushed.
return ( | ||
<BaseProfileHeader> | ||
|
||
<> |
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.
Use a <Box>
component to encapsulate the data instead of Fragments
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.
Pushed
<> | ||
<Typography variant="subtitle1" mt={0}>Location</Typography> | ||
<Field loading={loading} title="GRCh38"> | ||
{`${metadata.chromosome}:${metadata.position}`} |
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.
string encapsulation not needed here
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.
Pushed.
</Box> | ||
</> | ||
: <Field key={key} loading={loading} title={key}> | ||
{String(metadata.inSilicoPredictors[key as keyof InSilicoPredictorsType])} |
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.
use types in params like: .map(key :InSilicoPredictorsType )
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 doesn't work here - I think since the the key itself is not of type InSilicoPredictorsType
.
Replaced by PR #376 |
Description
Added profile to variants page with metadata.
Issue: opentargets/issues#3299
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Load variant page with dev server (e.g. http://localhost:3000/variant/20_31257670_C_T).
Checklist: