►
From YouTube: Migrate component examples to CSF
Description
A walkthrough of converting Storybook examples to the CSF format in support of https://gitlab.com/groups/gitlab-org/-/epics/5651.
B
B
It
sounds
fine
yeah.
A
B
I
think
the
idea
is
to
migrate
all
of
them
to
two
stories
and
have
no
novel
examples
and
or
drop
some
examples
if
they
do
not
make
sense,
we'll
start
and
then
we'll
see.
Basically.
A
If
it
helps,
we
can
always
switch
to
like
an
example
like
pop
over
or
something
that
has
that
that,
as
far
as
I
could
tell
it
doesn't
have
stories,
but
it
does
have
several.
It
has
like
three
examples,
so
that
could
be.
B
It's
I'm
not
sure
we'll
we'll
do
it
we'll.
We
can
do
them
all
through
this
session,
because
I
don't
think
we
will
have
enough
enough
time.
B
B
I
think
popular
won't
be
interesting
because
it
doesn't
have
enough
customization
properties,
I'll
show
you,
for
example.
I
recently
migrated
the
date
range
figure
and.
B
So
that
range
speaker
has
a
lot
of
properties
that
could
be
custom
customized
and
we
can
make
them
control
so
that
user
you
can
set.
I
don't
know,
for
instance,
in
seats
in
the
selection
and
the
date
picker
will
will
allow
the
same
date,
selection
or,
if
you
set
it
false,
it
won't
allow
the
same
date.
Selection
as
this
is
as
you
see
here
so
the
popover
has
doesn't
have
many
customization
properties.
It
wouldn't
be
interesting,
as
as
an
example,
I
think,
let's
try
do
doing
top
doing
the
tops.
B
Okay,
okay,
okay,
so
also.
B
A
I
can
I
can
send
it
to
you
in
slack
too.
B
The
steps
how
to
migrate
the
stories
and
what
we
usually
do.
We
follow
these
steps
and
then
customize
some
some
some
some
of
these
things.
B
B
And
this
the
bottom
part
just
it
just
goes
the
way.
I
think
I'm
not
sure,
let's
see
so
here
we
have
the
top
toys
and.
B
So
here's
the
example
of
how
the
previous
story
format
is
converted
to
the
current
story,
to
the
current
story,
format
and
we'll
try
like
to
to
do
this.
We
want
to
remove
the
this
part,
just
will
comment
it
and
so
that
we
can
reference
some
of
those
just
solutions.
Why
we,
why
we
called
so
what
I
usually
do.
I
just
copy
this
part,
certainly
with
all
the
comments
and.
B
That's
well
that's
the
older
older
formats
that,
like
that
existed
previously,
and
here
here
it's
described
by
exactly
we-
we
are
doing
this
migration
and
I
think
there
is.
The
main
reason
is
that
the
csf
gives
us
some
out
of
the
box
features
that
we
currently
implement
over
ourselves.
A
B
Okay,
it's
actually
difficult.
If
we
have
function.
First
of
all,
we
have
to
define
the
basic
tabs.
The.
C
B
Reference
quickly,
yeah,
so
the
basic
tops
template
would
look
something
like
I
don't
know.
The
jail
tops
and
a
couple
of
I
don't
know
a
couple
of
child
thumps
right.
B
So
we
added
here:
okay:
here
we
have
the
basic
tops,
template
and
okay,
it
imported,
for
we
have
already
the
components,
imported
jail,
tops
and
gel.
But
here,
as
we
are
creating
the
new
component,
we
have
to
register
those
like.
We
have
to
register
those
components
here
in
this
components:
okay,
object,
gel
thoughts
and
and
it's
the
basic
case
will
come
to
more
difficult
cases
later,
so
we
registered
the
tabs
and
we
have
a
basic
template
and
we
don't
need
this
for
now.
B
B
Hey
basically
so
so
far
we
have.
We
have
the
default
like
basic
story
that
we
do
not
allow
user
to
customize
yet,
but
the
storybook
most
likely
will
pick
up
automatically
will
create
some
controls
for
it.
So
let
me
just
comment
all
the
rest
and.
B
B
B
B
B
B
B
The
information
about
all
the
stories
settings,
and
so
this,
like
this
part,
we
described
the
our
first,
but
this
is
related
to
all
the
stories.
This
configuration
will
be
related
to
all
the
stories,
so
we
needed
this.
B
Even
so,
we
have
only
one
one
story
so
far:
okay,
because
here
we
have
some
errors
that
will
come
back.
We
are
coming.
B
Yes,
not
not
yet
and
yeah
we,
yet
we
don't
have
some
examples,
okay,
never
mind.
We
have
with
the
tops
and,
as
you
can
see
previously,
we
okay,
we
can
open
the
here's,
the
gitlab
ui,
the
production
example
you
see
it
doesn't
have
any
any
controls.
A
B
B
A
B
The
whole
screen-
and
here
we
could
control
the
tops
with
this
justified.
B
But
as
you
can
see
here,
it
doesn't
like
it
doesn't
actually
work.
So
the
storybook
picked
this
property
from
the
component
implementation
from
the
company.
The
component
description
that
is
like
here.
So
here's
the
implementation
of
the
top
view,
and
here
is
the
justified
property,
and
it
knows
that.
A
B
Boolean,
so
that
is
why
it
makes
it
like
nice
toggle.
So
we
had
nothing
to
do
like
too
much
to
make
it
available.
It
just
made
it
made
it
for
us,
but
here
we
have
our
stories,
and
here
we
have
the
template
and
so
that
our
component
knows
about
the
justified
about
this
justified
property.
We
not.
We
need
to
provide
it
for
freight,
so
we
just
say
justified,
and
we
say
that
it
is.
B
It
will
have
the
value
okay
I'll
copy,
so
that
not
too
much
like
the
value
of
justified
and
where
this
value
is
coming
from
here
is
the
function
generate
props,
which
we
will
use
to
provide
different
sets
of
the
properties
to
each
to
each
story.
Okay,
so,
but
we
also
have
the
see
what
was
the
okay
justified?
B
Okay,
I'll
copy
it
I'll,
just
mistype?
If
I
do
it
quickly
justify
it,
and
I
don't
know
we
made
it
default
value,
for
instance
2,
and
we
return
it
here,
I'm
not
sure
how
familiar
you
are
with
the
javascript,
but
it's
just
like
function
in
a
javascript
that
accepts
the
object
and
it
does
it.
It's
the
structuring
and
the
translator,
whatever
it
wants
to
it.
It
may
look
like
tricky,
but
it
is
not
actually
so.
C
B
Say
that
here,
when
generate
property
will
be
called,
it
will
have.
The
justified
set
is
true
and
we
can
check
it
whether
the
default
behavior
is.
B
Yes,
and
as
you
see
here,
there
is
also
these
url
parameters
that
is
updated.
Okay,
let's
try.
Switching
it
also
see
the
tops
are
changing,
so
it's
true
false,
true
and
false,
and
well
that's
that's
great,
and
actually
also
great
that
you
could
share
the
I
don't
know
you
could
share
it
with
someone
the
state
of
the
component,
so,
for
example,.
C
B
B
Possibilities
we
could
provide
for
the
same
property,
so
our
sims
could
be
indigo,
blue,
green,
red.
Okay,
let's
make
the
default
seam
as
in
I
don't
know.
Okay,
let's
make
it
blue,
so
it's
visible
because
it
is
I'm
not
sure.
No,
it's
not
already
indigo.
It's
something
different.
I
know
it's,
it
is
in
degreasing,
so
let's
make
it
blue
so
that
just
it
is
we'll
make
it
right
then,
but
just
first
for
the
sake
of
the.
A
B
A
B
A
B
So
we
say
here
is
archetypes
and
our
archetype
is
seen
it's
the
name
of
the
property.
Actually,
so
we
say
it's
same
and
says
that
customize
its
control
and
it
says
that
it
has
the
type
select
and,
like
so
far
for
me
it
was
the
it
it
can
be.
Also
a
color
speaker,
I
think
they'd
figure,
some
some
those
type
of
controls,
for
instance,
if
I
remember
correctly,
okay,
I
want
to
move
this.
B
C
B
A
B
Yeah,
it
is
in
the
constants,
and
it
is
here
you
see,
it
is.
B
Validating
that
our
value
has
to
be
one
of
the
keys
in
the
color
seams
object,
so
we
need
to
like
we
need
pretty
one
of
the
keys
or
gel
dark,
so
we
will
do
we'll
set
those
values,
so
it
should
be
more
things
options
and
it
is.
A
B
B
Okay,
that's
okay!
That's
about
the
javascript!
So
here
you
see
it
gets
the
arguments
and
sets
all
the
props
on
the
component
to
the
object
keys
of
those
arguments,
and
here
we
say
that
the
assigned
to
the
arks,
whatever
this
generate
probes
return,
and
this
generate
probes
returns
this
this
object
and
it
destructures
it
here
and
here
is
the
default
value.
So
same
default
is
blue.
If
we
change
it
to
indigo,
we
make
it.
B
B
B
B
Which
has,
for
instance,
I
don't
know
red
color
by
by
default,
you
would
create
another
story.
So
what
you
do.
B
And
then
to
generate
props,
you
provide
the
object,
will
be
destructed,
just
destruction
here.
So
now
justified
just
say
true,
and
here
we
may,
what
does
it
seem?
B
B
So
here
you
see,
we
have
the
default
default
story
and
we
can
write
red,
justify
thoughts
and
say
my
credit
and
with
those
generate
props,
you
can
generate
like
different
different
combinations
of
stories.
If
you
want
to
make
a
separate
story
of
it,
but
they
usually
don't
make
them
like
separate
stories
because
actually
red
justified
tops
can
be
covered
by
the
default
story.
Just
just
changing.
A
C
B
In
the
controls,
so
that
is
what
kind
of
powerful
I
would
think
it
in
this
new
story
format,
because
maybe
thomas
is
I'm
not
sure
if
the
tops
is
a
good
example
here,
but
for
instance,
yeah
here
see
we
have
justify
tops
and
we
for
sure
can
remove
this
example,
because
we
can
like
we
can.
A
B
A
B
Invalid
probe
type
check
through
for
from
justified,
expected,
boolean
got
string
with
value
true,
and
why
is
it
yeah?
It's
I
just
made
a
mistake.
You
see
it's,
it
is
a
string,
but
it
needs
to
be
a
boolean.
It's
javascript
and.
A
A
B
Yeah,
let's,
let's
see
do
we
have
the
example.
Let's
say
tips,
yeah.
A
B
Yeah
yeah,
for
example:
let's
see
how
we
can
do
it.
B
C
B
Okay,
it
won't
be
formatted
because
it's
a
string
okay,
so
we
use
the
gel
badge
in
the
default
template.
So
we
certainly
need
to
register
it
in
the
in
the
component
definition
because
it
will
be
used
in
the
template
and
we
get
it.
I'm
just
going
to
change
the
query
yeah.
We.
A
B
Not
there,
sorry,
how
do
we
set
the
bench
in
the
you
probably
have
to
provide
it
here?
Is
the
slot?
B
B
B
B
B
You
don't
care
about
this,
I
mean
we
could
provide
that
we
don't
need
to
and
it
uses
the
same
template.
Okay,
let
me
sing
parameters
and
I'll
check
it
from
the
inspector.
I
remember
doing
it.
B
Okay,
let
me
try
something
and
I'll
explain
explain
later.
If
it
is
that
works,
so
my
idea
is,
we
could
make
it
render
conditionally.
B
B
So
we'll
render
a
badge
only
if
the
has
batch
property
on
the
component
instance
is
true.
Here
we
have
the,
I
don't
know
data,
and
this
is
like
view
component
definition.
That
is
this.
This
data
and
data
requires
some
object
and
yeah
well
how
we
named
it.
Here's
a
bridge.
B
So
here
we
provide
some
arguments
which
become
properties,
but
you
could
also
provide
to
the
template
one
more
parameter.
For
instance,
I
don't
know
we'll
call
it
render
batch,
for
instance,.
B
And
we'll
set
it
on
the
component
instance
and
then
the
value
of
this
provider
parameter
will
be
set
on
the
has
batch
and
will
reflect
once
a
gel
batch
is
rendered
or
not,
but
I
will
have
to
validate
whether
it
works
and
objects
and
we
make
the
default
value
for
it
false.
So
the
badge
is
not
rendered.
A
A
Oh,
I
saw
that
I
saw
the
story,
for
it
show
up
on
the
left
and
then
I
have
for
it.
B
No,
not
really,
this
is
you
know
some
artificial
variable.
We
create.
B
Yeah,
it's
not
the
control
controls
only
can
can
be
defined
for
for
the
properties
that
are
described
in
the
actual
component.
B
Necessarily
I
mean
it
could
be
a
property,
but
then,
for
instance,
you
could
provide
property
here
as
it
has
batch,
but
then
what
kind
of
batch
it
has
right.
So
if
you
provide
the
three
as
the
the
slot,
so
user
has
the
control
what
kind
of
badge
he
wants
to
he
wants
to
render
like
small
badge.
What's
the
class
thread
to
the
badge?
B
What's
the
content,
if
we,
if
we
wanted
only
one
type
of
badge,
then
we
could
yeah
definitely
customize
it:
here's
the
property,
but
okay,
okay,
okay,
let
me
figure
out
this
example,
because
okay,
here's
badge.
B
B
Here,
actually
it
we
can
certainly
do
it,
maybe
yeah.
I
I
see
how
he's
doing
it.
It
redefines
the
redefines
the
template,
so
we're
not
using
this
like
default,
template
we're
using
a
different
template
and.
A
B
B
Here
we
can
do
this
last
one
and
let
us
see.
B
B
B
We'll
have
today
to
delete
this
old
examples
from
the
we'll
have
to
delete
this
file
this
documentation
and
to
remove
all
the
examples,
so
that
new
example
is
displayed.
B
But
the
idea
is
that
if
we
write
some
fancy
photo,
which
I
tried
to
do
this,
we
by
eve
has
batched
with
some
custom
logic.
It
won't
help
the
user
because,
most
likely,
if
the
user
wants
the
the
template
with
the
badge,
he
doesn't
want
to
have
any
conditions
right.
He
just
wants
to
go
to
copy
it
and
make
it
very
straightforward.
So
that
is
why
it's
good
to
have
a
separate
example,
separate
template,
which
is
very
linear
and
straightforward
without
any
like
extra
conditions.
B
B
B
A
A
B
Just
following
the
steps,
no,
you
know
no
creative
work
and
maintains
arrays.
Are
that
you?
That
story
does
a
lot
by
default,
that
you
redefine
controls
to
make
it
more
convenient
for
the
user
and
move
to
the
examples
whatever
cannot
be
defined
here,
but
whatever
behavior
cannot
be
implemented
with
the
controls.
B
Yeah,
sorry,
I
I
did.
I
had
to
figure
out
some
stuff
by
by
the
way,
so
it.
B
A
B
Because
this
is
it
because
we
are
running
out
of
time.
Thank
you
for
organizing
it
and
do
not
hesitate
to
ask
any
questions.