phyloref / klados

A curation tool to edit test cases for the Phyloref curation workflow
http://www.phyloref.org/klados/
MIT License
2 stars 1 forks source link

Add Testudinata from phylonym as an example of an apomorphy-based phyloref #291

Closed gaurav closed 1 year ago

gaurav commented 1 year ago

This PR adds support for entering apomorphy-based clade definitions in Klados. Note that the Testudinata citation isn't working because of https://github.com/phyloref/klados/issues/301 -- I think we can review this PR without fixing that. The remaining functionality appears to be working.

Initially the Phyloref interface looks like this:

Screenshot 2023-06-21 at 3 14 44 AM

Clicking on the box in the top right of the "Apomorphy" box causes the description to open:

Screenshot 2023-06-21 at 3 02 10 AM

This PR includes an apomorphy-based definition from Phylonym:

Screenshot 2023-06-21 at 3 16 25 AM

I've also modified the summary page to indicate that we don't expect apomorphy-based phylorefs to resolve:

Screenshot 2023-06-21 at 3 01 15 AM
gaurav commented 1 year ago

In the future, we might want a "related entity" field as well. Gaurav to talk to Jim about this. Maybe a Manchester syntax field? Moved to https://github.com/phyloref/klados/issues/302

gaurav commented 1 year ago

Here's where I am with the interface right now (as of a1d9cdd). I moved all the specifier groups into cards, which makes it easier to add elements to the header. Adding a check box immediately to the right of the "Apomorphy" looked odd, but then I could realize I could add a button to float right in all three card headers -- for "Internal specifiers" and "External specifiers", this button would add a new specifier to the list, and for "Apomorphy" it would toggle whether any apomorphy was present. So, if there is no apomorphy, the specifier card looks like this:

Screenshot 2023-04-26 at 1 47 01 AM

But if you then click on the check box beside the "Apomorphy", the apomorphy check box is selected and the apomorphy details appear:

Screenshot 2023-04-26 at 1 46 33 AM

I'm looking through the Bootstrap icons to see if I can find one that more clearly indicates "This is a checkbox". If I can't find one, I'm planning to change the text in the apomorphy to read:

No apomorphy in this phyloreference. Set one?

Where clicking on "Set one?" would select the checkbox and display the apomorphy details.

What do y'all think?

hlapp commented 1 year ago

I think that's reasonable. As we discussed, I wouldn't spent too much time on over optimizing the UI.

gaurav commented 1 year ago

@hlapp Good catch -- I did have some misnamed ids! They don't matter for rendering, but I've fixed them in 1ac9ec1.