Skip to content

Grid, Zoom, Resize#199

Open
c-trimm wants to merge 5 commits intoearlSt1:10x-updatefrom
c-trimm:feature/grid-and-zoom
Open

Grid, Zoom, Resize#199
c-trimm wants to merge 5 commits intoearlSt1:10x-updatefrom
c-trimm:feature/grid-and-zoom

Conversation

@c-trimm
Copy link

@c-trimm c-trimm commented Feb 12, 2023

This was a bit thrown together, but it adds the ability to resize the compendium window, switch between a list and grid view of compendium items, and to zoom (scale) the item thumbnails. It also stickies the folder titles as you scroll so you can always see what folder you're in.

This is really handy when using compendiums to browse and pull in prefabs and such.

Happy to make whatever changes necessary.

@c-trimm
Copy link
Author

c-trimm commented Feb 12, 2023

Couple examples of what this looks like in practice:
image

@earlSt1
Copy link
Owner

earlSt1 commented Feb 12, 2023

Hey, this looks really cool! I found a few issues while briefly testing though. When using the grid mode you cant click on the entries to view them, and the stickied headers work a bit strange when you have multiple folders open.

I'm just about to push a release but I'll definitely include this in the next one if we can get those bits sorted 😄

@c-trimm
Copy link
Author

c-trimm commented Feb 12, 2023

@earlSt1 this is what I get for hyper focusing on prefabs, where it isn't useful to open them on click. I'll take a look. As for the stickied headers working strange, can you elaborate a bit further? They seem to work fine for me - the only quirk I've noticed is that, since each level of header is indented, the left side of the parent header is slightly visible. I didn't think that was a huge deal though, personally, but it's not my plugin. :)

@earlSt1
Copy link
Owner

earlSt1 commented Feb 12, 2023

Yeah I found it a bit weird how opening multiple folders would cause them to be stickied at the top, so they would kind of stack on top of eachother if you scrolled down. It just looked a bit strange to me but you're right its not a big deal

…ork even without folders present, made icons clickable so they work in grid mode
@c-trimm
Copy link
Author

c-trimm commented Feb 12, 2023

@earlSt1 alright, I solved the icon-clicking issue, and I also noticed an issue with searching that was breaking these changes so I had to make some changes to fix that. One thing to note is that I changed the search method to use textContent rather than innerText because when you were in grid mode, search didn't work due to the title being display: none. I tested a few different compendiums and the sidebar and it seems to work fine. Let me know if you notice any issues!

Thanks!

@c-trimm
Copy link
Author

c-trimm commented Feb 12, 2023

There's one other issue that's driving me nuts, but I'm at a loss on how to fix it - sometimes when you click an item to view it then close that item, the compendium re-renders, which causes it to lose the grid/zoom state and revert back to default. Let me know if you have any ideas on how to fix.

@earlSt1
Copy link
Owner

earlSt1 commented Feb 12, 2023

Awesome, ill have another look into what could cause the compendium to refresh tomorrow. Usually its when you update an item. To get around this i store the previous searched term and the previous open folders as module settings. I suppose you could store the previous grid/list setting and zoom level?

@c-trimm
Copy link
Author

c-trimm commented Feb 24, 2023

@earlSt1 Sorry this took a while - I did as you suggested and added the display mode and zoom level to the settings, so re-rendering no longer has that issue.

Let me know if you notice any other bugs or anything you'd like improved. Thanks!

@earlSt1
Copy link
Owner

earlSt1 commented Apr 15, 2023

Hey, sorry I havent been chasing this up. I've been getting ready for the v11 migration. Just so you know, I'm planning on retiring the module when v11 hits since it has been pretty much entirely absorbed into core. I can test and merge this into the V10 version though once i have some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants