►
From YouTube: FE Pairing - 20210409 - Fix "Sign out" in 404 pages
Description
In this session we fix a bug where the "Sign out" button does not work on our 404 and 403 pages.
Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/322980
MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/59030
A
And
it's
in
progress
and
now
I'm
going
to
share
my
screen
and
I
was
going
to
suggest-
let's
try
to
fix
this
issue
because
it's
been
around
for
a
little
while
and
it's
not
a
great
issue.
So
if
I
am
logged
in,
let
me
log
in
to
let
me
demonstrate.
B
A
Yep
so
there's
a
cool,
this
button
doesn't
work,
this
button
doesn't
work
and
the
reason
this
button
exists
is
because
this
could
actually
be
a
valid
thing.
Oh
I
clicked
it
and
it
just
navigated
me
to
here.
The
reason
exists
because
it
could
be
a
valid
thing
and
I
just
don't
have
the
privilege
to
it.
That's
why
this
button
exists.
It'll.
A
A
It's
doing
what
we
do
elsewhere
in
our
gitlab
application
by
adding
a
data
method
for
post,
and
I
expect
that
there's
some
javascript
picking
this
up
and
knew
oh
we're
just
going
to
create
a
form
submission
for
this,
and
that
works
on
lots
of
other
places
in
gitlab.com
kind
of
just
out
of
the
box.
But-
and
I
guess
it
previously
used
to
work
for
the
four
or
four
pages.
But
it's
not
doing
that
anymore
and
I'd,
be
you
have
some
contacts?
Maybe
yes,.
C
B
The
the
thing
is,
there
is
a
rails,
javascript
thing
that
picks
up
automatically
based
on
data
attributes
and
then
converts
certain
links
to
be
post
requests.
So
the
thing
is
we
had
jquery
rails
and
because
we
want
to
move
away
from
jquery,
we
migrated
to.
I
think
it's
now
just
called
rails.
C
B
B
Otherwise
we
would
have
caught
this
funk
this
this
problem
right
yeah,
because
when
we
migrated
we
just
checked
the
most
important
paces
places
and
thought
hey.
You
know
if
the
tests
don't
catch
it,
it's
actually,
okay
right,
because
then
someone
will
report
the
bug
and
we
will
have
exactly
this
going
on
yeah.
So.
A
So
I'm
a
little
concerned
if
it's
not
in
our
main
bundle,
and
the
reason
is
what,
if
we
have
a
some
sort,
it's.
A
B
Hammer
template
yeah,
I
think
you're
right
so
you're,
basically
saying
if
someone
creates
a
form
data
method,
delete
or
whatever
or
even
uses
in
a
view
component,
but
it
then
works
on
one
page,
but
it
doesn't
work
on
the
other
yeah.
A
Yeah,
let's
dive
into
it,
I'm
I'm
here
in
the
code,
just
search
for
rails.
B
Yes,
yes,
and
wherever
this
is
exported,
it's
basically
initialized
right.
So,
like
just
look
at
the
unit
rails,
yeah.
B
B
C
A
A
We
are,
we
must
be
getting
this
one
because
we're
getting
the
errors
footer
and
we
get
the
nice
illustration
and
stuff.
This
is
one
of
the
first
things
I
did
at
gitlab.
Was
this
these
four
or
four
pages,
and
I
learned
that
there's
interesting
relationship
to
these
error
pages
and
also
workhorse
or
whatever
proxy
we
actually
hit
as
well
and-
and
so
I
think,
that's
why
there's
also
these
static
ones
is
there's
some
sort
of
weird
fallback
that
happens
well.
C
A
B
So
then
the
fix
is
still
the
same.
We
basically
need
to
create
a
javascript
bundle
where
we
just
include
the
rail
stuff
and
we
just
need
to
say
hey,
and
I
think
we
can
even
do
it
here
in
the
footer.
You
know
include
this,
because
the
good
thing
is
the:
if
we,
if
the
error
footer
would
be
used
on
another
page
that
does
the
inner
rails
anyhow,
it
will
not
be
a
problem
because
the
inner
rails
is
just
happening
once.
A
B
Mean
this
is
basically
using
the
sign
out
method,
post
thing
right,
so
I
would
suggest
it
makes
sense
here
because
it's
using
the
method
post
thing
to
say
hey
on
this
page,
we
want
to
have
rail,
the
rails,
ugs
yeah,.
A
That
that
that
sounds
good
to
me,
yeah
yeah,
so
I
mentioned
creating
a
bundle
and
that's
where
I
I
get
a
little
lost
because
I'm
like
yeah.
This
isn't
a
page
bundle
that
we
usually
do
so.
B
A
B
So
so
you
can
see
it's
actually
funny
here,
because
it's
yielding
a
title
and
it's
yielding
like
so
there's
like
no
actual
way
to
use.
One
of
our
helpers,
like
you
know
the
add
page
specific
styles
or
edge,
add
something
here,
because
there's
like
no
place
where
you
can
inject
something
from
the
template,
given
that
this
arrows
footer,
so
I
think
we
have
two
choices
either
we
extend
this
to
be
like
hey.
B
A
B
A
Don't
know,
maybe
not
any
feature
test
for
it.
Let
me
let
me
do
a
search
for
that
text,
because
I
think
that
would
be
how
it
would.
A
B
A
A
Nope
nope,
I
don't
think
so.
I
think
I
think
I
think
we
get
to
do
it.
That
sounds
like
fun,
so
I'm
going
to.
A
A
B
A
It's
not
going
to
fill
anything,
but
it
takes
me
to
the
search,
that's
cool
cool
that
works,
yeah,
that's
pretty
fun,
okay,
but
then
here
we're
just
saying
it
shows
nav
links.
You.
B
You
want
to
do
a
really
stupid
thing,
though,
without
rails,
ujs
and
whatnot.
Why
don't
we
wrap
that
little
thing
in
a
form,
then
right
that
does
it
it's
much
easier
than
you
know,
yeah,
including
the
javascript
and
so
on,
but
the
test
here
should
be
pretty
simple.
You
know
we
say:
hey
click,
the
button
that
says
whatever.
A
A
Okay,
oh,
I
can
maybe
look
for
the
current
path.
I
would
expect.
A
A
A
A
A
Current
path
to
equal,
oh
well,
that
sounds
like
a
nice
way
to
do
it
I'll,
probably
copy
that
one.
It
looks
like
that's
the
only
way
we
do
it.
C
A
Yep
yeah,
that's
the
bit,
I'm
not
super
super
excited
about,
but
I
think
it'll
be
okay.
So,
let's,
let's
run
our
failing
test.
A
And
let
me
yep
we've
we've
loaded,
the
gdk
but
you're
saying
maybe
let's
just
let's
just
wrap
this
in
a
actual
form.
B
A
B
B
B
A
I
I
did
remember
now
that
you
bring
it
up.
I
remember
seeing
if
that
was
possible
and
because
we
also
don't
have
access
to
all
of
our
css
here,
a
button
is
gonna.
Look
like
a
button.
B
A
A
B
Why
over
complicate
it
right,
like
maybe
we
add
a
little
empty
form
here
and
then
you
just
submit
it
with
the
thing,
and
I
mean
we
can
call
the
form
sign
out
form
or
whatever
well
but
but
could
you
could
you
try
to
maybe
hardwire
the
form
I
mean
you
can
worry
about
the
styling
and
moving
into
javascript
later
on
yeah.
But
could
you
could
you
try
out
here
with
the
form
if
it
actually
works?
Oh.
A
You
let
me
do
it.
Oh
gosh,
sorry,
you
let
me
do
it
here.
A
A
B
Delete
is
it
delete
really
yeah,
it
is
post
yeah.
B
A
That
would
be
really
sad,
yep
yep
yep,
don't,
but
this
is
going
to
be
a
type
submit.
Yep.
A
B
A
A
I'm
I'm
reset
typing.
The
password
yes
makes
sense,
just
trying
to
be
completely
safe.
Okay,
I'm
re-sharing
my
screen,
so
yes
doing
the
and
that's
technically
what
that
is
technically
what
the
rails
ujs
is
doing.
A
C
Just
like
what
you
said
submits
the
form.
A
Yep
yep
100
mandy's
tests
are
give
me
you.
A
B
I
haven't
started
spring
yet
so:
oh
yeah,
okay,
yeah,
it's
like
I
recently
contributed
to
some
other
ruby
project,
and
I
was
amazed
how
fast
aspect
can
be
like
some
triage
ops
or
whatever
right.
That's
like!
Oh,
what
the
the
tests
ran,
because
I'm
so
used
from
the
gitlab
project
to
start
the
tests
and
walk
away
and
make
a
copy.
C
Of
the
rail
stack
like
in
modern
rails,
there's
like
the
the
r-spec
helper
helper
that
loads
the
whole
rail
stack.
But
there's
like
the
plain
one
that
doesn't
load
the
rail
stack
and
if
you
can
write
a
pure
library
class
that
doesn't
need
rails,
which
is
rare.
But
if
it's
just
pure
ruby
logic
that
will
run
instantaneously.
C
B
A
B
A
Here
we
go
we're
signing
in
and
I'm
gonna
go
to
garbage
foo.
Okay.
This
is
the
button
that
doesn't
work.
So
I'm
what
I
was
saying
I
would
be
fine
with
is
just
adding
you
know
the
one
or
two
lines
to
make
a
data
method
work,
just
whatever
rails
ujs
does.
We
could
just
you
know,
kind
of
copy
that
over
here.
A
B
A
B
C
B
B
No,
it's
actually,
I
think
it's
in
the.
B
A
These
pairing
sessions-
and
this
is
a
good
thing
and
I'm
not
going
to
stop
doing
it,
but
sometimes
I'll
brainstorm
ideas
just
like.
I
know
this
is
a
bad
idea,
but
why
not
like?
Let's,
yes,
but
some
people
are
like
man.
I
can't
believe
you
suggested
that
I
was
like
dude
we're
brainstorming.
B
B
A
That
and
then
the
on
click
would
be
a
function,
arrow
function.
Well,
we
just
we
just
call
it.
It's
document
get
element
by
id.
Oh
gosh
sign
out
form,
submit.
A
B
B
Okay,
good,
but
that's
a
good.
That's
a
good
question,
get
element
by
id
yeah,
it's
cool!
That's
even
you
know
ie9
compatible.
I
love
it.
Should
that.
A
A
B
A
B
A
I'll
tell
you
what
I
do
really
like
all
the
documentation
there
is
for
the
rails.
Oh.
B
No,
you
need.
The
on
click
is
just
a
colon.
You
just
do
colon
on
click
and
then
also
an
arrow.
You
mean
this
one,
yes
are
those
equivalent.
I
don't
know.
A
C
Yeah,
I
don't
think
you
have
to
switch
over
to
the
rocket
forum.
B
A
Perfect
it
works.
Do
we
like
the
inline
javascript.
B
A
A
A
B
A
B
A
B
A
Thank
you,
so
I'm
gonna
query
for
I'm
going
to
corey
for.
B
B
A
B
A
I'm
I
dig
it.
This
is
gonna,
be
so
easy,
but
I
am
gonna
add
a
comment
of.
We
do
not
have
rails
ujs
here,
so
we're
manually
triggering
what
data
method
used
to
naturally
do.
A
Okay,
get
element
by
id,
it
is
sign
out,
link,
add
event
listener
on
click,
oh
and
I
don't
even
know
if
yeah
I
was
about
to
start
doing
some
some
fat
air,
I'm
going
to
do
some
arrow
functions,
but
that's
that
would
be
fine.
A
We
do
want
to
prevent
default.
I
imagine.
B
A
Awesome
yeah
that
fixes
it
great
I
get
to
commit
and
create
an
mr.
This.
A
B
A
B
B
A
It's
called
rails
rails
is
doing
it.
Yeah
reyes
is
doing
that
yeah
sorry,
but
yeah.
We
have
it
yeah
cool.
So
I
I
would
like
to
spend
the
rest
of
our
pairing
time
talking
about
something
that
comes
up
in
my
head
almost
every
day,
but
I
want
to
open
up
gitlab.com
and
side
of
my
a
little
browser
environment.
I
don't
know
why
you
keep
asking
for
that.
A
Have
not
let
me
let
me
go
ahead
and
make
a
commit
and
push
this
up,
and
while
that
stuff
is
loading,
then
then
you'll
be
good
to
go.
No,
no,
no
you're
great!
So
my
commit
message
is
we
fixed?
Let
me
go
to
my
yes:
fixed
sign
out
button
and
404.
A
Number
fix
sign
out
on
error.
A
Pages
cool,
so
that's
loading,
but
here
I
am
at
gitlab.com
in
an
environment
that
does
not
have
javascript
and
I
don't
get
anything
yes,
you
mean
you
want
to
have
a
noscript
somewhere.
I
want
to
have
a
no
script
somewhere
telling
you
hey.
Gitlab
works
best
with
javascript
enabled
no.
A
Javascript
enabled
right
right,
but
it
would
be
nice
to
get
that
message
from
here,
because
some
pages
look
like
there
might
be
some
stuff.
I
think,
but
or
it
may
even
look
like
some
of
these
work,
but
sometimes
they
don't
or
whatever,
and
it
would
be
nice
to
just
not
show
any
of
this
and
just
show
similar
to
our
error.
Page
layout,
if
you
don't
have
javascript
enabled
you
gotta
enable
like,
let's
not
show
any
interaction
to
the
user,
because
none
of
it's
really
gonna
work.
B
B
A
Or
you
won't
be
getting
any
help,
no,
that
this
is
going
to
become
a
bit
more
javascript
and
like
the
projects,
is
actually
a
drop
down,
but
you
know
this
is
not
drop
down
right
now
and
yes,
this
is
gonna,
be
all
be
combined
pretty
soon
to
one
drop
down
thing:
yeah,
it's
gonna,
look
really
sweet.
It
actually
looks
really
sweet
yeah.
But
that's
got
me
thinking
about
noscript.
A
Yeah
but
like
you
know,
oh
you
still
got.
Oh
you
have.
I
don't
know
what
that
was.
Please
turn
whoa
that
that's
what
I'm
talking
about.
B
Yeah,
that's
that
looks
sweet.
Why
don't
we
have
it
everywhere
like?
Can
you
just
copy
that
and
into
our
normal
layout
I
mean
yeah,
that's
what
I'm
talking
about.
B
A
B
Can
you
can
you
check
the?
Can
you
check
the
html,
that's
coming
back
here
because.
B
A
B
Oh
it
doesn't
it
doesn't.
He
also
doesn't
solve
the
situation
if
you're
already
logged
in
isu.
B
B
Nowadays,
like
there's
a
no
script,
definitely
I
know
because
I
think
I've
created
if
there
wasn't
an
issue.
I
think
I've
created
it
like
three
years
ago,
script.
A
A
B
A
A
A
A
A
A
Sweet
all
right,
I've
got
to
add
one
of
those
sweet
change
logs,
but
this
is
this
is
time
thanks
for
hopping
on
and
helping
out-
and
this
was
fun.