Fix in-text-citations for detection#500
Conversation
✅ Deploy Preview for strchive ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
In the first commit, I simply add The second commit does some more complex TypeScript magic to automatically pick fields on the locus/curation that its corresponding schema says are I'll let you decide which method you find to be better. |
|
Declaring which fields contain in-text citations in the scheme seems like it would be easier for us to maintain in the future. What if we wanted citations inside the criTRia nested details fields? Would one of these approaches work better than the other for this? |
|
The only way I can think of to make nested citable fields work in a type-safe way (which is important for avoiding bugs), is to simply parse and render ALL string fields as if they could have citations in them. That is, call This feels a little heavy handed to me though, I'm thinking we'd want to retain fine-grained control over how each field is displayed instead of forcing them all into one bucket. I'm leaning towards just keeping the first commit. It's simplest to just keep it hard-coded for now. This means |
Description
Summarize the changes
Fixes: showing in-text-citations for detection field on locus page
Checklist
CITATION.cff, format X.Y.Z. If any major changes, increment Y. If only minor changes, increment Z. If the breaking change (rare), increment X.