oslc-core message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: Re: [oslc-core] Icon sizes - new suggestion (OSLCCORE-15)
- From: "Jim Amsden" <jamsden@us.ibm.com>
- To: "OASIS OSLC Core TC Discussion List (oslc-core@lists.oasis-open.org)" <oslc-core@lists.oasis-open.org>
- Date: Mon, 21 Sep 2015 08:59:54 -0400
This looks like a good suggestion - it
addresses the need, doesn't introduce a backward compatibility problem,
and uses existing solutions that are likely already implemented in some
clients. I don't find the string parsing to be a barrier or significant
burden.
Jim Amsden, Senior Technical Staff Member
OSLC and Linked Lifecycle Data
919-525-6575
From:
Martin P Pain <martinpain@uk.ibm.com>
To:
"OASIS OSLC Core
TC Discussion List (oslc-core@lists.oasis-open.org)" <oslc-core@lists.oasis-open.org>
Date:
09/18/2015 08:31 AM
Subject:
[oslc-core]
Icon sizes - new suggestion (OSLCCORE-15)
Sent by:
<oslc-core@lists.oasis-open.org>
I just commented on JIRA, but am now
copying to the list to prompt discussion:
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)
---------------------------------------------------------------------
To unsubscribe from this mail list, you must leave the OASIS TC that
generates this mail. Follow this link to all your TCs in OASIS at:
https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]