On 8 Sep 2015 at 11:36:37, Marius Dumitru Florea
(mariusdumitru.florea@xwiki.com(mailto:mariusdumitru.florea@xwiki.com)) wrote:
We expect the extensions to be well integrated into
XWiki. This is
achieved by using the *current* color theme, the *current* icon set
and by limiting the amount of custom styles (use the styles from the
*current* skin as much as possible). In order to make the extension
consistent with the L&F of XWiki an extension developer will try to
use the same icons and images she sees in the XWiki UI (default skin).
This is the case with the noavatar image. Best is if the skins use
only icons/images defined in the icon set so that extensions use the
same images/icons.
Thanks Marius. That’s interesting but I’d put that in the best practice section of the
Skin Dev Guide.
Icon Set, Color Theme are not supposed to be related to Skins (and they shouldn’t be). So
that’s fine.
However, if an App uses the styles from a specific Skin, I don’t see how they’ll work when
the user uses another skin (and we have several on e.x.o) in his wiki or when the default
skin changes (imagine if all extensions need new releases when a new skin is out, that’s a
lot of work).
What about the best practice I proposed? I couldn’t fully figure out if you agreed or
disagreed with it :)
If you disagree with it what would be your proposal for XWIKI-12327?
Thanks
-Vincent
Thanks,
Marius
On Tue, Sep 8, 2015 at 12:12 PM, vincent(a)massol.net wrote:
Hi devs,
Following a discussion at
http://jira.xwiki.org/browse/XWIKI-12327# I’d like to propose
to add this new best practice in the App Guide, i.e. at
http://platform.xwiki.org/xwiki/bin/view/DevGuide/BestPractices
Rule: Do not use Skin-specific resources in Extensions/Applications
Rationale: If you do, then your Extension/Application will only work for that Skin. When
the default skin in XWiki is modified, your Extension/Application will stop to work fine.
Example: This is what happened in apps like in the Forum app which was using:
getSkinFile(“noavatar.png”) where “noavatar.png” was a Colibri-skin resource only. The
Forum app was broken when we moved to Flamingo and the Forum app had to be modified to use
getSkinFile("icons/xwiki/noavatar.png”) which is better since it’s a global resource,
thus available to all Skins (see
https://github.com/xwiki-contrib/application-forum/commit/3d3a99e5665265607…).
WDYT? Anyone disagree? I’d like to clos this topic quickly so that we can close
XWIKI-12327.
Thanks
-Vincent
PS: Additional idea (I don’t know if it’s feasible): I wonder if we could even prevent
getSkinFile() to return a skin-specific resource if the originating code is not from a
resource from this Skin or if the originating code is not located in a Children Skin (i.e.
a skin css, skin jss or skin vm). i.e. consider that skin-specific resources have a
private access level.
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs