►
From YouTube: Engineering - User Callouts Walkthrough
Description
We walk through using user callouts in order to create user-dismissable banners in the GitLab UI.
A
Cool,
so
what
we
want
to
do
so
we're
working
on
your
issue
here,
where
you
want
to
prompt
users
to
double-check
their
accounts
recovery
settings,
and
then
we
would
prompt
a
banner
that
would
link
to
their
account
every
three
months.
So
basically,
what
I'm
gonna
do
is
show
you
how
it
works
currently
for
the
GC
like
something
that
we
do
right
now,
which
is
the
GCP
credit
offer
if
you
go
to
the
cluster's
beach
page
mm-hmm.
A
B
A
Anyways,
this
is
one
of
the
ways
that
we
can
persist:
user
dismissals
in
the
backend.
So
once
you
click
this
this
or
either
one
of
these,
actually,
once
you
click
it,
it'll
flip
the
switch
in
the
backend
saying
like
okay,
you've
dismissed
this
and
then
we'll
never
show
it
again.
Unless
you
happen
to
clear
it
or
you
create
a
new
flag
for
it.
So
you
can
see
my
screen
yeah,
okay,
so
what
you
really
need
to
work?
A
A
Something
and
then
something
like
that,
and
then
you
would
go
to
something
like
the
user,
call-out
helper
and
then
add
a
helper
here
to
just
basically
map
to
that.
You
know
that
key
mm-hmm
and
then
you
can
use
that
in
your
template
helper.
So
you
determine
whether
or
not
it
should
show
the
offer,
because
at
this
point
it's
checking
if
the
user
has
dismissed
it.
So
in
this
case
we
have
show
TCP
sign
up
offer,
and
so,
if
I
go
to
the
clusters
helper,
that's
where
I'm
actually
checking
it
here
to
see.
Okay.
A
Well,
let
me
back
up
a
little
bit
in
my
template,
I'm
actually
trying
to
render
it
here,
uh-huh
and
then
I
have
a
helper
that
actually
checks.
There's
two
things
in
this
case,
whether
there's
an
instance
level
setting
where
we
hide
third-party
offers
or
whether
or
not
it's
just
been
dismissed,
at
which
point
we
just
render
the
flag.
This
is
a
little
bit
more
complicated
because
we
had
this
toggle
or
this
application
setting.
So
what
you'd
really
only
need
to
do
is
do
like
you
know
if
you
know
show
you.
B
Know
if
I
have
the
relevant
call
out
yeah,
so
basically,
we
will
need
to
introduce
like
a
new
cloud
scheme
like
recovery
settings,
maybe
2020
January
or
whatever
I'm
right.
What
will
be
the
naming
and
we
will
just
manually,
introduce
new
call
out
each
three
months
and
merge
them
via
merge
requests,
yeah.
A
A
We
would
prompt
the
user
again
to
like
dismiss
the
banner,
which
would
be
like
acknowledging
that
they've
read
the
privacy
policy,
or
at
least
they
know
that
it's
been
updated,
and
so,
when
I
did
in
this
case
and
I,
don't
know
if
we
should
do
the
same,
because
we're
gonna
be
issuing
new
banners
every
three
months
is
that
I
would
just
link
to
the
issue
explaining
why
you
know
what
this
privacy
policy
was
and
then
it
was
just
specific
to
that
issue.
Number
I,
don't
I
mean
other
than
that.
A
A
So,
that's
probably
something
we'll
have
to
check,
and
actually
that
would
probably
be
where
we
put
in
the
user
Colin's
helper
here
is
that
we
would
be
checking
previous
call
call-outs
for
the
account
recovery,
so
basically
I
saw.
Actually
you
know
what
we're
probably
going
to
need
something
like
this,
where.
A
A
A
B
A
Out
as
a
the
helpers
have
their
own
specs
I
think
I
the
lights,
that's
funny,
so
you
really
I,
don't
think
I
added
tests
for
the
privacy
policy,
one
because
we're
already
testing
the
call
out
helper.
So
if
that's
not
working
and
that's
a
bigger
issue
and
if
we're
not
rendering
templates,
that's
a
bigger
issue
as
well.
So,
okay.