royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com.INVALID>
Subject Re: Proper use of Themes and SASS
Date Fri, 16 Mar 2018 18:44:03 GMT
Hi Carlos,

I think your understanding of the technical part is correct except for one
thing:  Unless I'm forgetting something, you should be able to swap view
beads without touching the application code.  The view bead works with
some CSS to create the visuals.  Unless the visuals are vastly different,
replacement should "just work".  IOW, the user of a Button probably has no
code that is sensitive to whether the Button is actually:

<div>
  <label class="royale_button_label">
  <input class="royale_button_input">
</div>

Or:

<div>
  <label class="bootstrap_button_label">
  <input class="bootstrap_button_input">
</div>

They shouldn't care, because the SWF version is going to have a completely
different View.  The only thing the user cares about is whether it looks
good and dispatches a click event.


However, that does not mean that you should try to use Bootstrap for our
default theme because as I was trying to point out in my prior post, I
don't think Bootstrap has a default look for Panel, DataGrid and more.

If you want to try to emulate Bootstrap on the HTML structures you choose
for Jewel, that's fine, but I would think a reason not to do that would be
"expectations".  I think there are many Bootstrap themes and it will be
too much work and result in disappointment if we say we support Bootstrap
but can't support third-party Bootstrap themes without doing the work to
emulate those too.  IMO, the better strategy is to swap our HTML
structures for Bootstrap's HTML structures so their CSS can be used as-is
and then the additional work for third-party theme developers is to decide
on the CSS for our components like Panel and DataGrid.  And that way,
folks who don't use Panel and DataGrid can just use an existing Bootstrap
theme and it should just work in Royale.

But all that is future stuff, IMO.  Let's make sure we can get a default
theme in place for the components we have.

My 2 cents,
-Alex

On 3/16/18, 11:27 AM, "carlos.rovira@gmail.com on behalf of Carlos Rovira"
<carlos.rovira@gmail.com on behalf of carlosrovira@apache.org> wrote:

>Hi Alex,
>
>I think you didn't understand me. My main goal is create a new UI set
>(Jewel) that can be easily stylizable using themes
>So people can code an App and change only a theme swc to change all
>styles.
>For that reason I always said that MDL library was very limited, since it
>was "only MDL".
>
>In this thread, I pointed to make different themes for Jewel (based in the
>structure of HTML and style name or class names I will create for Jewel).
>That implies that we will have our own style ( no mdl , no bootstrap,...),
>but that we can as well "emulate" the styles in other well-known libraries
>out there like bootstrap, semantic and, again, MDL. But for all of this,
>my
>plan is do it with the same html/styles that Jewel will enforce. So the
>key
>for this is emulation, an MDL button in Jewel will look mostly like a real
>MDL button, but will not be a real one, since the classes used will be
>"jewel button" and not "mdl-button" (like in the real lib). This implies,
>out components will always work consistently since will be the same royale
>component with different faces (css styles).
>
>Then, you open my mind to ViewBeads, so we can make a jewel button have
>different view beads, each one in its own library, so in this way we can
>match the same html structure and styles in native libraries. I love this
>idea, but then thinking about it I found some problems due to different
>"particularities" in each library.
>
>In Jewel we will end with a set of well defined properties to make the set
>easy to use. If we want to go the view bead, the only way I could think to
>get all the particularities of a concrete library is through beads, and
>that beads should be as some kind of interface or something, but in the
>end
>this will make people to change the app code and that's what I want to
>avoid.
>
>So I think this only let us with two options:
>
>1) Jewel set with themes that can emulate other styles out there, a part
>of
>our new styles
>2) Go the same path as we did with MDL to create Bootstrap, Semantic, and
>more.
>
>For me the path is 1), if I'm not missing something in my approach, since
>we should get our own presence a part from the rest, but as well I think
>emulate others, can be of great attractive to users, that only changing a
>theme can look very similar to mdl, semantic, or bootstrap.
>
>
>
>
>
>2018-03-16 17:38 GMT+01:00 Alex Harui <aharui@adobe.com.invalid>:
>
>> Hi Carlos,
>>
>> I'm not sure I'm fully understanding you.
>>
>> If your question is about how to create a default look for Royale, I
>>would
>> not worry about Bootstrap and MDL.  Create the HTML structures you need
>> with the attributes you need and create the CSS that makes it look good.
>>
>> My point about Bootstrap is that if someday someone wants to support
>> Bootstrap in Royale, the way to do it is to create other views that
>>create
>> exactly the HTML structure expected by Bootstrap because then you can
>>use
>> any Bootstrap theme as-is.  Same for MDL, or any other CSS-based
>>framework.
>>
>> I don't think we can make one view for Button that works with Bootstrap
>> and MDL.  It would be nice if we could, but I think you are pointing out
>> that there are attributes in the HTML structure that are different for
>> each framework.
>>
>> I think Bootstrap and MDL do not have the same kinds of components that
>>we
>> have in Royale (like Panel and DataGrid) so existing themes will still
>> need enhancing to work for Royale components.  But the initial goal if
>>we
>> ever do try to support Bootstrap is just to create Royale components for
>> the components Bootstrap does support and if you can create your app
>>with
>> only those Bootstrap components, then any Bootstrap theme should "just
>> work" with it.
>>
>> My 2 cents.  Hopefully I am agreeing with you.
>> -Alex
>>
>
>
>-- 
>Carlos Rovira
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2
>Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C9f850f495faa4e34416208d5
>8b6baafb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636568216910167925&s
>data=PT1yI4VrmxsbkO55zy6XRqzU%2BFA6tYJzkIay7WQjkAw%3D&reserved=0

Mime
View raw message