TrueKuehli / PruneTree

App for creating Sims 4 family trees. Fork of the Plum Tree app using local browser storage to replace API calls.
https://prunetree.app/
ISC License
3 stars 2 forks source link

Added a table of contributors in the app following All Contributors spec #51

Open jCabala opened 9 months ago

jCabala commented 9 months ago

:sparkles: Added a table of contributors in the app following All Contributors spec

:books: Description

Created a file to store contributors. Installed all-contributors-cli. Added a table of contributors in the Version page. Closes #49

:microscope: Reviewing

:white_check_mark: Required Review Steps

  1. [ ] Check latest pipeline passes
  2. [ ] Code is well constructed (sensible implementation, location and documentation)
  3. [ ] Test coverage is acceptable
TrueKuehli commented 9 months ago

As mentioned in the original issue, I want to avoid having raw HTML in the markdown file (even if we trust the source of that file). For that we need to define our own wrapperTemplate, contributorTemplate and badgeTemplate in the allcontributors config.

A simple markdown table is probably the best format to go with, since we can just add custom CSS styles on the root component itself. That may require a rehype/remark plugin though. The other alternative is to define our own components like on the guides pages, which we already have the plugin installed for.

Let me know if you have any questions or if you want me to help out with that!

jCabala commented 9 months ago

So, I should just uninstall the plugin and wrap every html element into appropriate components, like here?

image
jCabala commented 9 months ago

Their code seems to wrap every contributor into a tage and the entire body into tag (after adding custom wrappers).

image image
TrueKuehli commented 9 months ago

I'm sorry, you're right, it doesn't seem like they let you customize the row wrappers. I guess we can leave the templates as is then and take a different approach.

I did just have a look at the .all-contributorsrc file; that file stores all of the contributor information as regular JSON it seems, right? We could probably load that instead, that gives us way more flexibility anyway. Would you be okay with creating a React Component that takes the contributor data from that file to display it? It seems they have a table here mapping all of the contribution types to their names and emoji representations, and all the other data seems ready to use as is.

jCabala commented 9 months ago

Yes, I'm going to do it. I have quite a busy week though so you expect a PR nex week.

TrueKuehli commented 9 months ago

Thank you so much! And absolutely no rush, I'll also be busy for the time being so I may not be able to respond immediately next week. Have a good one!