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: add some amount of sortability to compendia in folders #189

Open esheyw opened 1 year ago

esheyw commented 1 year ago

As it stands, when I enable compendium folders it successfully sorts all my system compendia into folders, however when I then enable my local shared compendia module, those compendia are at the bottom of the list in each folder, and they can't seem to be re-ordered (dragging just drops them into the Default folder, and adding them back to the appropriate folder puts them back at the bottom of the list). I'd love some ability to sort them; a 'Sort A-Z' in the folder context menu would be ideal, IMO.

gregpola commented 1 year ago

This or even just have existing folders abide by the default sort order in the settings

Vhostym-the-Sojourner commented 1 year ago

This would be great. I am currently doing this with a custom CSS module I wrote, but being able to have a settings file that remembers your sort order and dragging them would be great.

gambit07 commented 1 year ago

This would be great. I am currently doing this with a custom CSS module I wrote, but being able to have a settings file that remembers your sort order and dragging them would be great.

Any chance you could share that?

Vhostym-the-Sojourner commented 1 year ago

@gambit07 I can, however, it is currently a part of a larger compilation that I have written on top of other modules and styles so it may not work the same for you that it does for me.

body.vtt.game .directory .directory-list {
    position: relative;
    display: flex;
    flex-direction: column;
}

body.vtt.game .directory .directory-list .directory-item.folder[data-folder-id=cfolder_yUONsJKuVh] {
    order: 9999;
}

This small section basically moves a folder that I have last in the order. But you can order however you like by changing the data-folder-id to the folder you want to target and the order to the sort position.

Edit: formatting