Stacksmith icon indicating copy to clipboard operation
Stacksmith copied to clipboard

Revisit how we save card previews

Open uliwitness opened this issue 5 years ago • 0 comments

Currently, we save card previews into the file package as image files. This is annoying if you keep stacks in version control, because the thumbnail might change due to different screen resolutions or dark mode setting, opening on a different platform, not actual changes.

The original idea was to show these previews on the stack icon with QuickLook, but we don't do this right now. Can we fix this? Can we pick a single stack and card to show there?

Also, can we give people who use version control an easy way to omit such content that is just generated from other parts of the project? Maybe put them all into a ".stack_cache" folder They can put in their .gitignore ?

Also, could we make preview generation a more centralized thing? We will need thumbnails of all cards for the "Go Recent Cards" window one day. So it would be nice to have a RecentsStore that generates/provides thumbnails and decides where to store them based on what they are for:

  • main stack first card? In a caches subfolder of the stack package. (for Spotlight)
  • Thumbnails for "Recent Cards": in an appropriate system folder, somehow annotated (just named?) in a way that lets us purge old images from the cache, or purge images that are for an old version of a given card.
  • Other larger thumbnails? Just generate and don't cache (so we can use the same class to let Hammer scripters generate thumbnails).

uliwitness avatar Mar 30 '19 10:03 uliwitness