J-Guenther / foundryvtt-journal-thumbnail

A Foundry VTT Module that adds Thumbnails to Journal Entries
MIT License
2 stars 0 forks source link

Upgrade to v10? #7

Closed Dick-K closed 2 years ago

Dick-K commented 2 years ago

This a great QoL module. Is it going to be upgraded to v10?

I appreciate this may not be feasible due to the new journal model. If an upgrade is not planned, I'll raise a feature request to have the functionality included in core.

J-Guenther commented 2 years ago

Hi, thanks for bringing it up.

I just took a look at the new Journal API and I pushed some changes to the development branch: https://github.com/J-Guenther/foundryvtt-journal-thumbnail/commit/3f1d60f6d4277a5b1e374c8ed38fdc6ab378061a

It now uses the first page of a Journal as a thumbnail but only if the first page is an image. There are still some improvements to be made. For example, if you change the order of the pages, the thumbnail won't get updated yet. I will take a look at this problem soon, hopefully. All in all it is usable in version 10. I will release a new version of the module as soon as Version 10 is officially released.

Dick-K commented 2 years ago

Thanks a lot for the quick response. I have a test instance of v10, I'll see how this works now.

Many thanks to you!

J-Guenther commented 2 years ago

I am not sure if it works if you add the module via link: https://github.com/J-Guenther/foundryvtt-journal-thumbnail/tree/development since I didn't update the module.json yet

You may have to git clone it to and use it locally.

Dick-K commented 2 years ago

I couldn't install it using the link. I'm not so familiar with Github so I'll leave it untill you're happy that it's ready for v10.

J-Guenther commented 2 years ago

I updated the module.json and created a beta release of the module. It should work now if you include the module via this link: https://github.com/J-Guenther/foundryvtt-journal-thumbnail/tree/development

Dick-K commented 2 years ago

Hi. Here I've tried this, here are my observations:

Loading: I couldn't load it using the Foundry Module installer and the link above. I received a "could not retrieve" error. So I simply copied the the module,json and script.js text into the existing files for the old version. Foundry started up with no errors relating to the module and reported the version as 2.0 (beta).

Migrated Journal Entries: Journal entries that were migrated from a Foundry v9 instance and now contained Image and Text entries displayed thumbnails ok.

New Journal Entries: If I created a new journal entry with an initial Image page, no thumbnail was shown unless I added text to the Journal Title (?). The thumbnail then remained if I deleted the extra text.

Existing Journal Entries: No thumbnail was displayed if I added a '0' Image journal entry page to an existing journal entry that contained only text. I couldn't find a way of getting round this except to create a new journal entry, create a '0' Image page and then drag the other pages into the new journal entry from the old.

J-Guenther commented 2 years ago

Could you please try it again with using this link when installing the module: https://raw.githubusercontent.com/J-Guenther/foundryvtt-journal-thumbnail/development/module.json Also I fixed the bugs you mentioned. The thumbnails should now update when changing the order of the pages or when changing the image page 0.

Dick-K commented 2 years ago

Thanks for your quick responses to this. Yes, that all worked, nice job!

I uninstalled my existing version, copied the link above into the module manifest URL field and installed it.

I could add a first page image to new journal entries, change them etc with no problem. Existing journal entries displayed their first page image fine and that could be changed as well.

J-Guenther commented 2 years ago

Thanks for checking it out. I will keep the issue open until version 10 of Foundry is officially released

fverdoja commented 2 years ago

v10 has been officially released :) thanks for updating the code, will you merge the development branch into main or should I change the manifest?

J-Guenther commented 2 years ago

v10 has been officially released :) thanks for updating the code, will you merge the development branch into main or should I change the manifest?

Hi, thanks for the reminder. I will merge the dev branch to main and update the addon version in the fvtt addon registry till tomorrow.

J-Guenther commented 2 years ago

The new version is released!