OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

oslc-core message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (OSLCCORE-15) Allow client to request different icon sizes for resource preview


    [ https://issues.oasis-open.org/browse/OSLCCORE-15?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60732#comment-60732 ] 

Martin Pain commented on OSLCCORE-15:
-------------------------------------

I have another suggestion for this, which I think has none of the drawbacks of the other options. The only drawback is that it requires string parsing for any use other than in HTML5.

My suggestion is to create a new property on the compact resource/representation called "oslc:iconSrcSet" and borrow HTML's img element's srcset attribute's format. For example:
    <>
        oslc:icon <mediumIcon.png>;
        oslc:iconSrcSet "smallIcon.png 16w, mediumIcon.png 32w, largeIcon.png 64w".
which is making 3 icons available: one with a width of 16px, one of 32px and one of 64px. (The spec allows for heights in the parsing algorithm, but as a future compatibility measure - so they technically cause a parse error. We could either say we allow heights despite that, or say that clients should not throw an error if they see them, for future compatibility.) Plus in this example the server is identifying mediumIcon.png as the fallback for OSLC v2 clients, or OSLC v3 clients who don't want to parse the iconSrcSet value.

There is a blog post about this srcset format here (ignore everything about the sizes attribute, I believe that would not be a concern of the OSLC server):
https://css-tricks.com/responsive-images-youre-just-changing-resolutions-use-srcset/

For use directly in HTML5 pages, the browser compatibility is quite good:
http://caniuse.com/#search=srcset

For use in desktop apps or other contexts, the string would have to be parsed. The format is described in the "HTML Living Standard" (aka HTML5... kind of...):
https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element:attr-img-srcset-2 (for the complete description, you will also have to follow the "image candidate string" link).
as well as the parsing algorithm:
https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-srcset-attribute

I don't want to spend too long on this, but given it is an existing standard to describe an set of images that are the same except for their size, it seems like a good fit what what we're doing. Especially as I expect many uses of these icons will be in the web pages. But do you all think the potential burden for non-HTML clients is too much?

> Allow client to request different icon sizes for resource preview
> -----------------------------------------------------------------
>
>                 Key: OSLCCORE-15
>                 URL: https://issues.oasis-open.org/browse/OSLCCORE-15
>             Project: OASIS OSLC Lifecycle Integration Core (OSLC Core) TC
>          Issue Type: Improvement
>            Reporter: Nick Crossley
>            Priority: Minor
>              Labels: ready-for-vote
>
> In OSLC Core 2.0, the icon referenced from a compact resource SHOULD be 16x16 pixels. In the current OSLC 3.0 draft, this recommendation is removed, and the size is unspecified.
> The OSLC 2.0 approach is too restrictive, and the OSLC 3.0 approach too vague. The client should have some way of suggesting the desired size. 
> OSLC3 should provide some means for the client to request a specific icon size for resource preview.



--
This message was sent by Atlassian JIRA
(v6.2.2#6258)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]