myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeanne Waldman <jeanne.wald...@oracle.com>
Subject Re: [Trinidad] skinning keys for 'icons'
Date Thu, 22 Jul 2010 22:08:56 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Great! Thank you. I'll review and commit.<br>
<br>
Jeanne<br>
<br>
Marius Petoi wrote, On 7/22/2010 8:04 AM PT:
<blockquote
 cite="mid:AANLkTikGFbBpbkTobNUKfq35rjCq3Abr2NtLRyACRQIl@mail.gmail.com"
 type="cite">Hi Jeanne,<br>
  <br>
I renamed the styles and added the patch to the ticket: <a
 moz-do-not-send="true"
 href="https://issues.apache.org/jira/browse/TRINIDAD-1860">https://issues.apache.org/jira/browse/TRINIDAD-1860</a>.
The styles were not used anywhere else in the casablanca skin or in
Trinidad, so this shouldn't have such a big impact.<br>
  <br>
Regards,<br>
Marius<br>
  <br>
  <div class="gmail_quote">On Thu, Jul 22, 2010 at 12:20 AM, Jeanne
Waldman <span dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:jeanne.waldman@oracle.com">jeanne.waldman@oracle.com</a>&gt;</span>
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left:
1ex;">
    <div bgcolor="#ffffff" text="#000000">Yes, relying on a naming
convention and then allowing them to easily
break it without any warning was not so smart.<br>
    <br>
If you can change it, that would be great since the code goes through
extra cycles trying to figure this out, so if nothing else it will
slightly help performance. If you think people have extended the skin,
then you will break them if you change it. That's the issue.<br>
    <br>
Jeanne<br>
    <br>
    <br>
    <br>
Marius Petoi wrote, On 7/21/2010 1:44 AM PT:
    <div>
    <div class="h5">
    <blockquote type="cite">Hi Jeanne,<br>
      <br>
My colleague that created the Casablanca skin didn't know about the
icon and style naming convention. Should I change the names of the
selectors? Or should I wait until you decide whether you create a new
@icon rule.<br>
      <br>
Regards,<br>
Marius<br>
      <br>
      <div class="gmail_quote">On Wed, Jul 21, 2010 at 4:52 AM, Jeanne
Waldman <span dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:jeanne.waldman@oracle.com" target="_blank">jeanne.waldman@oracle.com</a>&gt;</span>
wrote:<br>
      <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left:
1ex;">
        <div bgcolor="#ffffff" text="#000000">Hi,<br>
        <br>
I started working on some skinning tasks regarding Icon Objects. <br>
        <a moz-do-not-send="true"
 href="https://issues.apache.org/jira/browse/TRINIDAD-636"
 target="_blank">https://issues.apache.org/jira/browse/TRINIDAD-636</a>
and <a moz-do-not-send="true"
 href="https://issues.apache.org/jira/browse/TRINIDAD-17"
 target="_blank">https://issues.apache.org/jira/browse/TRINIDAD-17</a><br>
One is to have -tr-rule-ref work for icons. The other is to be able to
inherit properties from a base skin for icons.<br>
        <br>
While looking at these issues, I found that some of our skinning keys
end in "-icon" when they should have ended in "-icon-style". The reason
is the parser code looks at -icon and says it is an Icon Object, and it
creates an Icon Object. If the 'content' property is not there, it also
creates a StyleNode. StyleNodes get transformed and written to the
generated CSS file. Icon Objects do not.<br>
        <br>
What should have happened is that anything that ended with -icon was an
Icon Object, and if there was no 'content' we output a warning, but do
not create a StyleNode.<br>
        <br>
This way people wouldn't have been able to create selectors with names
that ended in '-icon' and really weren't icons.<br>
        <br>
This makes it harder to solve those JIRA issues.<br>
        <br>
The point of this email is twofold. <br>
        <br>
        <b>One</b>:<i> remember, icons end in '-icon' or 'Icon:alias'
whereas
styles that you want generated in the CSS should not - they should say
'-icon-style' or 'IconStyle:alias'.</i><br>
        <br>
        <b>Two</b>: <i>For backward compatibility, I don't think I can
change
the selectors with wrong names because they are public. What do people
think?</i><br>
        <br>
They are:<br>
        <br>
af|panelPopup::close-icon<br>
and<br>
af|dialog::close-icon<br>
        <br>
