foundryvtt icon indicating copy to clipboard operation
foundryvtt copied to clipboard

Present a list of will-be-incompatible packages before initiating a core update

Open unsoluble opened this issue 3 years ago • 1 comments

User Experience

I know that everyone and her dog has Thoughts about how to ease the oops-I-didn't-mean-to-update phase around major releases, and yes we absolutely have a good number of warnings in all the right places, but hear me out on maybe one more thing that could help a lot, I think:

When you're in Setup > Update Software and you hit the Check for Update button, run a manifest check on all installed systems and modules as if the client were running the new/proposed core release. This will acquire incompatibility flags for all installed packages, which would then be displayed — and required to be acknowledged — before the Begin Download button does anything.

Could be a window that pops after clicking Begin Download, could be displayed inline with the patch notes, I dunno, whatever works best in your mind.

But currently there is no straightforward way for users to see exactly what is going to "break" when they update core. Presenting this up front seems technically possible, and could save a lot of grief in the long run.

unsoluble avatar Sep 02 '22 17:09 unsoluble

Related to #6325

plutoneld avatar Sep 02 '22 19:09 plutoneld

Comment from @larkinabout

It would be great to be able to check for compatibility with installed systems and modules when updating core, systems or modules. Something like a pop-up warning when a user clicks 'Update', which loops through and checks the compatibility requirements of systems/modules that have dependencies on the package being updated.

aaclayton avatar Feb 12 '23 14:02 aaclayton

This is my current implementation as a script that can be run in the setup screen

!async function(){async function e(e,t){let o={};try{o=await Setup.checkPackage({type:e,id:t})}catch(e){}return o}const t=Array.from(game.systems).map((e=>e.id)),o=Array.from(game.modules).map((e=>e.id));let n=await Promise.all(t.map((async t=>{const o=await e("system",t);return{name:game.systems.get(t).title??t,version:o.remote?.compatibility?.verified??"Unknown",goodToUpdate:parseInt(game.version)<parseInt(o.remote?.compatibility?.verified)}})));n=n.sort(((e,t)=>e.name?.localeCompare(t.name))).sort(((e,t)=>e.goodToUpdate?-1:1));let a=await Promise.all(o.map((async t=>{const o=await e("module",t);return{name:game.modules.get(t).title??t,version:o.remote?.compatibility?.verified??"Unknown",goodToUpdate:parseInt(game.version)<parseInt(o.remote?.compatibility?.verified)}})));a=a.sort(((e,t)=>e.name?.localeCompare(t.name))).sort(((e,t)=>e.goodToUpdate?-1:1));const r=`\n    <table id="version-checker">\n        <thead>\n            <tr>\n                <th>System</th>\n                <th>FVTT Version</th>\n            </tr>\n        </thead>\n        <tbody>\n            ${n.map((e=>`<tr><td>${e.name}</td><td style="background-color: ${e.goodToUpdate?"lime":"red"};">${e.version}</td></tr>`)).join("")}\n        </tbody>\n    </table>\n    `,i=`\n    <table>\n        <thead>\n            <tr>\n                <th>Module</th>\n                <th>FVTT Version</th>\n            </tr>\n        </thead>\n        <tbody>\n            ${a.map((e=>`<tr><td>${e.name}</td><td style="background-color: ${e.goodToUpdate?"lime":"red"};">${e.version}</td></tr>`)).join("")}\n        </tbody>\n    </table>\n    `;Dialog.prompt({title:"Modules and Systems",content:r+i,rejectClose:!1,render:e=>{setTimeout((()=>{document.querySelector("#version-checker").scrollIntoView(!0)}),100)}})}();

image

theripper93 avatar Jun 07 '23 12:06 theripper93

Thank you @theripper93. Please note that we do not endorse anyone pasting JavaScript code into the Foundry VTT console on the setup screen. Pasting code to execute on the /setup screen can have damaging impacts on your environment and installation. It's essential that we emphasize that using such a script is risky and not recommended.

We will certainly evaluate and prioritize these changes to improve user experience for our users. We hear and understand that this is a pain point for people.

aaclayton avatar Jun 07 '23 19:06 aaclayton

It would be useful to have a report out that summarize the thins.

For example you Have installed xx systems, of this xx system yy are already ready for next version with a percentage of -> yy/xx=50%

Same for modules. It would be great if we can have a summary for all modules installed and a summart for world considering module enable for that word. Suppose you have a word with only 2 modules, It can reports 2 2/2 migrated. Meanwhile overall you could have 100 modules and overall percentage could be 40%.

At least users will know, which systems will work, which world and the percentage of success for every combination of world/system

alexdiste avatar Jun 08 '23 09:06 alexdiste