Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warn: make jquery.chosen based menu optional, via-opt-out #661

Merged
merged 1 commit into from
Jun 6, 2019

Conversation

siddharthvp
Copy link
Member

@siddharthvp siddharthvp commented Jun 6, 2019

Per discussion at [[Wikipedia_talk:Twinkle#User_warning_dialog_dropdown_selector]]

The reason some folks don't like this is because chosen makes the select menu much less denser, requiring more scrolling to get to the templates, and this also seems to give undue focus to {{uw- part of the templates.

Per discussion at [[Wikipedia_talk:Twinkle#User_warning_dialog_dropdown_selector]]
@Amorymeltzer
Copy link
Collaborator

Thoughts on making it opt-in rather than opt-out?

@siddharthvp
Copy link
Member Author

I guess only the old hands, who are used to their ways, aren't liking it. New users should love it. I think it's better to keep it opt-out.

@Amorymeltzer
Copy link
Collaborator

@siddharthvp Issue there is that the old hands are the ones doing the majority of warnings and using Twinkle.

@siddharthvp
Copy link
Member Author

siddharthvp commented Jun 6, 2019

Issue there is that the old hands are the ones doing the majority of warnings and using Twinkle.

Not inherently opposed, but its rather silly to have the feature-rich version off by default. I don't know, it gets tough to decide things between us. Can others who are watching pitch in? Or should we open a discussion on this at WT:TW?

Density could also be achieved with some simple CSS inre padding

Cool, have you tried that?

@Amorymeltzer
Copy link
Collaborator

Amorymeltzer commented Jun 6, 2019

We've had only two folks with complaints, and I've got at least two on IRC who are all for it, so I'll hold off a bit to see if there's more input, but I'm leaning toward opt-out of the new style as well. With a section at WT:TW and a linked comment at WP:VPT it should get noticed.

ETA: three, two of which seem fine with opt-out

@siddharthvp
Copy link
Member Author

Density could also be achieved with some simple CSS inre padding

I was playing around with that. See https://ibb.co/PT8b63Z. Removed the padding entirely off the top and bottom of the li elements. This looks much better and non-OOUI like, and may probably avoid the need to make the thing opt-out. Most people, including me, hate OOUI styles anyway.

The trouble is the result was obtained by removing padding from chrome devtool's styles menu. I have no idea how to get that using code. I have wasted quite a silly amount of time trying it out with no success. Neither $('.chosen-container .chosen-results li').css({'padding-top': '0px', 'padding-bottom': '0px'}); nor mw.util.addCSS('.chosen-container .chosen-results li { padding-top: 0px !important; padding-bottom: 0px !important; }'); seems to work. Wanna have a go at it?

@Amorymeltzer
Copy link
Collaborator

Amorymeltzer commented Jun 6, 2019

Yeah, I think I spoke too soon? I came up against the same thing as well. Even tried using .on to no avail. Got nowhere. I have managed to reproducibly crash devtools, so that's something!

This looks much better and non-OOUI like... Most people, including me, hate OOUI styles anyway.

Preach.

@Amorymeltzer Amorymeltzer changed the title warn: make jquery.chosen based menu optional warn: make jquery.chosen based menu optional, via-opt-out Jun 6, 2019
@Amorymeltzer
Copy link
Collaborator

No more input so gonna go ahead and merge this. Thanks for being so quick on this @siddharthvp; it's not an ideal solution but so be it.

@Amorymeltzer Amorymeltzer merged commit a9e03f1 into wikimedia-gadgets:master Jun 6, 2019
@Amorymeltzer Amorymeltzer added this to the July 2019 update milestone Jun 6, 2019
Amorymeltzer added a commit to Amorymeltzer/twinkle that referenced this pull request Jun 6, 2019
Closes wikimedia-gadgets#659.  Changing selection from a `jquery.chosen` menu doesn't trigger `change_subcategory` since the event was attached to the original select.  We still need the extra `Twinkle.warn.callback.change_subcategory(e)` call from wikimedia-gadgets#432 to update display on simply `change_category` as well as the original, initial event in `sub_group` for users who opt-out of the new `jquery.chosen` display (wikimedia-gadgets#661)
@siddharthvp siddharthvp deleted the chosen-optional branch October 22, 2020 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants