monarch-initiative / monarch-ui

The previous version of the Monarch Initiative website
https://previous.monarchinitiative.org/
BSD 3-Clause "New" or "Revised" License
17 stars 29 forks source link

Convert Static data to YAML #458

Closed putmantime closed 4 weeks ago

putmantime commented 3 years ago

@vincerubinetti I am beginning work on this issue. Is it appropriate to move the data to a yaml directory in assets? e.g. /assetts/yaml I don't see any aggregation of static files currently

vincerubinetti commented 3 years ago

Yeah you can create a folder as you feel appropriate. You might just name it /static or something, to have it less tethered to the particular format (maybe we convert it to json at some point? idk).

I might make it a top level folder too, so we have /src/assets for things like images and /src/static for things like yaml and markdown.

putmantime commented 3 years ago

Sounds good. I'll just start by creating the static files in /src/static and not update the code to use them yet.

vincerubinetti commented 3 years ago

Here's an example of a way to construct a yaml file out of this data in a way that's helpful for display purposes:

- group: University of Colorado Anschutz Medical Campus:
  members:
  - name: Melissa Haendel
    role: PI
    image: images/melissa-haendel.jpg
    description: text text text
  - name: another person
  - name: another person
  - name: another person

- group: Oregon State University:
  members:
    - name: Tom Conlin
      alumni: true

The exact structure and name of keys can be changed later, but this is a general example. Also remember that order of keys can't be guaranteed, so use actual lists when you need order (e.g. Melissa first, CU first).

The main point is to separate this info out into a separate file that's syntactically leaner, that can then be iterated through in our Vue code/template. In most cases, how it'll be used should be pretty simple. In the example above, setting alumni: true will just put an "alumni" icon next to the item, whether it be an individual member or an entire group that no longer works on the project.

Also, if needed, we can make certain fields accept markdown.

vincerubinetti commented 3 years ago

Now I'm thinking we should hold off on this a bit, as the organization of the site may change. For example, we may elect to have the licensing for each tool go side-by-side with the architecture map, rather than have it be its own separate page.

Also I'll probably have to make minor changes to the structure of the data when I go to actually implement and import this data into Vue, so I think I might as well do this task. It shouldn't take too long; probably no more than a day. It was a neat idea to do this in parallel to save time, but a day isn't too bad.

monicacecilia commented 4 weeks ago

won't fix. 🎺