►
Description
In this session we replace a usage of `deprecated_modal_2.vue` with our `@gitlab/ui` modal.
Resulting MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/51227
A
Yeah,
okay,
ip
is
getting
rid
of
deprecated
modals,
but
you
thought
deprecated
models
were
bad
enough.
Wait
till
you
meet
deprecated
modal
2.
yeah,
I
I
differed
deprecated
modal
and
deprecated
modal
2.
and
it
looks
like
there's
significant
difference
between
the
two.
B
So
deprecated
motor,
by
the
way,
I
think,
was
just
like
a
simple
bootstrap
modal
style
and
it
didn't
as
as
far
as
I
recall,
maybe
while
gdk
starts,
we
can
look
at
them
both
just
to
have
some
history.
I
think
it's
yeah,
if
it
basically
is
just
the
modal
syntax
without
any
of
the
hey
show.
This
thing
not
show
this
thing:
jake
very
kind
of
thing,
yeah.
C
B
This
would
be
a
thing
that
you
probably
just
use
with
wii:
u
vf
right!
Well,
the
other
one
is
a
wrapper
around.
B
Maybe
you
could
also
with
vf
and
data
toggle
mode,
probably
yeah,
but
the
other
was
you
know
trying
to
hey.
You
already
have
higher.
You
have
events
right,
oh
listening
to
the
jquery
events,
so
yeah
the
one
is
a
little
bit
less
jquery
and
the
other
is,
but
I
mean
it
shouldn't
really
matter
because
we're
just
going
to
get
rid
of
it.
Okay,.
B
On
jdk,
because
if
you
like
it,
it
also
breaks
just
for
me
on
dot
com.
I
clear
my
local.
B
B
B
Yeah,
so
I
think
and
and
the
action
is
a
bit
weird
though,
like
yeah,
it's
a
white.
Why
is
this
yellow?
I
don't
know,
maybe
because
this
action
cannot
be
reversed.
Okay,
promote
model,
so
we
saw
the
model
we
saw.
The
we
saw
the
model
we
saw
where
it's
used,
it's
mounted
in
something,
and
we
have
a
button
here
right
so-
and
this
is
the
interesting
thing,
because
the
button.
B
Okay,
so
if
it's
a
project,
master
yeah
and
you're
in
a
group,
yeah
makes
sense,
so
we
have
a
js
promote.
Why
is
this
called
js
promote
project
milestone
button
like.
E
A
B
B
A
Oh
miles,
oh,
is
this
like
if
you
click
on?
Oh,
that
might
be
if
you
click
on
a
milestone,
no.
B
A
B
A
A
Oh
yes,
you
know
what
I'm
saying
I
think
so
I
think
it's
a
good
thing
like
for
us.
I
think
we
could
just.
I
think
we
can
just
get
rid
of
the
modal.
It's
possible.
B
B
B
B
B
B
I,
to
be
honest,
like
I,
would
still
be
on
the
front
of
using
it
with
dealing.
B
B
Really
annoying
okay.
Now
I
understand
why
the
motor
is
different,
because
the
model
has
it's
just
one
model,
but
we
mount
like
multiple
buttons
that
do
this
right.
B
B
Like
just
like,
probably
on.
B
C
B
A
B
A
A
And
then
we
probably
want
to
define
this
a
bit
earlier,
yeah
and-
and
I
think
like,
if,
if
we
don't
even
have,
if
we're
not
even
able
to
mount
this
thing,
then
we
shouldn't
even
set
up
any
of
the
buttons
either
like.
So
if
we
can't
find
this,
we
don't
do
it.
We
should
just
return
early
if
we
can't
find
the
element.
A
A
A
B
E
A
The
component
down
yeah,
move
the
component
down
and
and
do
a
const
after
the.
If
just
the
the.
B
Only
question
is
like
because
we
have
like
these
event
headless
here
before,
like
with
this.
This
is
very
interesting.
None
how
we
usually
do
things
right
way
right.
B
B
Saying
that
now
with
the
ref
are
props,
so
how
would
we
now
so.
A
B
Wait,
you
mean
here
like
on
promote
button
click.
We
are
now
doing
promote
component
dot,
ref.
A
C
You're
going
to
call
the
component
method
externally,
not
from
the
component
yeah.
This
is
not
good,
it's
not
good.
It's
not
good
exposed.
I
mean
we
can
call
our
model
show
method
if
it
has
one.
I
believe
it
has
one
with
fire
wraps,
but
I
mean
honestly,
it
looks
like
I
would
burn
it
down
completely
and
right
from
scratch,
because
it's
like
it's
crazy
event
hub
in
such
a
weird
way.
This.
A
B
So
we
have
our
event
listeners
now
right.
You
know
what
what
my
fear
is
that
they
probably
used
it
for
testing
somehow,
if.
A
I
think
when
we
returned
early,
we
want
to
now
say
return
null.
B
Cool
okay
button,
so
this
is
just
the
buttons
so
once
request.
B
Finishes:
okay,
so
the
thing
that
this
does
is
just
like:
if
the
request
starts,
it
disables,
the
other
buttons,
no.
A
B
Oh
and
it's
using
the
data
url
stuff,
so
it's
basically
clicking
the
button
and
then,
instead
of
using
axios,
it
uses
the
rails,
ujs
kind
of
thing
right.
So
if
we're
going
back
and
looking
at
the
buttons,
those
buttons
are
actually
probably
like,
probably
also
have
like
a
data
method
or
something.
B
A
B
A
I
would
even
since
promote
milestone
models,
not
used
anywhere
else.
I
would
even
you
know,
rather
than
doing
all
of
our
logic
and
the
page
net
thing.
Let's,
let's
do
it
in
this
component,
the
bit
where
we're
looking
and
we're
adding
listeners
to
dom
and
stuff
what
you
know
isn't
isn't
great
view
proper,
but
but.
D
Do
we
need
to
let
these
listeners
at
the
end
of
the
day,
question
mark
like
are
all
of
them
really
needed,
or
can
we
rework
the
architecture
a
little
bit?
You
mean,
like
the
listeners
here,
all
these
event
up
things
that
we
are
doing
right.
We
are
setting
the
props
of
the
model
itself
can't
we
do
that
with
normal
view.
Pro
passing,
for
example,.
D
F
D
A
D
A
A
D
A
That's
that's.
The
issue
here
is
like
event.
Hub
is
completely
not
necessary
here
we
really
should
just
do
you
know
where
we
quarry
for
the
buttons
and
call
our
internal
component
method
here
on
mounted.
I
feel
like.
B
A
You're
saying
essentially
I
mean
we
need
a
click
handle
on
the
button
right
right,
but
doing
it
on
mounted,
because
then
we
can
also
clean
up
when
we
destroy
it
for
our
tests,
like
I
I
feel
like
we
should
do
this
in
the
component,
because
components
have
a
nice
life
cycle
as
well.
I
mean
this
is
just
a
component
as
well
right.
B
B
A
B
B
Like
I
would
do
one
or
two
things,
one
of
two
things,
so
one
of
the
things
I
would
be
doing
is
either
we
move
everything
to
the
view
component
or
we
move
like
the
submission
stuff
up,
and
then
we
can
get
rid
of
the
event
handler
emitting
and
so
on,
because
we
could
also
have
a
method
here
right
that
we
just
call
whatever
is
method
like
submit
promotion
right
and
then
we
could
instead
of
having
this
here,
we
could
define
the
event
handler
also
as
a
method
inside
here
right.
D
B
E
A
That's
actually
a
big
deal
when,
when
we
test
this
too,
because
we're
going
to
need
something
that
cleans
itself
up
and
so
doing
it
here
is
going
to
be
a
lot
more
preferable.
B
D
B
Yes,
this
then
we
have
the
unpromote
button
click.
This
is
just
like,
so
on,
submit.
A
B
F
B
Is
true:
okay,
props
yeah,
that's
true!
So
we
have
data
right
and
it's
also
a
function
gastron
and
then
we
have.
B
B
Okay,
so
come
on
after
that,
yep
thanks-
and
we
just
do
this
that
and
this-
and
this
is
in
equal
oops
group
name-
equals
equals
equals.
B
B
F
B
D
D
C
C
C
A
C
D
Done
why
is
it
right
there
and
the
abic
is
the
props.
B
B
What
you
know
whatever,
so
we
have
the
button,
click
right.
We
have
requests
started,
we
don't
care,
we
don't
need
to
have
this
event
anymore.
We
can
just
you
know,
event
pop.
We
can
just
get
rid
of
this
right.
A
B
Why
is
this
this
behind
the
vector
of
anyhow
we're
doing
it
once
we
start
the
promotion
so
once
the
modal
closes,
we
just
do
it
like,
so
we
do
it
on
the
request
start
right.
Well,.
A
B
So
here
we
just
do
I
I'm
just
ignoring
what
you're
saying?
That's
good,
that's
fine!
E
B
E
B
Okay,
so
we
are
good
here,
so
we
are
not
using
the
event.
D
D
C
B
Yeah,
okay!
Well,
that's
good!
No!
No!
Okay!
So
no!
No!
I'm
just
babbling!
We
can
remove
the
ref
as
well
right
and
across
and.
C
A
B
A
B
D
B
He
closed
true
right
here
we
probably
want
to
have.
Can
we
have
a
finally
whatever
right,
just
visible.
A
A
D
We
don't
spread
it
and
we
don't
do
we
bind
we
do,
but
we
bind
that
okay,
okay,
oh
fine,
we
pause
it
as
a
notch,
but.
A
D
Aren't
we
don't
we?
Yes,
so
title.
B
D
B
Title
but
anyhow
yeah
so
here
do
I
need
to
wrap
it
with
the
normal
slot.
No
right!
No!
No!
No!
No!
No!
It's
just
it's
just
div
and
we
should
be
fine
right.
Yes
and
how
are
our
primary
buttons
called
like?
Is
this
the
bricks
this?
This
seems
wrong
right.
So
how
do
I
style
our
primary
buttons.
B
Really
helpful
for
modals,
because
at
least
in
the
examples
it's
really
weird
because
you're
like
hey,
I
want
to
see
the
example
and
the
example
is
just
the
code
of
the
button
that
opens
it.
It's
a
bit.
D
Text.
Oh,
yes!
Yes,
yes,
yes,
yes,
and
there
is
an
example
a
little
bit
above.
If
you
change
the
example
type
there
you
go
another,
do
you
have
it?
That's
actually
action
primary.
What
you
need
to
pass.
C
C
F
B
And
this
is
like
action
right
and
I
don't
know
actually
yeah.
A
B
A
B
Is
that
like
that,
and
what
is
this
like
attributes,
oh
gosh,
why
yeah.
B
C
B
A
B
E
D
D
A
B
Yeah
primary
right:
yes,
it's
a
primary
yeah
yeah
whatever,
so,
let's
try
it.
Okay,
do
we
solve
this
by
just
adding
a
no
fade.
A
No
fan,
I
would
think
that
there's
something
else
like
a
like
a
page,
specific
css
that
might
be
causing
some
some
strangeness.
B
C
A
B
B
Yeah,
I
don't
want
it
to
be
at
all
wow,
okay
and
then
we
just
need
to
fix
the
other
button,
and
you
should
be
good
to
go
right.
Yeah.
B
D
D
A
A
B
B
The
the
yeah,
I
know
yeah
you're
right,
so
we
just
need
to
be
like
at
close
equals.
So
we
just
do
like
no.
A
D
A
A
Got
it?
That's
that's
the
bed
that
was,
I
think
that
I
was
always
having
issues
with,
but
this
is
cool
nice.
I
love.
A
B
D
D
A
You
have
one,
you
have
one
more
reference.
You
need
to
update.
E
B
D
B
Try
to
refresh
the
page,
so
it's
not
secondary
it's
cancelled
as.
B
Yeah,
it's
it's
when
you
click
the
x
on
the
top
right
in.
Why
is
that
documented?
B
Because
we
don't
pull
in
the
documentation
from
bootstrap
view
for
events
and
stuff
yeah,
and
it's
also,
you
know
we
have
close
cancel
hide.
There
are
a
few
others
that
are
all
related
to
closing
and
depending
if
you
prevent
the
event,
you
can
actually
prevent
the
closing
of
the
model.
It's
a
bit
confusing,
but.
B
B
B
B
B
D
A
B
Oh
geez,
but
I
I
have
to
get
rid
of
my
christmas
tree
in
about
five
minutes,
so
I
will
just
have
a
look
if,
because
today,
nico
taught
me
how
to
write
these
tests
with
the
new
new
test
tutors
because
I
just
came
back
from-
I
don't
know
how
many
months
of
leave
without
writing
a
view
test,
and
then
you
go
on
the
view
test,
your
teals
page
and
it's
like
this
method
is
deprecated
and
this
method
is
deprecated.
All
the
methods
are
deprecated,
but
yeah
is.
A
Each
yeah
and
then
using
that
to
trigger
the
events,
that's
cool.
I
don't
think
I
think
it's
really
doable.
If,
if
you
want
to
push
this
up
and
then
I
can
check
it
out
and
and
start
writing
some
tests,
if
you
need,
if
or
if
someone.
A
This
this
is
great,
I'm
so
happy
how
simple
our
entry
point
code
is.
Our
our
our
logic
is
nicely
contained
to
the
component,
which
cleans
itself
up
yeah,
that's
great.
I
I
would
like
to
know
like,
like
natalia,
like
seeing
a
large
plethora
of
view
code
and,
like
we've,
been
doing
view
for
a
while
we're
still
in
this
spot,
where
we're
like
one
foot
in
view
one.
You
know
couple
of
feet
still
back
in
hamel.
How
do
you
feel
like
seeing
these
components
that
do
document
corey
selector
and,
like
other
things
like
that.
C
I
mean
to
cry
it's
definitely.
I
want
to
cry,
but
in
this
case
query
selector
is
less
or
evil
comparing
to
what
we've
been
doing
with
all
the
event
hubs
there,
I'm
still
using
query
selector.
So
in
this
case,
when
we
need
to
listen
to
the
external
code,
I
mean,
if
you
use
query
selected,
just
like
a
button
within
the
component,
I
would
complain
if
you
use
query
selector
to
select
something
outside
the
application.
I
mean.
What
should
we
do.
A
Yeah
I
I
like
that
distinction
and
when
I've
had
conversations
about
like
what
I
like
about,
I
like
having
components
encapsulate
that,
and
sometimes
people
have
interpreted
like
we
shouldn't
ever-
do
document
query
selector
in
a
component,
but
I
like
what
you're
saying
is
it's
not
we're
not
doing
it
within
view.
We
have
to
communicate
outside
of
our
application
somehow,
but
encapsulating
a
component
is
really
powerful.
This
is
the
most
powerful
thing
already.
B
B
A
D
I
mean
in
some
weird
cases
they
can
help.
So,
for
example,
I
was
reviewing
an
mr,
where,
like
every
button
of
a
drop
down
somewhere,
enamel
somewhere,
actually
ujs
things
triggering
an
app
somewhere
else,
completing
somewhere
else
in
the
code.
Well,
how
you
want
to
do
that?
You
can,
if
you
say
you
just
rewrite
the
menu
they're
like
yeah,
but
this
is
like
a
few
million
changes.
I
won't
and
to
be.
B
Honest
in
this
case,
I
think
I
kind
of
like
the
architecture
a
little
bit,
not
because
we
just
came
up
with
it,
but
the
the
problem
is,
if
you
I
imagine
now
that
we
would
have
packaged
the
button
in
the
view
app
first,
we
would
have
needed
two
kinds
of
buttons
and,
secondly,
we
would
have
ended
up
with
like
dozens
of
modals,
and
you
know
that
you
are
not
able
to
see
and
that
are
bad.
B
You
know
from
from
a
perspective
of
hey,
you
have
like
unnecessary,
dom
elements
and
stuff
like
that
right.
Yes,
you.
B
If
you,
for
example,
have
that,
if
you
look
at
code,
we
have
like,
I
think
every
line
here
like
so.
For
example,
here,
like
this
little
anchor
icon,
is
an
icon
that
we
actually
add
on
every
line
and
just
show
on
harbor,
and
if
you
have
like
you
know,
20
000
lines
or
5
000
lines.
You
know
you
end
up
with
like
a
ridiculous
amount
of
icons
and
stuff
like
that.
A
Yeah
we,
we
actually
have
a
yeah.
This
has
come
up
before
and
and
I
and
I
strongly
encourage
us
to
try
to
find
ways
for
modals
and
things
that
are
kind
of
like
from
a
design
perspective.
We
should
just
have
one
of
them,
like
oh
man,
natalia
and
nico.
Both
I
didn't
get
to
say
goodbye.
They
just
left
anyways
and
I
know
you
got
to
take
care
of
your
christmas
tree
so.