-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add A(H)BCD tabs to Compendium Browser #15790
base: master
Are you sure you want to change the base?
Add A(H)BCD tabs to Compendium Browser #15790
Conversation
There are several failing CI checks found in the Details link here in the PR. Please take a look at those and resolve them |
15a7bf2
to
53ffbc0
Compare
Fixed the linting issues. Also... maybe fixed the Tagify errors? Seems kind of janky to me but maybe it's the right way, I don't know. |
I'm seeing errors when I enable a module that contains compendium packs with valid items inside of it (class, feats, spells, etc) and enable those packs in the settings of the compendium browser. I will make a new world and test more slowly. If you want, you may install PF2E Lifeblade and/or PF2E Companion Compendia to try to reproduce the issue. Here's a copy of the error from the console:
Disabling any modules that had packs that were added to the compendium browser allows it to work again without issue. |
Screenshot? |
This commit should fix the error you're seeing, and I added a warning if any of the index fields are missing to be more in line with the other tabs. |
After fixing my own dumb mistake, it looks like everything is working! I can successfully add packs from various modules and everything seems to come up normally and filter correctly! Huzzah! Thank you for your work on this, @mysurvive 😄 |
Upon further testing, I see some deities missing from the browser. Some examples: Aakriti, Abraxas, Adanye. Opening the pf2e.deities pack next to the browser is a good way to see what's missing and what was found. I double-checked that the browser wasn't excluding sources (in settings and in filters). |
I found the problem - I will get a commit in later tonight or tomorrow to fix it. |
Unfortunately, I'm not a fan of how many entries are there at the top. I don't know how to tackle it though. One idea I had was to create different contexts somehow, and have bestiary/hazards into a completely separate context, but I don't think that'd be enough. |
Would a tab for "Character Building" be a better option, with tabs for A(H)BCD (like the settings tab has)? I have a commit that I've been working on that does that, but it's not working yet. I think this is an important enhancement for the compendium browser, so I'm willing to keep pecking at it until it's in a good place. |
Does this look better @CarlosFdez ? |
fb7964b
to
50a8cfd
Compare
50a8cfd
to
7011f66
Compare
d45bb99
to
42f5e26
Compare
This PR adds Ancestries, Heritages, Backgrounds, Classes, and Deities to the compendium browser and additionally redirects the search buttons of the Character page on the Character sheet to the corresponding compendium browser tabs. This allows A(H)BCD content that is stored in compendiums to be loaded into the compendium browser to browse and filter during character building instead of searching through a myriad of compendia to find available content.
There is one issue that I ran into that I don't know how to solve.
src/module/apps/compendium-browser/index.ts
throws errors in theTagify
section starting at line 642. I tried a myriad of fixes but couldn't figure it out - this happened after removing thetraits
filter from the new A(H)BCD tabs. I don't know why this is happening, I thought theobjectHasKey
method in the if statement at line 631 would handle this, but it appears not.I realize this is an extremely large PR and probably has a lot of places where the code can be optimized and/or doesn't follow the system's standards, so take as much time as necessary to review. There's no rush on this, just a project I wanted to work on.