►
From YouTube: Magento Layout Loader - Early Preview
Description
This is a very early preview (first implementation) of Magento PWA Studio's "layout-loader." This tooling enables extension authors to augment the UI, similar to how Layout XML works in Magento 2.
Please note that this is still in active development, and is missing many pieces of functionality that would be necessary for a real-world application.
Feedback can be provided in the pwa-buildpack repository: https://github.com/magento-research/pwa-buildpack
A
Hey
Magento
community,
my
name
is
Andrew
Irvine
and
I'm,
a
front-end
architect,
Oh
Magento's,
PWA
studio
project.
I'm
excited
to
give
you
a
brief
run-through
of
our
first
implementation
of
the
layout
modification
mechanism
in
Magento's
PWA
studio.
This
is
functionality
that
will
be
used
within
PWA
studio
to
supplant
the
common
layout
XML
operations
in
Magento
to
the
target
audience
for
this,
tooling
is
anyone
who
will
be
authoring
extensions
for
PWA
studio
applications
when
watching
this
content,
I
encourage
you
to
keep
in
mind
that
this
is
the
first
implementation.
A
This
means
that
will
gladly
accept
feedback
and
we're
happy
to
hear
what
else
we
can
do
to
accommodate
all
your
use.
Cases
at
the
end
of
the
video
I'll
go
over
the
best
ways
for
you
to
provide
feedback
to
us
before
we
dive
into
any
implementation
details,
let's
walk
through
a
quick
demo
to
help
provide
some
context.
A
Here
is
a
very
simple
react:
application
that
renders
one
component
named
my
cool
component
in
a
react
application
and
consequently,
in
a
PW,
a
studio
application.
The
UI
is
driven
by
a
component
oriented
architecture,
has
an
extension
developer
to
influence
content
rendered
to
the
UI
you'll,
find
it
necessary
to
augment
the
component
tree.
Let's
rebuild
this
small
application,
but
this
time
we'll
run
it
with
the
magenta
layout.
Loader
enabled.
A
If
we
inspect
the
wrapper
for
my
cool
extension
in
reacts,
dev
tools,
we
can
see
useful
information
that
our
tooling
is
added
to
inform
you
of
the
reason
that
this
extension
was
injected
into
the
UI.
Now,
let's
backtrack
can
go
over
some
of
the
basic
concepts.
You'll
need
familiarize
yourself
with
to
write
your
own
basic
extension.
A
The
Magento
layout
loader
has
two
distinct
phases.
The
first
phase,
the
authoring
phase,
is
where
a
theme
developer
will
annotate,
which
parts
of
the
UI
should
be
available
to
extensions
for
modification.
This
is
done
using
what
we
call
a
container
component
and
a
container
child
component.
A
container
is
similar
to
the
concept
of
a
container
in
Magento
2.
Today,
a
container
child
is
similar
to
a
structural
block.
The
second
phase,
the
compile
phase,
is
where
the
PWA
studio
tooling,
collects.
A
All
the
layout
operations
registered
by
extensions
resolves
any
possible
conflicts
between
them
and
then
applies
them
to
the
UI.
This
is
done
during
compilation
rather
than
at
runtime,
to
prevent
your
store
from
needing
to
over
ship
code
to
a
Shoppers
browser
when
authoring
an
extension,
a
developer
will
be
able
to
use
a
predefined
set
of
operations
that
allows
them
to
add
content
to
the
UI
relative
to
other
content
or
remove
content
entirely
from
the
UI.
This
will
be
much
easier
to
explain
by
building
a
small
extension,
so
let's
jump
right
into
it.
A
A
A
A
Before
I,
let
you
go
I'd
like
to
call
out
one
more
thing:
we've
been
focused
on
with
our
tooling
debug
ability.
We've
received
plenty
of
feedback
about
the
cost
of
extension
development,
and
one
of
our
primary
focuses
has
been
to
make
development
in
PWA
studio,
more
predictable
and
intuitive,
but
also
easy
to
debug.
When
things
go
wrong
to
highlight
this,
let's
modify
our
extension
and
cause
it
to
misbehave
a
bit.
A
If
we
open
that
up
we'll
see
exactly
which
component
was
injected,
why
it
was
injected
and
it
gives
us
an
opportunity
to
go
and
debug
that
further
and
that's
it
for
now,
if
you'd
like
to
provide
input
on
this
feature
or
track
its
progress,
please
visit
the
PWA
buildpack
repository
within
the
Magento
research
organization
on
github.
There's
plenty
more
work
to
be
done,
so
don't
be
surprised
if
the
API
you've
seen
in
this
video
continues
to
change
as
we
dog
food
it
within
our
reference
team.
Thanks
for
watching.