Another option might be to allow the user to reference certain well-known
themes (there are 4 or 5 that come with Flex) with a {theme} placeholder
(similar to the {locale} placeholder). This is how Flex/FlashBuilder do it,
under the covers. That would allow defining a
<themes><theme>{theme}/halo/halo.swc</theme></themes> entry. The
version-based defaulting, to make Spark the defaut for 4.x and Halo the
default for 3.x, coupled with this syntax, might be worth considering.
On Nov 19, 2010 1:49 PM, "Ryan Gardner" <[email protected]> wrote:
> True. I think the smartest defaults to use for flexmojos would be to
> mirror what Flex or flashbuilder does by itself - but that is based a
> lot on the version obviously.
>
> I think that the defaults should be to use spark only for 4.0 (or
> wherever spark became the default) and higher, and use halo for
> anything less than flex 4 - but if there is anything in <themes> at
> all or if there are any <scope="theme"> dependencies - have the
> default spark inclusion not happen
>
> so it'd be something like this:
>
> List<String> getThemes() {
> if (there are scope = theme dependencies || this.themes != null) {
> // add in the themes explicitly included
> // add in whatever
> }
> if (version < 4 || useHaloTheme ) {
> setup the halo theme
> }
> if (version > 4) {
> setup the spark theme
> }
>
> We'd only need to add one property (useHaloTheme) that would force
> halo to be included for earlier versions - and even that property
> could probably be optional if the user wanted to just explicitly
> define halo in the dependencies with scope=theme
>
> What do you think of that approach?
>
> I agree if we can avoid having some property trigger it and just go
> based on dependencies that'd be a plus. Perhaps splitting out
> spark.css and halo.swc into their own artifacts and then if the user
> wants to use them as themes just include them? (that'd be a major pain
> though to go back over all the past flex versions released and put a
> halo-theme.swc and spark-theme.css in the repositories, so that
> approach might not work so well)
>
> Ryan
>
>
>
> On Fri, Nov 19, 2010 at 9:53 AM, Marvin Froeder <[email protected]> wrote:
>> Hrmmm, I'm usually not a fan of this dontDefault configurations.....
IMHO,
>> this mean the default is either wrong or broken.
>>
>> I agree with you, if your APP is pure spark, makes no since to include
halo
>> theme.  Or, if it is pure halo, makes no sense to include spark theme.
>>
>> If I'm not mistake the default is spark only for flex 4.1
>>>
>>>       <!-- List of CSS or SWC files to apply as a theme. -->
>>>       <theme>
>>>          <!-- The Flex 4 default theme is Spark. -->
>>>          <filename>themes/Spark/spark.css</filename>
>>>       </theme>
>>
>> One idea I had was to check the dependency list....    add spark.css when
>> spark.swc is present on the dependencies and add halo.swc when mx.swc is
>> present....
>>
>> If you don't use halo, just exclude mx.swc and you are ok.  Or, if you
don't
>> use spark just remove spark.swc from your build the the themes are going
to
>> be fixed automatically....
>>
>> Problem:  mx.swc only exists for flex 4.5
>>
>> It would be a nice ground for hero stuff.... when mobilecomponents.swc
need
>> a different set of themes
>>>
>>>       <!-- List of CSS or SWC files to apply as a theme. -->
>>>       <theme>
>>>          <!-- default theme is mobile overlayed on top of spark -->
>>>          <filename>themes/Mobile/spark.css</filename>
>>>          <filename>themes/Mobile/mobile.swc</filename>
>>>       </theme>
>>
>> I have no clue on how to deal with flex 4.0 and 4.1, but I'm listening.
May
>> be would need a useSpark/useHalo.... I just don't like that, but that is
>> totally me, I have no technical reason to forbid that, my guts just tell
me
>> something is wrong =/
>>
>> VELO
>>
>> On Fri, Nov 19, 2010 at 2:31 PM, Ryan Gardner <[email protected]> wrote:
>>>
>>> Does Flex Builder always include both spark and halo themes? If it
>>> does, I suppose that's a fine default - do we want to add something to
>>> flex mojos to allow the user to disable spark or halo?
>>>
>>> I can make a clean fork in github and patch something up - but figured
>>> I'd ask about the preferred way to do it first so that I can make it
>>> as clean to apply as possible.
>>>
>>> would something like <useSpark>true</useSpark> and
>>> <useHalo>false</useHalo> added to the config be the approach to take?
>>>
>>> Right now the way FM4 is, it will ADD halo and spark no matter what
>>> your dependencies are - so controlling which theme you are using is
>>> impossible through the dependencies.
>>>
>>> What do you think the cleanest way to make it possible to use just
>>> spark or just halo but still allow people to use both if they want
>>> would be? I think that the current implementation where the user
>>> doesn't have to use a big long copy-dependencies to get the theme
>>> files in place and then include them manually is a good move - but its
>>> important to let the user disable spark.
>>>
>>> Adding a property like <useSpark> that defaults to true and <useHalo>
>>> that defaults to true would be pretty easy - but I'm not sure if you
>>> are wanting to add in more properties to the config at this point for
>>> FM4 or not.
>>>
>>> Ryan
>>>
>>> On Wed, Nov 17, 2010 at 11:37 AM, Ryan Gardner <[email protected]>
wrote:
>>> > I don't want to use the halo theme in my project, but it seems that
>>> > after the recent change to allow using both halo and spark it now
>>> > ALWAYS includes halo.swc in the list of themes passed to the compiler
>>> >
>>> > Is this intended to match some default adobe compiler setting? I don't
>>> > mind having the option to use halo and spark, but it seems that they
>>> > are both always included regardless of what theme dependencies you
>>> > have on the project.
>>> >
>>> > Ryan
>>> >
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Flex Mojos" group.
>>> To post to this group, send email to [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]<flex-mojos%[email protected]>
>>> For more options, visit this group at
>>> http://groups.google.com/group/flex-mojos
>>>
>>> http://flexmojos.sonatype.org/
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Flex Mojos" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]<flex-mojos%[email protected]>
>> For more options, visit this group at
>> http://groups.google.com/group/flex-mojos
>>
>> http://flexmojos.sonatype.org/
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Flex Mojos" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<flex-mojos%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/flex-mojos
>
> http://flexmojos.sonatype.org/

-- 
You received this message because you are subscribed to the Google
Groups "Flex Mojos" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex-mojos

http://flexmojos.sonatype.org/

Reply via email to