The new casablanca skin creates its own selectors, and it uses Icon,
when it meant IconStyle. These are not documented anywhere, but I
suppose someone could have created a skin from them either way. They
are:<br>
        <br>
        <code>/* Dialog window component
------------------------------------------------------------------------------------------
*/<br>
        <br>
.CBDialogHeadCloseIcon {<br>
&nbsp;&nbsp;&nbsp; -tr-rule-ref: selector(".CBDialogHeadCloseIcon:alias");<br>
}<br>
.CBDialogHeadCloseIconHover {<br>
&nbsp;&nbsp;&nbsp; -tr-rule-ref: selector(".CBDialogHeadCloseIconHover:alias");<br>
}<br>
        <br>
af|dialog::close-icon {<br>
&nbsp;&nbsp;&nbsp; -tr-rule-ref: selector(".CBDialogHeadCloseIcon");<br>
}<br>
        <br>
--<br>
/* Table icons */<br>
        <b>/* We don't use ":alias" sufix because didn't work, probably
its
a
bug */</b><br>
.CBTableSelectAllIcon{<br>
&nbsp;&nbsp;&nbsp; -tr-rule-ref: selector(".CBIconLook:alias");<br>
&nbsp;&nbsp;&nbsp; -tr-rule-ref: selector(".CBIconSelectAll:alias");<br>
}<br>
.CBTableSelectAllIconHover {<br>
&nbsp;&nbsp;&nbsp; -tr-rule-ref: selector(".CBIconLookHover:alias");<br>
&nbsp;&nbsp;&nbsp; -tr-rule-ref: selector(".CBIconSelectAll:alias");<br>
}<br>
.CBTableSelectNoneIcon {<br>
&nbsp;&nbsp;&nbsp; -tr-rule-ref: selector(".CBIconLook:alias");<br>
&nbsp;&nbsp;&nbsp; -tr-rule-ref: selector(".CBIconSelectNone:alias");<br>
}<br>
.CBTableSelectNoneIconHover {<br>
&nbsp;&nbsp;&nbsp; -tr-rule-ref: selector(".CBIconLookHover:alias");<br>
&nbsp;&nbsp;&nbsp; -tr-rule-ref: selector(".CBIconSelectNone:alias");<br>
}<br>
.CBTableSelectExpandAllIcon {<br>
&nbsp;&nbsp;&nbsp; -tr-rule-ref: selector(".CBIconLook:alias");<br>
&nbsp;&nbsp;&nbsp; -tr-rule-ref: selector(".CBIconExpandAll:alias");<br>
}<br>
.CBTableSelectExpandAllIconHover {<br>
&nbsp;&nbsp;&nbsp; -tr-rule-ref: selector(".CBIconLookHover:alias");<br>
&nbsp;&nbsp;&nbsp; -tr-rule-ref: selector(".CBIconExpandAll:alias");<br>
}<br>
.CBTableSelectCollapseAllIcon {<br>
&nbsp;&nbsp;&nbsp; -tr-rule-ref: selector(".CBIconLook:alias");<br>
&nbsp;&nbsp;&nbsp; -tr-rule-ref: selector(".CBIconCollapseAll:alias");<br>
}<br>
.CBTableSelectCollapseAllIconHover {<br>
&nbsp;&nbsp;&nbsp; -tr-rule-ref: selector(".CBIconLookHover:alias");<br>
&nbsp;&nbsp;&nbsp; -tr-rule-ref: selector(".CBIconCollapseAll:alias");<br>
}</code><br>
        <br>
--<br>
The person that created these keys thought it was a bug that :alias
didn't work, when really it is a bug that ending the selector name with
'Icon' did work! :)<br>
        <br>
I'm wondering if anyone has thoughts on this.<br>
        <br>
I'm thinking I can add a warning if I know a selector ends in Icon but
doesn't have 'content'.<br>
        <br>
When I implement -tr-rule-ref, the only thing I can think of is to
resolve all the includes to see if anywhere there is a 'content', and
if so, create an Icon, if not create a StyleNode, but this will make it
more complicated.<br>
        <br>
If I had to do all this over again, I'd make an @rule for icons or have
them be in a separate file, rather than relying on a naming convention
which obviously did not work. In fact, I wonder if I can create an
@icon rule now. Hmmm.<br>
        <br>
- Jeanne<br>
        </div>
      </blockquote>
      </div>
      <br>
    </blockquote>
    </div>
    </div>
    </div>
  </blockquote>
  </div>
  <br>
</blockquote>
</body>
</html>

Mime
View raw message