You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by Martin Dickson <ma...@peace.com> on 2006/08/31 03:25:32 UTC
selectManyShuttle skinning
Hi Folks,
Two (hopefully) quick questions about selectManyShuttle skinning; afraid
I cannot find the answers in the available docs:
1) How can one turn off / not render / hide the text-only links in the
Shuttle for "Move", "Move All", etc?
The icon links (e.g. af|selectManyShuttle::move-icon) are addressable in
a stylesheet, but there appears to be no matching ability to style (and
thus hide) the text only links.
2) How is the :hover pseduoclass supported in Trinidad skins?
Where we are using icons in our UI we are also using CSS to give hover
state changes to provide positive feedback to the user, but I cannot see
how to do this with the Trinidad skins.
2a) (OK so maybe three questions) :-) Is there a way to set a specific
class against each of the links in the Shuttle?
If there isn't a way of achieving :hover using the Trinidad skin I could
easily support it via traditional CSS... provided there was a class on
each link. Currently however they all have the same class of "xj".
Cheers,
Martin
--
Martin Dickson ph: +64 9 3730400 x3592
User Experience Engineer fax: +64 9 3730401
First Data Utilities http://www.firstdata.com
Re: selectManyShuttle skinning
Posted by Simon Lessard <si...@gmail.com>.
Nice workaround! Thanks for posting it.
Regards,
~ Simon
On 9/4/06, Martin Dickson <ma...@peace.com> wrote:
>
> Not sure of the etiquette of answering my own question, but in case it
> is of use to someone else...
>
> Martin Dickson wrote:
>
> > The default use of the Shuttle appears to be either a) only text
> > links (no icons) or b) text links and icons. We want c) icons only.
>
> Icon only links are now working by using a combination of traditional
> CSS and Trinidad selectors.
>
> Common CSS:
> a.xj {
> visibility: hidden;
> font-size: 0px;
> }
>
> ADF Custom CSS:
> af|selectManyShuttle::move-icon {
> visibility: visible;
> content:url(images/move16.png);
> height: 16px;
> width: 16px;
> }
>
> [repeated with different content for move-all, remove, and remove-all
> icons]
>
> The text links are still rendered -- and can be shown with a change of
> stylesheet -- but are hidden and take up no space in the default style.
> Note that using "display: none;" in the a.xj style doesn't work because
> (as far as I can tell) none of the other "display" options will override
> this even when injected inline by Trinidad.
>
> Cheers,
> Martin
>
> --
> Martin Dickson ph: +64 9 3730400 x3592
> User Experience Engineer fax: +64 9 3730401
> First Data Utilities http://www.firstdata.com
>
>
Re: selectManyShuttle skinning
Posted by Martin Dickson <ma...@peace.com>.
Not sure of the etiquette of answering my own question, but in case it
is of use to someone else...
Martin Dickson wrote:
> The default use of the Shuttle appears to be either a) only text
> links (no icons) or b) text links and icons. We want c) icons only.
Icon only links are now working by using a combination of traditional
CSS and Trinidad selectors.
Common CSS:
a.xj {
visibility: hidden;
font-size: 0px;
}
ADF Custom CSS:
af|selectManyShuttle::move-icon {
visibility: visible;
content:url(images/move16.png);
height: 16px;
width: 16px;
}
[repeated with different content for move-all, remove, and remove-all icons]
The text links are still rendered -- and can be shown with a change of
stylesheet -- but are hidden and take up no space in the default style.
Note that using "display: none;" in the a.xj style doesn't work because
(as far as I can tell) none of the other "display" options will override
this even when injected inline by Trinidad.
Cheers,
Martin
--
Martin Dickson ph: +64 9 3730400 x3592
User Experience Engineer fax: +64 9 3730401
First Data Utilities http://www.firstdata.com
Re: selectManyShuttle skinning
Posted by Simon Lessard <si...@gmail.com>.
Hello Martin, I added some more comments inline,
On 8/31/06, Martin Dickson <ma...@peace.com> wrote:
>
> Hi Simon,
>
> Thank you for the reply -- comments on comments inline. :-)
>
> Simon Lessard wrote:
>
> > On 8/30/06, Martin Dickson <ma...@peace.com> wrote:
> >
> >>
> >> 1) How can one turn off / not render / hide the text-only links in
> >> the Shuttle for "Move", "Move All", etc?
> >> The icon links (e.g. af|selectManyShuttle::move-icon) are addressable
> >> in a stylesheet, but there appears to be no matching ability to style
> >> (and
> >> thus hide) the text only links.
> >
> > What is the use case exactly? A shuttle with icon only?
>
> Yes indeed. The default use of the Shuttle appears to be either a) only
> text links (no icons) or b) text links and icons. We want c) icons only.
Not possible currently, this is quite sad. I guess we could easily implement
a skin property like -ora-show-link-text to enable skins to remove the
links. I'll create an improvement issue on JIRA about that.
>
> > 2) How is the :hover pseduoclass supported in Trinidad skins?
> >
> > :hover will pass thourgh the final generated CSS, however this won't
> work
> > with icons.
>
> OK -- I can see that. The images given as content in the CSS become img
> tags in the generated html... which means that I can't use a background
> image switch as we have been doing. (This is a bit frustrating).
In the future we might support it using some JavaScript when we detect
:hover used on icons, it could fixes many issues.
> Also, beware of CSS :hover though as it work only on <a> elements in IE.
>
> Understood. There are ways around this by using IE htc behavior.
Yeah, there's always way around for IE... The one I prefer is: not use IE
:P.
>
> > I guess you would like to add an highlighted border to the button on
> > :hover... This would be a very nice addition imho and I will try to
> > think of the best way to support it. However I doubt it's possible at
> > the moment.
>
> Not really. What I want to do is switch images on hover. I can
> currently do this in CSS (on Tomahawk components). The engineering team
> now want to use Trinidad components and I need to work out how to match
> their behaviour to the rest of the UI (which uses image background
> switching), eg:
>
> a.taskIcon {
> width: 32px;
> height: 32px;
> background-repeat: no-repeat;
> background-position: 0 0px;
> }
>
> a.taskIcon.homeIcon {background-image: url("images/home32.png"); }
>
> a.taskIcon:hover {background-position: 0 -32px;}
If we had support for -icon:hover that issue would be easy:
a.task-icon {
content: url(...)
}
a.task-icon:hover {
content: url(someInvisibleImage);
}
>
> > 2a) (OK so maybe three questions) :-) Is there a way to set a
> > specific class against each of the links in the Shuttle?
> >
> > Not currently... Would be a nice addition too. However, supporting
> > something
> > like af|selectManyShuttle::move-icon:hover looks better.
>
> Not if it doesn't support images this way.
>
> If I can't support image swapping via the skin selectors I'd still be
> very happy to support it using traditional CSS and classes on the
> links. Without either I cannot implement with Trinidad something that
> is trivial to implement without it... and that would seem to be an
> undesirable weakness in in the skinning framework.
>
> I cannot see that removing / preventing standard CSS abilities without
> offering an alternative is a good way to go. If there is no method for
> achieving this then using Trinidad is (from this UI designers
> perspective at least) no longer just an "implementation detail". :-)
The skinning engine is improving over time, we need to have this kind of
issues reported though and if possible added to JIRA. Believe me, I argued a
lot about how skinning work in the past, and we all know it still need
ameliorations, so don't be scared to continue posting issues like that. Most
of the time we'll try to implement it when it seems reasonable. -icon:hover
will be a tad harder to implement but I believe it's an important feature as
well and I'll see if I can code it.
Regards,
~ Simon
Regards,
> Martin
>
> --
> Martin Dickson ph: +64 9 3730400 x3592
> User Experience Engineer fax: +64 9 3730401
> First Data Utilities http://www.firstdata.com
>
>
Re: selectManyShuttle skinning
Posted by Martin Dickson <ma...@peace.com>.
Hi Simon,
Thank you for the reply -- comments on comments inline. :-)
Simon Lessard wrote:
> On 8/30/06, Martin Dickson <ma...@peace.com> wrote:
>
>>
>> 1) How can one turn off / not render / hide the text-only links in
>> the Shuttle for "Move", "Move All", etc?
>> The icon links (e.g. af|selectManyShuttle::move-icon) are addressable
>> in a stylesheet, but there appears to be no matching ability to style
>> (and
>> thus hide) the text only links.
>
> What is the use case exactly? A shuttle with icon only?
Yes indeed. The default use of the Shuttle appears to be either a) only
text links (no icons) or b) text links and icons. We want c) icons only.
>
> 2) How is the :hover pseduoclass supported in Trinidad skins?
>
> :hover will pass thourgh the final generated CSS, however this won't work
> with icons.
OK -- I can see that. The images given as content in the CSS become img
tags in the generated html... which means that I can't use a background
image switch as we have been doing. (This is a bit frustrating).
> Also, beware of CSS :hover though as it work only on <a> elements in IE.
Understood. There are ways around this by using IE htc behavior.
>
> I guess you would like to add an highlighted border to the button on
> :hover... This would be a very nice addition imho and I will try to
> think of the best way to support it. However I doubt it's possible at
> the moment.
Not really. What I want to do is switch images on hover. I can
currently do this in CSS (on Tomahawk components). The engineering team
now want to use Trinidad components and I need to work out how to match
their behaviour to the rest of the UI (which uses image background
switching), eg:
a.taskIcon {
width: 32px;
height: 32px;
background-repeat: no-repeat;
background-position: 0 0px;
}
a.taskIcon.homeIcon {background-image: url("images/home32.png"); }
a.taskIcon:hover {background-position: 0 -32px;}
>
> 2a) (OK so maybe three questions) :-) Is there a way to set a
> specific class against each of the links in the Shuttle?
>
> Not currently... Would be a nice addition too. However, supporting
> something
> like af|selectManyShuttle::move-icon:hover looks better.
Not if it doesn't support images this way.
If I can't support image swapping via the skin selectors I'd still be
very happy to support it using traditional CSS and classes on the
links. Without either I cannot implement with Trinidad something that
is trivial to implement without it... and that would seem to be an
undesirable weakness in in the skinning framework.
I cannot see that removing / preventing standard CSS abilities without
offering an alternative is a good way to go. If there is no method for
achieving this then using Trinidad is (from this UI designers
perspective at least) no longer just an "implementation detail". :-)
Regards,
Martin
--
Martin Dickson ph: +64 9 3730400 x3592
User Experience Engineer fax: +64 9 3730401
First Data Utilities http://www.firstdata.com
Re: selectManyShuttle skinning
Posted by Simon Lessard <si...@gmail.com>.
Hello Martin, I added some commnts inline.
On 8/30/06, Martin Dickson <ma...@peace.com> wrote:
>
> Hi Folks,
>
> Two (hopefully) quick questions about selectManyShuttle skinning; afraid
> I cannot find the answers in the available docs:
>
> 1) How can one turn off / not render / hide the text-only links in the
> Shuttle for "Move", "Move All", etc?
> The icon links (e.g. af|selectManyShuttle::move-icon) are addressable in
> a stylesheet, but there appears to be no matching ability to style (and
> thus hide) the text only links.
What is the use case exactly? A shuttle with icon only?
2) How is the :hover pseduoclass supported in Trinidad skins?
> Where we are using icons in our UI we are also using CSS to give hover
> state changes to provide positive feedback to the user, but I cannot see
> how to do this with the Trinidad skins.
:hover will pass thourgh the final generated CSS, however this won't work
with icons. For example: af|selectManyShuttle::move-icon:hover will not work
as you could expect as all selectors ending with -icon are handled
differently. Also, beware of CSS :hover though as it work only on <a>
elements in IE.
I guess you would like to add an highlighted border to the button on
:hover... This would be a very nice addition imho and I will try to think of
the best way to support it. However I doubt it's possible at the moment.
2a) (OK so maybe three questions) :-) Is there a way to set a specific
> class against each of the links in the Shuttle?
> If there isn't a way of achieving :hover using the Trinidad skin I could
> easily support it via traditional CSS... provided there was a class on
> each link. Currently however they all have the same class of "xj".
Not currently... Would be a nice addition too. However, supporting something
like af|selectManyShuttle::move-icon:hover looks better.
Regards,
~ Simon
Cheers,
> Martin
>
> --
> Martin Dickson ph: +64 9 3730400 x3592
> User Experience Engineer fax: +64 9 3730401
> First Data Utilities http://www.firstdata.com
>
>