Skip to content
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

Closed
wants to merge 8 commits into from
Closed

Conversation

gjmcn
Copy link
Contributor

@gjmcn gjmcn commented May 8, 2024

Description

Added profile to variants page with metadata.

Issue: opentargets/issues#3299

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Load variant page with dev server (e.g. http://localhost:3000/variant/20_31257670_C_T).

Checklist:

  • [x ] I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@gjmcn gjmcn mentioned this pull request May 8, 2024
5 tasks
@@ -0,0 +1,95 @@
import { ProfileHeader as BaseProfileHeader, Field } from "ui";
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed.

return (
<BaseProfileHeader>

<>
Copy link
Contributor

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

Copy link
Contributor Author

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}`}
Copy link
Contributor

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

Copy link
Contributor Author

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])}
Copy link
Contributor

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 )

Copy link
Contributor Author

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.

@gjmcn
Copy link
Contributor Author

gjmcn commented May 24, 2024

Replaced by PR #376

@gjmcn gjmcn closed this May 24, 2024
@gjmcn gjmcn deleted the gm-variant-meta branch May 24, 2024 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants