earlSt1 / vtt-compendium-folders

Collapsable folders in the compendium directory and folder structures inside compendiums for FoundryVTT
21 stars 18 forks source link

Feature Request: Hide all in folder or subfolder. #52

Closed SuperMalakan closed 3 years ago

SuperMalakan commented 3 years ago

I'd like to hide compendium items from my players to make it easier for them to find what they are looking for, the players don't need to see 20+ compendiums that are just intended for the GM.

While I could individually hide them, it would be a massive time saver to be able to hide the contents of a whole folder.

earlSt1 commented 3 years ago

You'll be pleased to know that this is being worked on for the next update, in addition to Show all, and Lock/Unlock all :smile:

If you'd like to test it out, you can find the manifest here: https://raw.githubusercontent.com/earlSt1/vtt-compendium-folders/master/test/module.json Note: make backups if you do! it's a test version so not stable yet.

SuperMalakan commented 3 years ago

Amazing <3 will test now.

SuperMalakan commented 3 years ago

Seems to work fine, no issues found thus far.

SuperMalakan commented 3 years ago

Found one bug, I created a compendium using a button that was on the folder, this compendium can't be deleted. Instead I get an error on screen.

this is the console:

Error: The requested World pack name compendium-name does not exist
    at Function._onDeleteCompendium (/home/main/Servers/FoundryVTT/foundryvtt/resources/app/dist/database/documents/compendium.js:1:8910)
    at Function._onManageCompendium (/home/main/Servers/FoundryVTT/foundryvtt/resources/app/dist/database/documents/compendium.js:1:7446)
    at Socket.handleEvent (/home/main/Servers/FoundryVTT/foundryvtt/resources/app/dist/sockets.js:1:2268)
    at Socket.emit (node:events:378:20)
    at /home/main/Servers/FoundryVTT/foundryvtt/resources/app/node_modules/socket.io/lib/socket.js:528:12
    at processTicksAndRejections (node:internal/process/task_queues:76:11)
_handleError @ foundry.js:3780
(anonymous) @ foundry.js:3761
n.onack @ index.js:83
n.onpacket @ index.js:83
(anonymous) @ index.js:83
n.emit @ index.js:83
n.ondecoded @ index.js:83
(anonymous) @ index.js:83
n.emit @ index.js:83
a.add @ index.js:83
n.ondata @ index.js:83
(anonymous) @ index.js:83
n.emit @ index.js:83
n.onPacket @ index.js:83
(anonymous) @ index.js:83
n.emit @ index.js:83
n.onPacket @ index.js:83
n.onData @ index.js:83
ws.onmessage @ index.js:83
foundry.js:3777 Uncaught (in promise) Error: The requested World pack name compendium-name does not exist
    at Function._onDeleteCompendium (/home/main/Servers/FoundryVTT/foundryvtt/resources/app/dist/database/documents/compendium.js:1:8910)
    at Function._onManageCompendium (/home/main/Servers/FoundryVTT/foundryvtt/resources/app/dist/database/documents/compendium.js:1:7446)
    at Socket.handleEvent (/home/main/Servers/FoundryVTT/foundryvtt/resources/app/dist/sockets.js:1:2268)
    at Socket.emit (node:events:378:20)
    at /home/main/Servers/FoundryVTT/foundryvtt/resources/app/node_modules/socket.io/lib/socket.js:528:12
    at processTicksAndRejections (node:internal/process/task_queues:76:11)

quick edit:

reloading the world fixed the issue, so does the folder need to be updated/re-rendered to display the current state of the folder?

earlSt1 commented 3 years ago

Good stuff, I think there is still issues with the Folders in compendiums part of the module. If you dont use them then it should be fine.

And ok i'll check that out (your message appeared as i was typing). Does it work after a refresh?

SuperMalakan commented 3 years ago

wrote a quick edit, but you were faster than I was. Refresh worked.

earlSt1 commented 3 years ago

Feature included in v2.2.0