Hi,

very interesting discussion

@Alex : My first reaction is that Basic is basic and works in pixels and
that adding other units can happen in other component sets and beads.

Although Basic is just Basic, people using it could want to switch from PX
to EM at sometime. I think it should not be good to force PX in any part of
Royale

One thing is clear: we should not have "px" hardcoded in UIBase, so the
const proposal seems ok to me to fix it at UIBase level. If that is ok for
all we should do it.

In the other hand, about using "sizeToContent", I only remember to deal
with that method in one Jewel component, so don't know if that is used
"internally" in more parts (without the need for me to deal with it in the
component) or if I need to do something for each component. But as well
that seems to me like a theory, and maybe you should check if that is
working as you think, for for that you first need to be able to switch from
PX to EM right?

I think Jewel could be configured to "em" out-of-the-box, since seems for
me more "font oriented", and applications are, from my point of view more
text oriented, since we are showing list of textual item, buttons with
labels, labels (texts) and more...

@Mark, maybe you could do a PR with your proposal in a form of a function
class so we can use in the same way we use for example "
org.apache.royale.html.util.addElementToWrapper"

Thanks



El mar., 15 ene. 2019 a las 1:29, Alex Harui (<aha...@adobe.com.invalid>)
escribió:

> Yes, that might be possible as well.  We don't really have to pick one
> strategy.  Different component sets can have different strategies.  We
> could have an "all em" set if we wanted.  It would be nice to share code in
> UIBase, but not a requirement.  Hopefully, IUIBase doesn't really presume
> pixels (although it still wants width/height to be a Number), and hopefully
> we don't have lots of expectations on UIBase instead of IUIBase.
>
> Another way to think about Royale is that our components (really the
> beads) spit little bits of JS, CSS, and HTMLElements into the browser.  So,
> for any website you could build without Royale, you should be able to
> fashion Royale components that automate and encapsulate the building of
> that site and similar sites.  So whatever pattern needs to be added to the
> final JS/CSS/HTML, we should be able to encapsulate anything that isn't a
> one-off and provide parameters to tweak the pattern.
>
> My 2 cents,
> -Alex
>
> On 1/14/19, 12:26 PM, "Mark Kessler" <kesslerconsult...@gmail.com> wrote:
>
>     As a comment on the helper functions, we could also just have
>     something that does on the fly conversion.  In other words if I say
>     300 pixels, I want it to translate that into EM / other unit in the
>     background. The reason I bring that up is to allow exact PX still be
>     used for the Flex / Air side and converted for the js/css side.
>
>     pixelTotal / fontSize = em
>
>     300 / 14 = 21.429 (rounded)
>
>     Soo 300px for flex and 21.429 for JS side.
>
>     -Mark K
>
>
>

-- 

<http://www.codeoscopic.com>

Carlos Rovira

Presidente Ejecutivo

M: +34 607 22 60 05

http://www.codeoscopic.com


Conócenos en 1 minuto! <https://avant2.es/#video>


AVISO LEGAL: La información contenida en este correo electrónico, y en su
caso en los documentos adjuntos, es información privilegiada para uso
exclusivo de la persona y/o personas a las que va dirigido. No está
permitido el acceso a este mensaje a cualquier otra persona distinta a los
indicados. Si Usted no es uno de los destinatarios, cualquier duplicación,
reproducción, distribución, así como cualquier uso de la información
contenida en él o cualquiera otra acción u omisión tomada en relación con
el mismo, está prohibida y puede ser ilegal. En dicho caso, por favor,
notifíquelo al remitente y proceda a la eliminación de este correo
electrónico, así como de sus adjuntos si los hubiere. En cumplimiento de la
legislación española vigente en materia de protección de datos de carácter
personal y del RGPD 679/2016 le informamos que sus datos están siendo
objeto de tratamiento por parte de CODEOSCOPIC S.A. con CIFA85677342, con
la finalidad del mantenimiento y gestión de relaciones comerciales y
administrativas. La base jurídica del tratamiento es el interés legítimo de
la empresa. No se prevén cesiones de sus datos, salvo que exista una
obligación legal. Para ejercitar sus derechos puede dirigirse a CODEOSCOPIC
S.A., domiciliada enPaseo de la Habana, 9-11, 28036 de Madrid (MADRID), o
bien por email a...@codeoscopic.com, con el fin de ejercer sus derechos de
acceso, rectificación, supresión (derecho al olvido), limitación de
tratamiento, portabilidad de los datos, oposición, y a no ser objeto de
decisiones automatizadas, indicando como Asunto: “Derechos Ley Protección
de Datos”, y adjuntando fotocopia de su DNI. Delegado de protección de
datos:d...@codeoscopic.com

Reply via email to