Skip to content

Automatic issue sidebar collapse should not persist

Chat discussion:

rspeicher [12:15 PM] 
I notice on dev when you switch to the Changes tab on an MR the right sidebar collapses,
but then going to another tab doesn't change it back. Is that just an oversight?

jschatz [12:28 PM] 
@rspeicher: No that is on purpose. It was a decision we made.

rspeicher [12:28 PM] 
Hmm

jschatz [12:28 PM] 
I agree it seems anti what you would think

rspeicher [12:29 PM] 
Be prepared to answer that in a lot of duplicate bug reports :stuck_out_tongue:

jschatz [12:29 PM] 
I think the argument was that we don’t want to have the sidebar moving in and out all
the time on it’s own. To collapse it is one thing. To bring it in is potentially obtrusive.

[12:29] 
If I remember.

rspeicher [12:30 PM] 
Wow and it persists through a refresh? That seems crazy.

jschatz [12:30 PM] 
It persists like the left sidebar persists

rspeicher [12:30 PM] 
But I have to explicitly tell the left sidebar to collapse, so that makes sense

[12:31] 
With this we're essentially saying "If you ever view a MR changes tab, you're using the
collapsed sidebar forever"

jschatz [12:31 PM] 
So you are saying it’s fine if it collapses on it’s own. it should open up when switch back
tabs. If it expand when I switch tabs it should ​*at least*​ come back on refresh since I
wasn’t the one to collapse it (edited)

rspeicher [12:33 PM] 
Yeah, I don't think we should be persisting a setting that the user didn't set.

jschatz [12:33 PM] 
I agree with that statement. I’ll see if I can fix that (edited)

[12:33] 
That makes it a tad more complex but thats ok

rspeicher [12:34 PM] 
Yeah, you'd need to bypass the cookie setting if it's not collapsed manually

jschatz [12:34 PM] 
Right. nbd :confused:

There's a few issues:

  1. I don't think we should automatically collapse the sidebar when the user's display is above a certain horizontal resolution.
  2. I think if we collapse the sidebar automatically when viewing Changes, it should expand automatically when switching back to another tab.
  3. I really think we shouldn't persist a setting that the user didn't request explicitly.

cc @jschatz1