[xwiki-devs] [VOTE] SkinAccessBridge new API: getIconURL()
Hi, In order to implement support for icons/symbols in the rendering (see ), we need to add an API to return an icon URL based on the icon name. public interface SkinAccessBridge { ... /** * @param iconName the standard name of an icon (it's not the name of the file on the filesystem, it's a generic * name, for example "success" for a success icon * @return the URL to the icon resource * @since 2.6M1 */ String getIconURL(String iconName); } +1 from me. Thanks -Vincent
+1 Thanks, Marius On 10/20/2010 11:21 AM, Vincent Massol wrote:
Hi,
In order to implement support for icons/symbols in the rendering (see ), we need to add an API to return an icon URL based on the icon name.
public interface SkinAccessBridge { ... /** * @param iconName the standard name of an icon (it's not the name of the file on the filesystem, it's a generic * name, for example "success" for a success icon * @return the URL to the icon resource * @since 2.6M1 */ String getIconURL(String iconName); }
+1 from me.
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+1, JV. On Wed, Oct 20, 2010 at 10:21 AM, Vincent Massol <[email protected]> wrote:
Hi,
In order to implement support for icons/symbols in the rendering (see ), we need to add an API to return an icon URL based on the icon name.
public interface SkinAccessBridge { ... /** * @param iconName the standard name of an icon (it's not the name of the file on the filesystem, it's a generic * name, for example "success" for a success icon * @return the URL to the icon resource * @since 2.6M1 */ String getIconURL(String iconName); }
+1 from me.
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+1 On Wed, Oct 20, 2010 at 10:21, Vincent Massol <[email protected]> wrote:
Hi,
In order to implement support for icons/symbols in the rendering (see ), we need to add an API to return an icon URL based on the icon name.
public interface SkinAccessBridge { ... /** * @param iconName the standard name of an icon (it's not the name of the file on the filesystem, it's a generic * name, for example "success" for a success icon * @return the URL to the icon resource * @since 2.6M1 */ String getIconURL(String iconName); }
+1 from me.
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
+1 On Wed, Oct 20, 2010 at 10:21 AM, Vincent Massol <[email protected]> wrote:
Hi,
In order to implement support for icons/symbols in the rendering (see ), we need to add an API to return an icon URL based on the icon name.
public interface SkinAccessBridge { ... /** * @param iconName the standard name of an icon (it's not the name of the file on the filesystem, it's a generic * name, for example "success" for a success icon * @return the URL to the icon resource * @since 2.6M1 */ String getIconURL(String iconName); }
+1 from me.
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+1 Alex On 10/20/2010 10:21 AM, Vincent Massol wrote:
Hi,
In order to implement support for icons/symbols in the rendering (see ), we need to add an API to return an icon URL based on the icon name.
public interface SkinAccessBridge { ... /** * @param iconName the standard name of an icon (it's not the name of the file on the filesystem, it's a generic * name, for example "success" for a success icon * @return the URL to the icon resource * @since 2.6M1 */ String getIconURL(String iconName); }
+1 from me.
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On 10/20/2010 10:21 AM, Vincent Massol wrote:
Hi,
In order to implement support for icons/symbols in the rendering (see ), we need to add an API to return an icon URL based on the icon name.
public interface SkinAccessBridge { ... /** * @param iconName the standard name of an icon (it's not the name of the file on the filesystem, it's a generic * name, for example "success" for a success icon * @return the URL to the icon resource * @since 2.6M1 */ String getIconURL(String iconName); }
+1 from me.
I don't think this is enough. We currently have only one implementation for this component, which uses only the current skin (as taken from the XWiki Context). This means that it won't support multiple icon sets. I'd rather introduce another component for IconTheme, which use the existing SkinAccessBridge#getSkinFile(full path to the icon). There will be several implementations for the IconTheme, the one active by default being based on silk/gif. We'll have to find a way to select the desired IconTheme to use (could be customized for each wiki in a farm, for each skin, for each user?). Each IconTheme would have a basePath ("resources/icons/silk/"), and by default each icon is mapped to the same filename, plus an extension. A custom mapping from icon names to filenames could be provided in a configuration file (standard .properties). If this is loaded as a ResourceBundle, there's no need to even code the default, since ResourceBundle.get("key") returns the unchanged key for undefined values. WDYT? -- Sergiu Dumitriu http://purl.org/net/sergiu/
On Oct 20, 2010, at 11:24 PM, Sergiu Dumitriu wrote:
On 10/20/2010 10:21 AM, Vincent Massol wrote:
Hi,
In order to implement support for icons/symbols in the rendering (see ), we need to add an API to return an icon URL based on the icon name.
public interface SkinAccessBridge { ... /** * @param iconName the standard name of an icon (it's not the name of the file on the filesystem, it's a generic * name, for example "success" for a success icon * @return the URL to the icon resource * @since 2.6M1 */ String getIconURL(String iconName); }
+1 from me.
I don't think this is enough. We currently have only one implementation for this component, which uses only the current skin (as taken from the XWiki Context). This means that it won't support multiple icon sets.
I'd rather introduce another component for IconTheme, which use the existing SkinAccessBridge#getSkinFile(full path to the icon). There will be several implementations for the IconTheme, the one active by default being based on silk/gif. We'll have to find a way to select the desired IconTheme to use (could be customized for each wiki in a farm, for each skin, for each user?).
Each IconTheme would have a basePath ("resources/icons/silk/"), and by default each icon is mapped to the same filename, plus an extension. A custom mapping from icon names to filenames could be provided in a configuration file (standard .properties). If this is loaded as a ResourceBundle, there's no need to even code the default, since ResourceBundle.get("key") returns the unchanged key for undefined values.
WDYT?
I generally agree about what you said. It seems you're talking about the core skin module I've been thinking about for a long time already. I've always postponed implementing it for lack of time and more urgent things. I won't have time to work on it anytime soon unfortunately. Thanks -Vincent
Le 20 oct. 2010 à 23:24, Sergiu Dumitriu a écrit :
On 10/20/2010 10:21 AM, Vincent Massol wrote:
Hi,
In order to implement support for icons/symbols in the rendering (see ), we need to add an API to return an icon URL based on the icon name.
public interface SkinAccessBridge { ... /** * @param iconName the standard name of an icon (it's not the name of the file on the filesystem, it's a generic * name, for example "success" for a success icon * @return the URL to the icon resource * @since 2.6M1 */ String getIconURL(String iconName); }
+1 from me.
I don't think this is enough. We currently have only one implementation for this component, which uses only the current skin (as taken from the XWiki Context). This means that it won't support multiple icon sets. +1 the color theme should be also updated regarding the new action menu ColorTheme could be updated to merge color + icon theme
I'd rather introduce another component for IconTheme, which use the existing SkinAccessBridge#getSkinFile(full path to the icon). There will be several implementations for the IconTheme, the one active by default being based on silk/gif. We'll have to find a way to select the desired IconTheme to use (could be customized for each wiki in a farm, for each skin, for each user?).
Each IconTheme would have a basePath ("resources/icons/silk/"), and by default each icon is mapped to the same filename, plus an extension. A custom mapping from icon names to filenames could be provided in a configuration file (standard .properties). If this is loaded as a ResourceBundle, there's no need to even code the default, since ResourceBundle.get("key") returns the unchanged key for undefined values.
WDYT?
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Thu, Oct 21, 2010 at 12:43, Gregory GUENEAU <[email protected]> wrote:
Le 20 oct. 2010 à 23:24, Sergiu Dumitriu a écrit :
On 10/20/2010 10:21 AM, Vincent Massol wrote:
Hi,
In order to implement support for icons/symbols in the rendering (see ), we need to add an API to return an icon URL based on the icon name.
public interface SkinAccessBridge { ... /** * @param iconName the standard name of an icon (it's not the name of the file on the filesystem, it's a generic * name, for example "success" for a success icon * @return the URL to the icon resource * @since 2.6M1 */ String getIconURL(String iconName); }
+1 from me.
I don't think this is enough. We currently have only one implementation for this component, which uses only the current skin (as taken from the XWiki Context). This means that it won't support multiple icon sets. +1 the color theme should be also updated regarding the new action menu ColorTheme could be updated to merge color + icon theme
Would be great to have IconThemes http://jira.xwiki.org/jira/browse/XE-697and use velocity variables - but this is another discussion I guess
I'd rather introduce another component for IconTheme, which use the existing SkinAccessBridge#getSkinFile(full path to the icon). There will be several implementations for the IconTheme, the one active by default being based on silk/gif. We'll have to find a way to select the desired IconTheme to use (could be customized for each wiki in a farm, for each skin, for each user?).
Each IconTheme would have a basePath ("resources/icons/silk/"), and by default each icon is mapped to the same filename, plus an extension. A custom mapping from icon names to filenames could be provided in a configuration file (standard .properties). If this is loaded as a ResourceBundle, there's no need to even code the default, since ResourceBundle.get("key") returns the unchanged key for undefined values.
WDYT?
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (9)
-
Alex Busenius -
Ecaterina Valica -
Gregory GUENEAU -
Jean-Vincent Drean -
Jerome Velociter -
Marius Dumitru Florea -
Sergiu Dumitriu -
Thomas Mortagne -
Vincent Massol