Conversation
…ForgeVTT/forge-compendium-browser
zeel01
left a comment
There was a problem hiding this comment.
Looks good for the most part, but I think we need to clean up the console output. If something is really important for debugging we should prefer console.debug() as the verbose log level if nothing is going wrong. I was going to suggest we could use the log levels from https://foundryvtt.com/packages/_dev-mode but it seems to not have been updated past v9...
src/apps/compendium-browser-app.js
Outdated
| async _prepareContext(options) { | ||
| console.warn("CompendiumBrowserApp._prepareContext", options); | ||
| const context = await super._prepareContext(options); | ||
| return context; | ||
| } | ||
|
|
||
| _onRender(context, options) { | ||
| console.warn("CompendiumBrowserApp._onRender", context, options); |
There was a problem hiding this comment.
Should these console warnings remain in the code?
src/apps/compendium-browser-app.js
Outdated
| export class CompendiumBrowserApp extends CompendiumBrowserAppBase { | ||
| constructor(book, options = {}) { | ||
| super(null, options); | ||
| console.warn("CompendiumBrowserApp.constructor", book, options); |
src/forge-compendium-browser.js
Outdated
| } | ||
|
|
||
| static async onMessage(data) { | ||
| console.warn("ForgeCompendiumBrowser.openBrowser", data); |
src/forge-compendium-browser.js
Outdated
| } | ||
|
|
||
| static openBrowser(book) { | ||
| console.warn("ForgeCompendiumBrowser.openBrowser", book); |
src/apps/compendium-browser-app.js
Outdated
|
|
||
| export class CompendiumBrowserApp extends Application { | ||
| let CompendiumBrowserAppBase; | ||
| if (foundry?.applications?.api?.ApplicationV2) { |
There was a problem hiding this comment.
I don't think it's worth putting ourselves through knots to maintain AppV1 compatibility here. I think we should just use AppV2 and set min compatibility to v12.
- Improved code organization - Made rendering compatible with v13 applications - Made rendering compatible with new 5e system
…ame" element instead.
|
|
@qalucaspacheco1 QA notes:
|
I think Intro to Stormwreck Isle can be imported for free, and it has a couple scenes. |
Eranziel
left a comment
There was a problem hiding this comment.
A few comments and nit-picks, shouldn't be anything major. The main thing remaining is putting this through QA.
| } | ||
| } | ||
|
|
||
| export class CompendiumBrowserApp extends CompendiumBrowserAppBase { |
There was a problem hiding this comment.
Is there a reason CompendiumBrowserApp and CompendiumBrowserAppBase are still separate? Do we anticipate a need to extend the latter for a different app in the future?
| computed: { | ||
| documentClasses() { | ||
| const classes = this.subsheet?.options?.classes || []; | ||
| // if (game.version.startsWith("10.")) classes.push("v10"); |
| const stats = {}; | ||
|
|
||
| for (const collection of ["drawings", "lights", "notes", "sounds", "tiles", "tokens", "walls"]) { | ||
| const collectionData = foundry.utils.isNewerVersion(game.version, "9.99999") |
There was a problem hiding this comment.
This version check can be removed, since minimum compatibility is v13 now.
| // this.subsheet._state = this.subsheet.constructor.RENDER_STATES.RENDERING; | ||
| // const templateData = await ( | ||
| // typeof this.subsheet._prepareContext === "function" | ||
| // ? this.subsheet._prepareContext() |
| } | ||
|
|
||
| static async onMessage(data) { | ||
| console.debug("ForgeCompendiumBrowser.openBrowser", data); |
There was a problem hiding this comment.
Typo
| console.debug("ForgeCompendiumBrowser.openBrowser", data); | |
| console.debug("ForgeCompendiumBrowser.onMessage", data); |
| "version": "1.5.0", | ||
| "minimumCoreVersion": "9", | ||
| "compatibleCoreVersion": "12", | ||
| "version": "1.7.0", |
There was a problem hiding this comment.
| "version": "1.7.0", | |
| "version": "1.6.0", |





mainby mistake when creating this branch. The only thing I managed to revert was the git history somehow, but the changes are still on there.