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: Reorganize messages object, should make it more clear to maintain #592

Merged
merged 1 commit into from
May 15, 2019

Conversation

Amorymeltzer
Copy link
Collaborator

@Amorymeltzer Amorymeltzer commented Apr 24, 2019

Setting it up this way means there is even more of a difference between the scaled levels (level2, level4im, etc.) and singlenotice/singlewarning/custom,
but doing so should make it very straightforward to remove or add templates (pursuant to any discussion in #533).

The only change to the enduser is that this will now generate a submenu category for every grouping, even if there are no templates in that group at that level. At the moment, this is only the 4im level for the "Removal of deletion tags" category. I'm not sure this is a bad thing.

One header was mistmatched ('other editors' versus 'other users'), resolves that.


Draft for reviewing and feedback as I think this will be helpful, but I'm not sure!

  • I whipped up some perl (procjson.pl) to handle most of the processing, in case anyone wants to check it out.
  • Some processing of the level value is needed to build the templates, this seems simpler than providing an optional parameter to createEntries
  • As noted above, the current structure creates an empty group in the 4im menu for "Removal of deletion tags" whereas the old system didn't. I don't think this is too bad, if bad at all, but it should be the only visible change to Twinkle users.

@Amorymeltzer Amorymeltzer marked this pull request as ready for review April 29, 2019 19:58
@Amorymeltzer Amorymeltzer added this to the June update milestone May 5, 2019
Setting it up this way means there is even more of a difference between the scaled levels (level2, level4im, etc.) and singlenotice/singlewarning/custom,
but doing so should make it very straightforward to remove or add templates (pursuant to any discussion in wikimedia-gadgets#533).

The only change to the enduser is that this will now generate a submenu category for every grouping, even if there are no templates in that group at that level.  At the moment, this is only the `4im` level for the "Removal of deletion tags" category.  I'm not sure this is a bad thing.

One header was mistmatched ('other editors' versus 'other users'), resolves that.
@Amorymeltzer Amorymeltzer merged commit 41ab010 into wikimedia-gadgets:master May 15, 2019
Amorymeltzer added a commit to Amorymeltzer/twinkle that referenced this pull request Nov 29, 2019
Mentioned in wikimedia-gadgets#673 (comment).  While this makes use of 10 for `defaultWarningGroup`, I considered reusing 8, which was until the addition of the block module in wikimedia-gadgets#260 (well, also 430e225) reserved for sysops to select blocking templates, to cut down on bloat.  There are a handful of users, some still active sysops, with the option set, but while that's a trivial barrier, I think it's better list it below the individual items, reinforcing the "all-of-the-above"-ness of the option.

This also tweaks the process by which `twinklewarn` tries to select the template that corresponds to what was selected in the previous menu.  As it has every item, the new kitchensink menu should always match exactly, but since the process was previously only relevant for levels 1-4im, the highest level would always be selected upon moving to the kitchensink menu (i.e., vandalism1 -> vandalism4im).  Now, in addition to doing an exact match in the kitchensink, it also won't keep searching once it has found the match.  Part of this is from wikimedia-gadgets#592.

Also removed a comment made incorrect by wikimedia-gadgets#641.
@Amorymeltzer Amorymeltzer mentioned this pull request Nov 29, 2019
Amorymeltzer added a commit to Amorymeltzer/twinkle that referenced this pull request Nov 29, 2019
Mentioned by me in wikimedia-gadgets#673 (comment).  While this makes use of `defaultWarningGroup = 10`, I considered reusing 8, which was until the addition of the block module in wikimedia-gadgets#260 (well, also 430e225) reserved for sysops to select blocking templates, to cut down on bloat.  There are a handful of users, some still active sysops, with the option set, but while that's a trivial barrier, I think it's better list it below the individual items, reinforcing the "all-of-the-above"-ness of the option, as well as not relying other projects to do the same thing.  Unlike the combined singlet menu from wikimedia-gadgets#759, this menu is not sorted: I thought it'd be clearer for folks to have a progression rather than all the groups clumped together, to take advantage of the quickFilter.

This also tweaks the process by which `twinklewarn` tries to select the template that corresponds to what was selected in the previous menu.  As it contains every item, this new `kitchensink` menu should always match exactly, but the previous process kept searching once a match was found.  This wasn't an issue since this was only relevant for levels 1-4im where only the correct match could be found, but here it meant that the highest level warning would always be selected upon moving to the kitchensink menu (i.e., vandalism1 -> vandalism4im).  Now, in addition to doing an exact match in the kitchensink, it also won't keep searching once it has found the match.  Part of this is as a result of my work in wikimedia-gadgets#592.  There's also a tweak to how the combined singlet menu from wikimedia-gadgets#759 is sorted; it now selects either the previously selected option (if going from kitchensink->singletcombined, just like for other menu changes), or the top option if the previous value is not present (level2->singletcombined, as in wikimedia-gadgets#759).

I also removed a comment made incorrect by wikimedia-gadgets#641.
Amorymeltzer added a commit to Amorymeltzer/twinkle that referenced this pull request Dec 1, 2019
Mentioned by me in wikimedia-gadgets#673 (comment).  While this makes use of `defaultWarningGroup = 10`, I considered reusing 8, which was until the addition of the block module in wikimedia-gadgets#260 (well, also 430e225) reserved for sysops to select blocking templates, to cut down on bloat.  There are a handful of users, some still active sysops, with the option set, but while that's a trivial barrier, I think it's better list it below the individual items, reinforcing the "all-of-the-above"-ness of the option, as well as not relying other projects to do the same thing.  Unlike the combined singlet menu from wikimedia-gadgets#759, this menu is not sorted: I thought it'd be clearer for folks to have a progression rather than all the groups clumped together, to take advantage of the quickFilter.

This also tweaks the process by which `twinklewarn` tries to select the template that corresponds to what was selected in the previous menu.  As it contains every item, this new `kitchensink` menu should always match exactly, but the previous process kept searching once a match was found.  This wasn't an issue since this was only relevant for levels 1-4im where only the correct match could be found, but here it meant that the highest level warning would always be selected upon moving to the kitchensink menu (i.e., vandalism1 -> vandalism4im).  Now, in addition to doing an exact match in the kitchensink, it also won't keep searching once it has found the match.  Part of this is as a result of my work in wikimedia-gadgets#592.  There's also a tweak to how the combined singlet menu from wikimedia-gadgets#759 is sorted; it now selects either the previously selected option (if going from kitchensink->singletcombined, just like for other menu changes), or the top option if the previous value is not present (level2->singletcombined, as in wikimedia-gadgets#759).

I also removed a comment made incorrect by wikimedia-gadgets#641.
Amorymeltzer added a commit to Amorymeltzer/twinkle that referenced this pull request Dec 23, 2019
Mentioned by me in wikimedia-gadgets#673 (comment).  While this makes use of `defaultWarningGroup = 10`, I considered reusing 8, which was until the addition of the block module in wikimedia-gadgets#260 (well, also 430e225) reserved for sysops to select blocking templates, to cut down on bloat.  There are a handful of users, some still active sysops, with the option set, but while that's a trivial barrier, I think it's better list it below the individual items, reinforcing the "all-of-the-above"-ness of the option, as well as not relying other projects to do the same thing.  Unlike the combined singlet menu from wikimedia-gadgets#759, this menu is not sorted: I thought it'd be clearer for folks to have a progression rather than all the groups clumped together, to take advantage of the quickFilter.

This also tweaks the process by which `twinklewarn` tries to select the template that corresponds to what was selected in the previous menu.  As it contains every item, this new `kitchensink` menu should always match exactly, but the previous process kept searching once a match was found.  This wasn't an issue since this was only relevant for levels 1-4im where only the correct match could be found, but here it meant that the highest level warning would always be selected upon moving to the kitchensink menu (i.e., vandalism1 -> vandalism4im).  Now, in addition to doing an exact match in the kitchensink, it also won't keep searching once it has found the match.  Part of this is as a result of my work in wikimedia-gadgets#592.  There's also a tweak to how the combined singlet menu from wikimedia-gadgets#759 is sorted; it now selects either the previously selected option (if going from kitchensink->singletcombined, just like for other menu changes), or the top option if the previous value is not present (level2->singletcombined, as in wikimedia-gadgets#759).

I also removed a comment made incorrect by wikimedia-gadgets#641.
Amorymeltzer added a commit to Amorymeltzer/twinkle that referenced this pull request Jan 7, 2020
Mentioned by me in wikimedia-gadgets#673 (comment).  While this makes use of `defaultWarningGroup = 10`, I considered reusing 8, which was until the addition of the block module in wikimedia-gadgets#260 (well, also 430e225) reserved for sysops to select blocking templates, to cut down on bloat.  There are a handful of users, some still active sysops, with the option set, but while that's a trivial barrier, I think it's better list it below the individual items, reinforcing the "all-of-the-above"-ness of the option, as well as not relying other projects to do the same thing.  Unlike the combined singlet menu from wikimedia-gadgets#759, this menu is not sorted: I thought it'd be clearer for folks to have a progression rather than all the groups clumped together, to take advantage of the quickFilter.

This also tweaks the process by which `twinklewarn` tries to select the template that corresponds to what was selected in the previous menu.  As it contains every item, this new `kitchensink` menu should always match exactly, but the previous process kept searching once a match was found.  This wasn't an issue since this was only relevant for levels 1-4im where only the correct match could be found, but here it meant that the highest level warning would always be selected upon moving to the kitchensink menu (i.e., vandalism1 -> vandalism4im).  Now, in addition to doing an exact match in the kitchensink, it also won't keep searching once it has found the match.  Part of this is as a result of my work in wikimedia-gadgets#592.  There's also a tweak to how the combined singlet menu from wikimedia-gadgets#759 is sorted; it now selects either the previously selected option (if going from kitchensink->singletcombined, just like for other menu changes), or the top option if the previous value is not present (level2->singletcombined, as in wikimedia-gadgets#759).

I also removed a comment made incorrect by wikimedia-gadgets#641.
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