Page MenuHomePhabricator

Minor issues with 'mediawiki.checkboxtoggle' module
Closed, ResolvedPublic

Description

Landed in:

Issues:

  • In its current state, it should not run immediately on module load, but ensure dom-ready has happened. Especially because it has position=top.
  • Should not need "top" load position.
  • More generally, it might make sense to expose in a more re-usable way that is explicitly called from something like mediawiki.special.log.

When adding the caller (e.g. mediawiki.special.log), perhaps the method can be moved to an existing module and mediawiki.checkboxtoggle removed. We have two related modules:

  • mediawiki.htmlform
  • jquery.checkboxShiftClick

See mediawiki.special.changeslist.legend.js for an example where a generic module (jquery.makeCollapsible) is used for a specific caller.

These would also restore the semantic compatibility of e.g. loading Special:Log via JavaScript and be able to initialise the same state on those elements (without relying on load order).

Event Timeline

Krinkle created this task.Mar 30 2016, 9:50 PM
Restricted Application added a subscriber: JEumerus. · View Herald TranscriptMar 30 2016, 9:50 PM
lfaraone added a subscriber: lfaraone.
demon added a subscriber: demon.May 31 2016, 3:57 PM

@Krinkle Any updates on this?

Change 293533 had a related patch set uploaded (by Legoktm):
Remove position=top from 'mediawiki.checkboxtoggle'

https://gerrit.wikimedia.org/r/293533

Change 293534 had a related patch set uploaded (by Legoktm):
mediawiki.checkboxtoggle: Run after document ready

https://gerrit.wikimedia.org/r/293534

I submitted patches for the first two issues, but I don't think I'll have time to work on the last one in time for 1.27, sorry :/

Change 293538 had a related patch set uploaded (by Krinkle):
mediawiki.checkboxtoggle: Remove position=top

https://gerrit.wikimedia.org/r/293538

Change 293533 merged by jenkins-bot:
mediawiki.checkboxtoggle: Remove position=top

https://gerrit.wikimedia.org/r/293533

Change 293534 merged by jenkins-bot:
mediawiki.checkboxtoggle: Run after document ready

https://gerrit.wikimedia.org/r/293534

Change 293538 merged by jenkins-bot:
mediawiki.checkboxtoggle: Remove position=top

https://gerrit.wikimedia.org/r/293538

Change 293545 had a related patch set uploaded (by Krinkle):
mediawiki.checkboxtoggle: Run after document ready

https://gerrit.wikimedia.org/r/293545

Change 293545 merged by jenkins-bot:
mediawiki.checkboxtoggle: Run after document ready

https://gerrit.wikimedia.org/r/293545

demon added a comment.Jun 10 2016, 4:07 PM

This was backported, can we resolve?

There's still the third bullet point of making the module more reusable (I only fixed the first two)...I'll leave it up to Krinkle on whether he considers that to be a release blocker.

Change 294113 had a related patch set uploaded (by Krinkle):
mediawiki.checkboxtoggle: Fix minor issues.

https://gerrit.wikimedia.org/r/294113

Change 294113 merged by jenkins-bot:
mediawiki.checkboxtoggle: Fix minor issues.

https://gerrit.wikimedia.org/r/294113

Change 294119 had a related patch set uploaded (by Jforrester):
mediawiki.checkboxtoggle: Fix minor issues.

https://gerrit.wikimedia.org/r/294119

Change 294119 merged by jenkins-bot:
mediawiki.checkboxtoggle: Fix minor issues.

https://gerrit.wikimedia.org/r/294119

demon closed this task as Resolved.Jun 13 2016, 11:17 PM