►
Description
In this session we explore some approaches to creating an action for a Toast popup, and discuss an MR that adds Yarn2 support to our untamper-my-lockfile script.
0:00 - Creating an action in a toast popup
17:32 - Yarn2 support for untamper-my-lockfile
https://gitlab.com/gitlab-org/frontend/untamper-my-lockfile/-/merge_requests/38
A
So
share
my
screen
describe
the
problem.
Yeah.
A
You
want
to
again
you
can
share
your
screen
yeah,
so
this
is
the
issue
I'm
working
on.
So
when
you
add
an
sorry
when
you
promote
a
comment
to
timeline
event,
you
get
a
toast
message
and
we're
going
to
add
view
event
to
the
toast
message,
which
seems
straightforward
enough.
A
Sorry,
so
then
an
example
of
that
is
here
is
a
comment.
You
press
this
button
to
add
it
to
to
the
timeline
and
we'll
get
this
so
the
way
the
toast
message
works
is
the
first
problem
or
interesting
thing.
A
So
to
add
the
action
you
you
can
run
it
on
click,
so
you
can't
make
that
action
a
link,
but
you
can
give
it
an
on-click
behavior
in
which
you
could
replace
the
window
like
URLs,
which
feels
a
little
bit
clunky
and
I
couldn't
find
any
other
examples
of
us.
Well.
I
found
one
example
of
us
using
window.location
replace
in
the
code
base,
so
I,
don't
love
this,
and
also
the
action
is
an
anchor
tag
anyway.
A
So
I
feel
like
I
should
be
able
to
add
a
link
to
that
anchor
tag.
So
this
is
one
issue
I
have.
Maybe
I
want
to
speak
to
this
for
now.
A
B
B
A
Interesting
I
was
just
going
to
do
a
whole
new
page
I.
C
It
depends
like
if
your
whole
page
is
routed
with
you.
You
should
probably
use
view
router
and
navigate
to
this.
If
the
page
is,
you
know
still
using
single
rails
views,
you
probably
want
to
You.
Probably
we
have
a
helper
for
that.
You
would
do
like
go
there.
It's
also
ugly,
that
it's
in
a
JavaScript
but
yeah.
D
A
B
B
I
would
I
would
then
just
write.
Add
a
comment
either
on
the
Mr
here
that
test
that,
once
the
view
router
stuff
test,
this
Behavior
with
the
V
rather
thing
so
does
changing
the
URL
will
view
around
or
just
take
over
and
do
its
thing
and
I
wouldn't
I
I
feel
like
there's
a
50
50
chance.
It
does
either
one
and
there.
B
A
C
Probably
better
with
view
router,
if
you
you
know,
can
push
the
state
or
whatever.
However,
you
do
it
it's
better
than
an
URL,
because
you
know
of
all
the
things
that
can
go
wrong
with
creating
a
URL
here,
and
you
know,
but
I
think
this.
Isn't
this
like
how
our
file
list
view
works
as
well.
I
mean
we're
properly
using
view
router
there.
C
So
if
you
can
use
the
view
router
API
just
do
it,
I
mean
the
alternative
would
be
that
we
teach
the
toast
function,
how
to
do
view
router
stuff,
like
on
the
top
level,
so
to
have
it
a
bit
nicer,
but
yeah
I,
don't
know.
A
B
Right
view,
router
knows
how
to
can
handle
anchored
tags
like
you,
have
a
special
anchor
thing.
Oh
okay
and
so
I
think
that's
might
be
what's
going
on
with
the
finalist
thing,
but
the
file
this
one
is
a
good
example
to
bring
up
that's
doing
something
similar.
C
But,
to
be
honest,
if
you
look
in
using
I,
think
you
wouldn't
use
an
a
ref
and
call
whatever,
because
the
because
you
would
use
the
view
router
component
and
under
the
hood.
This
is
nothing
different
from
calling
the
view
router
API
right,
whatever
you
call
the
JavaScript
API
or
there's
like
some
full
component.
That
does
the
same
thing
under
the
hood.
C
The
only
thing
that
I
might
see
would
be
worthwhile.
If
we
have
that
use
case
more
often
or
the
toast,
you
know
doing
something
with
your
router,
which
might
be
the
use
case.
Once
we
have
more
stuff
that
uses
your
router.
C
It
might
also
need
to
write
a
little
help,
but
it
is
you
know,
toast
with
view
router
action,
or
you
know,
toast
The
View
router
that
abstracts
the
little
hack
that
you're
doing
here.
You
know,
if
so
yeah
that
you
know
it
works,
because
the
downside
of
teaching
the
toasts
how
your
router
works
is.
We
would
need
to
bring
view
router
as
a
dependency
into
gitlab
UI
and
teach
it
all
these
kind
of
things
right,
which
might
be
tricky
if
you
need
to
update
view
routes
on
the
future
or
replace
it
with
I.
C
C
Most
accessible
thing
would
be,
if
you
actually
use
the
if
you,
if,
if
you
can
make
it
an
ahref,
but
it
would
have
the
downside
that
if
it's
a
normal
link
and
you
click
it
view,
router
would
not
do
view
router.
And
so
you
wouldn't
be
able
to
switch
over
in
the
single
page
application.
And
you
would
force
a
Reload
right.
A
Yeah,
okay,
cool
that
makes
sense,
I.
Think
that's
some
options
that
I
can
investigate.
I
want
to
show
you
the
next
problem,
which
is
like
when
you
get
the
data.
It
has
the
ID
of
the
new
timeline
event,
but
that
ID
is
like
the
I.
Don't
know
how
to
describe.
A
So
the
graphql
gives
us
back
like
the
timeline
event
ID,
which
I
don't
know
how
to
turn
that
into
your
a
URL
so
like
when
we
create
the
sorry
when
we.
So
this
is
the
service
to
promote
the
timeline
event.
To
a
note-
and
we
say,
like
you
know,
it
gives
the
it
gives
disinformation.
A
B
Yeah,
there's
a
there's
a
number
of
ways:
I
think
we
could
do
this.
We
can
let
the
front
end
be
the
single
source
of
truth
of
it
and
that's
the
front
end
build
the
URL
or
we
can
let
the
back
end
be
the
single
source
of
Truth
button.
Let
the
backend
Do
It,
the
fronted
one
would
be
potentially
easier
because
you
can
effectively
just
create
a
new
URL
from
the
current
one.
B
I
I
find
using
the
the
all
caps
URL.
The
native
URL
object
is
really
really
helpful.
I
like
creating
new
URLs
that
are
relative
to
other
URLs.
A
So
so
that
would
look
like
so
here
when
we
create
the
someone
would
create
you
know,
and
then
we
so
this
should
pause
in
the
console.
So
we
have.
This
is
the
ID
we
get.
B
B
Except
we
have
helpers
to
do
that,
I
believe
I,
believe
we
have
helpers
to
do
that
and
it's
also
maybe
we
have
instead
of
on
the
type
just
an
ID.
Maybe
we
have
an
I
ID
and
that's
what
we
should
be
using
instead,
because
that
would
be
just
the
68
part,
but
I
don't
know
if
that
exists,
for
these
kind
of
things.
A
B
Doesn't
have
an
IID.
This
is
that
it
doesn't
look
like
it
does.
No
all
right,
yeah,
I,
think
we'll
we'll
need
to
grab
a
there
should
be
a
function.
That's
like
convert
ROM
graphqlid.
If
we
do
a
project-wide
search
for
like
from
g
dot,
star
ID,
we
might
find
something.
B
C
The
question
is
just
like
with
the
timeline
event
type
and
if
they
now
get
like
whatever
IDs
or
if
they
get
like
an
URL
or
whatever
the
question
would
be
if
we
should
just
expose
it
on
the
graphql
type
as
well
right,
like
just
thinking
about
the
API
about
our
graphql
API,
is
that
you
use
is
where
someone
wants
the
URL
from
this
thing.
I
don't
know
yeah
well,
is
the
URL
not
existent
at
that
point.
A
C
Feel
like
it
would
make
sense.
Yeah
just
like
I
mean
as
a
first
iteration.
The
front
end
thing
is
probably
good
enough
and
you
know,
but
you
know
I
don't
know
which
back-end
developer
is
helping
with
those
features.
You
could
ask
him
hey.
Could
we
expose
whatever
field
we
need
here
and
then
it
becomes
even
easier
in
the
future.
B
B
B
Well,
because
I'm
realizing
summary.
A
C
You
would
you
would
build
the
URL
at
the
time.
Yeah,
oh
shoot,
I
also
messed
up
in
the
chat
like
you
would
need
to
build
it
before
right.
B
Yeah
hash,
but
we
could
use
window
location,
href
I
mean
it
might
be.
Even
it
might
be
interesting
if
it
might,
because
maybe
there's
other
way,
there's
other
URLs,
where
you
can
create
this
from.
If
we
had
a
stable
incidence
path
that
we
got
from
the
back
end
like
maybe
that's
the
most
reliable
thing
for
us
to
do,
yeah
so
rather
but
yeah,
all
of
it
to
say,
I
shared
also
in
the
chat.
B
James
I
shared
a
link
to
this
toast
function
and
I'm
surprised
that
href
isn't
a
thing
because
I
if
I
saw
that
I
would
immediately
start
going
to
middle
click.
The
thing
the
view
event
because
I
imagine
someone
might
be
trying
to
go
through
a
list
of
them
and
then
it's
like.
Oh,
let
me
middle
click.
This
I
don't
want
to
lose
my
current
context,
but
this
wouldn't
let
me
middle
click
on
it.
So.
C
B
A
C
It
sure
so
my
wife
is
going
to
come
soon
and
I
have
to
drop
off
eventually,
but
I
just
have
one
main
point
in
that
merge
request.
Maybe
we
can
jump
into
that
one
quickly.
B
Let
me
share
my
screen
and
close
some
things
out
and
yeah.
Let's
go
for
it
here.
We
go
sharing
screen,
oh
wait,
this
is
git
live
UI.
Get
out
of
here,
get
live
all
right.
Yes,
what's
the
point.
C
Okay,
so
the
past
package
name.
So
this
is
the
thing.
The
past
package
name
is
a
little
interesting
because
apparently,
after
the
initial
part
of
the
name
right
like
the
beginning
here,
loaded
or
gitlab
untemper,
there
is
an
ad
and
after
that
ad
comes
in
URI
and
the
thing
with
the
npn.
What
you're
doing
that
you're?
Basically
converting
that
Soul
number
into
that
Alias
kind
of
thing
is
interesting,
but
I
think
it's.
Maybe
the
the
wrong
approach
in
the
whole
thing
is
looking
at
the
thing
a
little
bit
backwards.
C
I
think
it
would
probably
make
more
sense
in
the
yarn
versus
two
strategy
to
be
like
hey,
let's
pause
this
thing,
you
know
this
name
and
the
resolution
thing
and
the
only
thing
that
we
support
is
workspace.
Where
we're
just
like:
okay,
we
don't
care
and
npm
where
we
are
like
okay,
we
need
to
double
check
that
everything
looks
all
right
and
nothing.
No
one
has
done
something
bad
and
we
I
think.
C
B
The
intent
here
is
for
some
reason
the
NPA
was
parsing
this.
If
I
had
something
to
look
like
this,
it
tried
to
fight.
It
tried
to
treat
4.1.7
as
the
package
name.
Did
that
make
sense.
So
that's
why
that's
why
I
changed
it
to
this,
so
that
NPA
would
Would
Not
freak
out
when
it
would
have
found
this
part.
Let.
B
C
B
C
Okay,
good
so
I
think
there's
just
a
little
confusion
here,
because
npm
has
also
a
feature
to
do
aliases.
So,
for
example,
if
you
do,
if
you
want
to
install
view
2
and
view
3,
you
can
write,
you
can
write
view
to
add
npm
colon
View
at
right.
B
B
C
Actually
isn't
so
if
you,
if
you
would,
if
you
would
think
that,
let's
imagine
that
yarn
versus
two
would
have
chosen
not
npm
but
yarn
versus
two
as
a
as
a
name
space,
you
know
the
whole.
The
resolution
would,
for
example,
look
like
a
yarn
for
70
21
I'm.
Just
writing
it
in
the
chat,
while
an
npm,
alias
that
you
actually
give
to
NPA
would
look
like
something
like
this.
C
Let
me
just
view
two
is
the
best
example
view
two
yeah
View,
at
which
version
of
view
do
we
have
I,
don't
know
2.7,
10
or
whatever
right
so
yeah
yeah,
I
I
wrote
the
wrong.
I
wrote
the
wrong
thing.
Sorry
again:
well,.
D
B
Thoughts
was
in
interpreting.
This
was
that
yarn
two
is
just
I,
don't
know
for
some
reason,
assuming
that
an
empty
Alias
meant
just
use
the
same
name
but
I
do
think
you're
making
a
good
point
of
like
conceptually
yarn
resolutions
are
just
seemingly
a
little
bit
different
than
these
than
what
this
expects
of
its
package
name
at
URI
and
I.
Think
that
makes
sense
so.
C
Like
it's
yeah,
so
I,
actually
you
might
have
done
the
right
thing
here.
So
basically
you
changed
the
npm
thing
where
they
also
have
done
a
shortcut
into
the
into
the
full
qualified
URL
kind
of
thing,
maybe
to
put
it
differently,
I!
Think
if
you
have,
if
you
have
a
package
Json
in
mind
right,
a
package
Jason
has,
on
the
left
hand,
side
low,
Dash
and,
on
the
right
hand,
side
for
1721
right
and
the
at
npm
colon
here
that
we
have
is
basically
just
like
the
normal
colon
in
the
package.
C
Yeah
yeah
yeah,
you
get
what
I'm
saying
like
it's
just
like
conceptually
it's
a
little
bit
interesting
and
I.
Think
because
we
have
the
patch
Shenanigans
going
on
anyhow,
we
probably
need
to
rework
the
yarn
versus
2
strategy
a
little
bit
to
also
give
better
errors
if
we
encounter
an
unknown
protocol
because
imagine
yawn
supports
downloading
something
from
FTP
right.
A
C
B
C
Yes
and
that's
what
I've
done
here,
you
can
see
the
regex
and
the
regex
is
using
named
capture
groups.
Yes,
so
the
only
confusing
thing
is
the
thing
might
start
with
an
edge
for
the
scoped
names
right.
Then
you
have
the
at
before
the
scheme.
You
know
I
called
it
scheme
like
you,
know:
hdp
yep,
SSH,
git,
all
schemes
and
then
there's
a
colon.
C
C
Great,
let's
do
it?
Yes,
you!
You
would
need
to
do
this
and
basically,
if
something
the
encounters,
a
scheme
that
we
don't
know,
you
know
we
throw
an
arrow
because
on
Timber
might
look
for
this
is
by
the
way,
a
limitation
at
Untamed
by
my
look
fat
at
the
moment
also
has
in
the
normal
resolution,
like
we
don't
allow.
If
someone
uses
a
package
directly
from
git
or
from
an
HTTP
URL
right,
it
should
be
a
feature
request
and
the
patch
thing
here,
I
think
it's
very
interesting.
C
I
looked
at
the
log
file
of
the
web
IDE
thing,
maybe
you
should
just
in
the
first
iteration
whitelist
allow
list
the
the
the
thing,
the
stuff
that
how
do
you
call
it
the
stuff
that
Jan
does
internally,
they
I.
C
B
That's
a
good
point:
I
am
planning
on
adding
as
a
e
to
E.
Yes,
input,
the
web
ID
log
file.
Yes,
the
current
one,
I'm
gonna,
add
that
as
part
of
the
ete's
thing,
but
this
makes
a
lot
of
sense
and
I
I
get
this
and
it's
nice
that
the
only
thing
we're
trying
to
do
is
just
parse
the
package
name.
So
I
I
think
that's
a
good
point
and
that's
something
that's
something
to
do.
That
would
be.
That
makes
sense.
B
To
highlight
yeah,
oh
sorry,
let
me
highlight
one
thing:
does
it
make
sense,
I,
don't
know
if
you
how
how
much
you
read
into
it,
but
I
found
it
to
be
a
lot
easier.
If,
when
I'm
parsing,
the
yarn
lock
file,
yes
to
then
send
to
the
validator,
let's.
C
B
C
Yes,
all
good,
then
then
this
is
this
is
like
a
like
a
valid
solution
for
the
workspace
entries,
but
the
the
other
thing
in
the
validation.
You
probably
need
to
write
like
a
switch
case
statement
for
the
other
protocols
right
and
everything.
That's
not
part
of
the
npm
workspace
npm.
B
B
Yeah
yeah,
so
that's
I'm
I
need
to
get
that
feedback
by
putting
the
whole
I
knew.
I
was
doing
this
iteration
and
then
I
know.
Okay,
I
need
to
try
this
against
the
whole
thing
so
I
was
I
was
excited
to
see
that
e
to
e
thing,
I'm
gonna,
try
that
out
and
then
I
know.
That's
gonna
get
already
failed
by
the
way,
with
the.
C
C
Yeah,
let
me
just
I
mean
you
have
the
example
in
the
npm
docs
that
you
basically
oh
geez,
do
something
like
I'm
pasting
it
in
a
chat
that
you
do
something
like
this
in
a
maybe
in
in
so
that
you
do
yeah.
Do
something
like
the
second
line
and
just
see
how
and
add
and
enter
and
test
with
a
with
a
log
file
that
just
has
like
a.
C
C
B
C
Have
no
that's
not
true.
The
only
reason
to
use
aliasing
is-
and
this
is
also
something
that
you
also-
we
also
maybe
should
test
in
a
future
iteration
or
even
in
this
iteration
is
I,
don't
know
if
yawn
2
allows
you
to
use
this
Alias
to
you
know,
use
pulse,
Slaughters,
Jake,
very
Fork,
and
then
you
know
at
Paul
Slaughter
jQuery,
and
then
you
know
you
being
able
to
force
overwrite
all
the
Jake
queries
that
are
in
your
dependency
tree
with
your
fork
right.
This.
C
And
there's
another
another
tiny
thing
that
I
said:
Jan
versus
one
lock
files
has
an
explicit
array
of
optional
dependencies,
while
yarn
2
just
has
like
a
meta
attack
and
says:
hey,
this
dependency
is
optional.
So
if
you
just
just
go
into
your
young
log
file
of
the
web
IDE
you
will
and
search
for
optional,
you
will
see
it
or
I
actually
linked.
It
did
I
link
it.
No.
C
B
C
I
I
think
the
first
good
iteration
is,
if
you,
if,
if
the
thing
passes
for
the
web
IDE,
it's
probably
good
enough
for
first
iteration
and
we
couldn't
call
it
the
beta
feature
and,
to
be
honest,
like
I,
have
all
kinds
of
test
cases
inside
the
test
files
where
I
dealt
with.
You
know
peer
dependencies
and
bundle
dependencies
and
all
these
kind
of
things.
C
Maybe
it
makes
more
sense
to
move
them
to
package
jsons
again
and
being
able
to
generate
like
how
the
log
files
would
look.
You
know
what
I
mean
like
to
basically
have
the
same
end-to-end
coverage
for
each
case
in
foreign.
B
That
would
be
interesting
and
that's
a
good
point
though
too
I
think
I
can
I
can
copy
a
lot
of
the
current
ones
and
create
a
yarn
two
version
of
it
and
see
yeah
what
happens
there?
That's
an
interesting
point:
I.
B
B
C
B
Alive,
yes,
okay
got
it
for
some
reason:
I
thought
it
was
reading
the
package
for
some
reason:
I
thought
I
was
reading
package
Json
all
right,
I'm
glad
it's
not
because
because
of
the
workspaces,
that
would
be
a
challenge,
because
we
would
have
to
read
all
of
the
workspaces
package
Json
if
we
were
going
to
like
map
these.
C
We
once
did
it
like
we
once
scanned
package,
Json
and
I
tried,
like
I,
threw
like
arrows
if
a
dependency
was
missing
and
these
kind
of
things
and
then
I
just
realized.
This
is
this
is
dumb,
because
if
you
just
do
a
yawn
install,
it
will
complain
about
missing
dependencies.
Anyhow
right,
like
so
I
mean
with
untemper
my
lockify,
the
only
thing
that
we're
really
trying
to
cover-
and
this
is
also
the
reason
why
I
didn't
look
into
yantu,
because
I
didn't
use
it
enough.
C
So
like,
if
you,
if
you
yeah.
C
B
They
don't
have
to
recover.
That
makes
a
lot
of
sense,
yes,
and
so
on
that.
On
that
note,
this,
this
I
wrestled
with
this.
A
little
bit
is
that
yarn
teals
doesn't
do
the
same
Integrity
check
as
yarn
one,
because
yarn2
saves
everything
in
zip
files,
so
it
actually
saves
the
checksum
of
the
zip
files,
which
is
really
kind
of
frustrating.
But
then,
when
I
tried
like
okay,
can
I
tamper
with
this
in
any
way,
and
you
just
can't
like
yarn
doing
yarn
immutable
is
just
going
to
if.
C
C
C
B
That's
yeah
so
cool
thanks
for
taking
a
look
at
this
I
really
appreciate
the
quick
feedback
on
it
and
this.
This
is
a
good
idea,
so
yeah
I'll
I'll.
B
Oh
yeah
yeah
I'm,
I'm
really
eager
to
get
the
because
right
now,
I
have
Mrs
closed
on
the
web.
Id
projects
I'm
really
eager
to
get
those
open
because
I
feel
bad.
That
contributors
aren't
able
to
make
contributions.
So
cool
appreciate
everything.