Closed nacho87 closed 7 years ago
Please fill this information.
https://github.com/moxie-lean/ng-patternlab/pull/70#issue-158267701
Do we need a component / directive for this? Can't it just be defined with HTML / CSS, like a <h1>
?
Also I think this is an atom, not a molecule
@adamf321
Atoms should be simple html tags. This is a composition of atoms because it has a link and an image. That's why we used a molecule...
It looks good to me @andybar2 let me know if you have any comments for the @adamf321 questions / concerns otherwise we can move forward.
Yes, but it's just one visual element on the page. I guess it comes down to how we define an "atom".
To my other point - could we just give the example of how to put in on the page using html / css only? I'm thinking that for simple elements (all atoms and some molecules) we could do this to cut down the amount of work the browser has to do when rendering.
What do you mean by:
we could do this to cut down the amount of work the browser has to do when rendering.
On Jun 3, 2016, at 9:40 AM, Adam Fenton notifications@github.com wrote:
To my other point - could we just give the example of how to put in on the page using html / css only? I'm thinking that for simple elements (all atoms and some molecules) we could do this to cut down the amount of work the browser has to do when rendering.
If you use <ln-m-logo href="..." ...></ln-m-logo>
the browser has to run JS on this to convert it into the template before rendering it (sorry, "rendering" perhaps wasn't the right word).
However if you write <a href="..." class="ln-m-logo"><img src="..."></a>
the browser skips the JS step, so it's more efficient.
I really don't think that this introduces a significant overhead @adamf321 , and mostly considering that we use directives for everything... Having it as a component gives us the possibility to change in only one place if we want to add something to the template in the future (i.e. a tooltip).
Yes I think so this is just a minor optimisation that is not really required at this point.
In this case, sure. But we could have loads of them. But fine, we can leave it.
I still think this is an atom though... not a molecule.
Add new molecule to patterns
Can use molecule logo