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

Update orthology association table #930

Merged
merged 6 commits into from
Dec 18, 2024
Merged

Conversation

kevinschaper
Copy link
Member

A first try at largely keeping our existing association table infrastructure but defining each section separately, doing the ortholog table specifically.

Copy link

netlify bot commented Dec 13, 2024

Deploy Preview for monarch-app ready!

Name Link
🔨 Latest commit efcf884
🔍 Latest deploy log https://app.netlify.com/sites/monarch-app/deploys/6762108a04f9800008081993
😎 Deploy Preview https://deploy-preview-930--monarch-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.26%. Comparing base (84dab5f) to head (efcf884).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #930      +/-   ##
==========================================
+ Coverage   71.14%   71.26%   +0.11%     
==========================================
  Files          91       91              
  Lines        3136     3149      +13     
==========================================
+ Hits         2231     2244      +13     
  Misses        905      905              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

"-c",
help="A comma-separated list of counterpart categories"
),
typer.Option("--counterpart-category", "-c", help="A comma-separated list of counterpart categories"),
Copy link
Member Author

Choose a reason for hiding this comment

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

This was autoformatting from make format

entity_id: Annotated[
str, typer.Argument(help="The entity to get association counts for")
],
entity_id: Annotated[str, typer.Argument(help="The entity to get association counts for")],
fmt: fields.FormatOption = fields.OutputFormat.json,
output: fields.OutputOption = None,
):
Copy link
Member Author

Choose a reason for hiding this comment

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

autoformatting

.th:nth-child(3) {
width: 30%;
}

/** body cells */
Copy link
Member Author

Choose a reason for hiding this comment

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

This is where I might be causing trouble by altering potentially broader impact css, but I think I'm actually reducing the trouble that this overly broad css was causing. This PR is the first of many for defining the columns for each association type separately, and it doesn't make sense that we'll always want these widths. Plus, if you scan through Human Disease on this branch, most tables look better, in particular it gives as much space as possible to disease models.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, we really need the new UI person to do a CSS review across the app but this looks good for now.

:breadcrumbs="getBreadcrumbs(node, row, 'object')"
/>
</template>

<!-- subject -->
Copy link
Member Author

Choose a reason for hiding this comment

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

how to display an ortholog cell

>{{ source.id }}</AppLink
>
</template>

Copy link
Member Author

Choose a reason for hiding this comment

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

how to display a has_evidence cell (borrowed from SectionAssociationDetails)

Copy link
Member

Choose a reason for hiding this comment

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

You likely shouldn't be using index as a key here. If the table gets resorted, this may not be re-rendered. See the Vue documentation, and also #892 for a fix to a similar bug.

The key should uniquely identify what objcet this is rendering. I'm not totally familiar with this data structure, but I'm guessing that would be source.id.

For example, if I had the set of rows:

[
  { source: { id: 'a' }}, // index is 0
  { source: { id: 'b' }}, // index is 1
  { source: { id: 'c' }}, // index is 2
]

Vue would render if fine initially. But if I resorted those rows:

[
  { source: { id: 'c' }}, // index is 0
  { source: { id: 'b' }}, // index is 1
  { source: { id: 'a' }}, // index is 2
]

Vue would not know that it would need to re-render those rows, since the key of the elements never changes-- the first element always has index 0, the second index 1, and so on.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed! thanks for catching that!

},
];
});

Copy link
Member Author

Choose a reason for hiding this comment

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

which columns should be shown for the ortholog section

Copy link
Collaborator

Choose a reason for hiding this comment

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

I really like how you are using this data structure.

Copy link
Collaborator

@amc-corey-cox amc-corey-cox left a comment

Choose a reason for hiding this comment

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

This looks good to me. I added some inline comments but just to tell you I think we need an overall review of the CSS and that I liked the ortholog columns data structure.

.th:nth-child(3) {
width: 30%;
}

/** body cells */
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, we really need the new UI person to do a CSS review across the app but this looks good for now.

},
];
});

Copy link
Collaborator

Choose a reason for hiding this comment

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

I really like how you are using this data structure.

@kevinschaper kevinschaper merged commit da511ba into main Dec 18, 2024
9 checks passed
@kevinschaper kevinschaper deleted the update-orthology-table branch December 18, 2024 00:02
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.

3 participants