GitHub-userscripts icon indicating copy to clipboard operation
GitHub-userscripts copied to clipboard

Collapse-in-comment always starts collapsed

Open aspiers opened this issue 9 years ago • 11 comments

Even if Start with blocks collapsed? is set to false, the blocks are still automatically collapsed when an issue loads.

aspiers avatar Oct 02 '16 23:10 aspiers

Hi @aspiers!

Make sure to reload the page (Shift + F5) after changing the option as the script is loaded into the page and does not refresh because GitHub uses ajax page loading.


I just update the documentation to emphasize this necessity.

Mottie avatar Oct 02 '16 23:10 Mottie

false appears to be the default value (at least it was for me), so this is a problem even without changing the option. I also tried changing to true and reloading and the behaviour didn't change.

aspiers avatar Oct 03 '16 00:10 aspiers

The setting will always initially show the opposite of the current setting - see line 233.

LOL, actually, I just tested it and it does toggle the areas even without a page reload.

Maybe there is another script interfering? Are you using Octopatcher?

Mottie avatar Oct 03 '16 00:10 Mottie

Oh, I see! So when I typed in true, I wasn't actually changing it at all :-)

Hmm, this is not an intuitive UI at all. Perhaps you can think of some way to make it clearer, e.g. tweaking the text?

aspiers avatar Oct 03 '16 00:10 aspiers

To be clear, it does work now I understand how it's supposed to work :-)

aspiers avatar Oct 03 '16 00:10 aspiers

What would you suggest?

Mottie avatar Oct 03 '16 00:10 Mottie

In Octopatcher (an addon created from this userscript), I set a select with two options: collapsed & expanded. Does that make more sense?

Also, I'm going out of town on the 4th, I'll be unavailable for a month, or so. So please don't think I'm ignoring you if I don't respond.

Mottie avatar Oct 03 '16 00:10 Mottie

That sounds better but I'd have to see it to be sure.

aspiers avatar Oct 03 '16 00:10 aspiers

Updated.

Mottie avatar Oct 03 '16 00:10 Mottie

Thanks - this is better for sure, but the main source of the confusion is still there, i.e. that the value auto-populated in the dialog is the opposite of the current state, so that you only have to click OK to change it. Could the text also give the current state, or clarify this somehow?

aspiers avatar Oct 03 '16 08:10 aspiers

Ok, the current state is now visible.

Eventually, I'd like to change out the prompt for a modal window with a select and number input similar to what I have set up for Octopatcher, but without the "Enabled" checkbox:

content-collapse

Mottie avatar Oct 03 '16 14:10 Mottie