-
Notifications
You must be signed in to change notification settings - Fork 3
Feature proposal: extensible content icons #2
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
Comments
Generally I try to keep extensions as self-contained (independent from other extensions) as I can, simply so that changing one extension doesn't break others. You could add something like this: Obviously we already have this problem with the core application but there we already have rules that there can't be breaking changes in the api outside major updates and we do have to be super-careful to not break backwards compatibility. My point is: adding an api to an extension is different from adding a feature, it shouldn't be "gimmicky". In this case I see how this would be useful, if you were to develop this api (assuming it works) I'll merge it, but my original plan for mod-content was simply to accept PRs that add file types for games, so that all the content detection was in one place. More concretely: afaict your proposal wasn't to add detection for content based on file extension and such but for the other extension to just set a content flag directly and the mod-content extension to use it. In case you didn't know: you can simply add register functions to the context object, they will automatically become available to all extensions. Extensions can call "context.optional.register...", if said register function doesn't exist (e.g. because the extension isn't installed) the call will simply be skipped. |
I was poking around with this but wanted to check if you'd be interested in a feature before I sink too much time into a PR. The current implementation means that content icons are only possible for the predefined types in the
typeDescription
object in this extension.I started mucking around with making that extensible so that other extensions could conceivably add their own detectable types and icons that would be shown by the "standard" table column from this extension. Would this be something you'd consider including?
What I started with basically came down to this:
ModContent
'srender()
content-extra
in my PoC) from the current modmod-content
.Alternatively with a bit of retooling I'm sure it would be possible to reuse the same approach using the same attribute to avoid duplication
I don't even know if it was possible but figured I'd check if it was something you'd consider before I sink too much time into it
The text was updated successfully, but these errors were encountered: