New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility v10 #56
Compatibility v10 #56
Conversation
Conflict seems to come from the fact I didn't retrieve all the changes that has been done during reviews. I will try to see today how to do it with githubDesktop |
Improve image identification and category sorting
# Conflicts: # module/framework.js # module/journal.js
We may need to discuss what we want in term of pages for this v10 For now, I have :
There will also be a question on which one should be displayed first : |
…s able to see a fine version of the image by itself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like what you've done here to allocate the sections of the source WA article to different pages. I am not really sold on the idea of having a bunch of settings, do you think that users will really care to configure this? Could we simplify things and make this the default behavior?
@@ -106,5 +106,61 @@ export default class WorldAnvilConfig extends FormApplication { | |||
config: true | |||
}); | |||
|
|||
// Add the customizable labels for each importable page | |||
//------------------- | |||
game.settings.register("world-anvil", "mainArticlePage", { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These settings feel like a level of customization that may not be necessary to me - I wonder if we could keep it simpler at first and see what feedback we get from users?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment bellow.
The parameters are far from being mandatory. An good alternative could be to create translation file for every language. Or ate the least put how to create on with the necessary data inside the Readme file.
templates/journal.hbs
Outdated
@@ -2,15 +2,19 @@ | |||
{{#if this.hasContent}} | |||
<section class="category" data-category-id="{{ this.id }}" data-folder-id="{{ this.folder.id }}"> | |||
<header class="category-header flexrow"> | |||
<i title="{{ localize 'WA.ButtonUnshrinkCategory' }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Places like this are a good opportunity to use the new tooltips API instead of a standard HTML title
<i title="{{ localize 'WA.ButtonUnshrinkCategory' }}" | |
<i data-tooltip="{{ localize 'WA.ButtonUnshrinkCategory' }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've put data-tooltip=
where we had title=
. I gives a nice display.
I'm curious: Is there a way to alter those tooltip css ?
I will surely use it in my custom system. But all my custom made tooltips are written in black, with a cornsilk background
#world-anvil-browser .window-content { | ||
max-height: 80vh; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -114,6 +114,9 @@ Hooks.on("renderJournalSheet", (app, html, data) => { | |||
} | |||
} | |||
} | |||
}); | |||
|
|||
Hooks.on("renderJournalPageSheet", (app, html, data) => { | |||
|
|||
// Activate cross-link listeners | |||
html.find(".wa-link").click(event => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not need to be part of this merge, but we have a new V10 feature for declaring custom text enrichments which can be used instead of this custom logic.
You can add a TextEditorEnricher
to CONFIG.TextEditor.enrichers
which provides a regex pattern and a replacer callback function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hoho,
Good to know. I will try to se how it works
I don't really remember why I choose to put them as parameters.
I'm french myself. |
Thanks! I'll merge this in and cut a V10 compatible release :) |
The first three commits seems to come from somethink we already merged : Refresh button + category sort
I don't know why it is back in this PR :(
The rest is V10 compliance + entry pages for new Journal management
13-08-2022:
I recently added some additionnal changes du to another change in WA API.
And while doing it, I added a new buttion for shrinking categories in the journal.
(When you have a big WA world, it become difficult to navigate without it)