Open Muwak77 opened 10 months ago
Hmm, some of this looks generally useful, but I think we'll also need to add a setting for custom selectors -- not really tenable to add support for every system with custom elements, but I'm also not sure how easy it would be to add such a setting in such a way it usefully modifies whatever html/css it's being thrown at.
maybe a combined approach is the way to go:
Allow users to specify which fields in a sheet (this should IMHO be extended to items as well) shall be queried for links but in non Journal entres you don't attach the link-list to a certain control but attach it to the side of the sheet as i did it for Gumshoe.
Doing it like this makes Journal-backlinks independent of the format of the sheet and/or implementations like react where the sheet is not rendered yet when the JBL-hook is called.
We could even make it collabsible.
I'm Using Gumshoe which has, unfortunatly a slightly unorthodox approach when rendering charactersheets.
When IncludeLinks is triggered, the sheet is not available yet (due to the dev using react), and there is only a REACT-TARGET. I Fixed it in my private Version but would love to see this in the official release, maybe you can use my approach as an Inspiration:
I added a custom selector
IN includeActorLinks in appended a div directly to the container to display the backlinks
In IncludeLinks I added a variable to make shure empty divs are not displayed (as i wanted it as a sidebar (see css) and empty sidebars don't look good and give players a hint that there ARE links
Last i added som CSS to make it pretty
Result looks decent![image](https://github.com/jtracey/journal-backlinks/assets/64545711/e6da5aa9-14fa-4c63-9f74-3359bc17ec31)