https://bugzilla.wikimedia.org/show_bug.cgi?id=39699
--- Comment #4 from Krinkle <[email protected]> 2012-08-27 21:32:49 UTC --- Fair enough, but there's lots of paths to take. But using jsMessage for it is not one of them imho. If the goal is really to have it be on top of the page (which I imagine can actually be unexpected if one wants to read the original text since one'd have to scroll back and forth when the form is on top of the page) - then simply prepend it to the top of the page (mw.util.$content.prepend()), no need for jsMessage for that. Also when using jsMessage there is another problem. I wonder why that never caused a problem for those 146 scripts (or it has, but nobody cared to fix it). Namely the fact that it the old jsMsg always replaced what was there. So when any other gadget, extension or core script emits a message, the form will vanish without mercy. That'is a bad thing, and one of the many reasons why jsMsg is not at all a good way to display a form for user input. Possibilities: * That the $form, perhaps wrap it (while at it) in a <fieldset> with descriptive <legend>, prepend it to mw.util.$content. * Display it inline * Use jQuery ui .dialog() - either on top of the page, or in place where the page scroll is currently at (even possible to not dim the background, which you don't want if the page should remain visible). * In the sidebar * with jsMessage and autoHide: false * lots of possibilities. Even if we would keep the deprecated jsMsg() as it was, how long would we keep it deprecated? It has already been deprecated for almost 2 years (MediaWiki 1.17). And aside from being deprecated, it was never documented as being a way to put content on top of the page. It is a way to notify the user about interactive state. Although it does work to put something generic on top the page, even for that it was never reliable because it always replaced the previous message. Looking at a few of those 146 scripts on en.wikipedia: * I see about half a dozen scripts that are full of syntax errors and don't even work. Such as: jsMsg(A test message called hopefully by Initiating Edit mode,) > Unexpected identifier at " test" * Many that haven't been updated in 5+ years, and probably never will be updated no matter how many years of deprecation and migration announcements there will be - until they break visibly. * Fortunately the fast majority is actually correct and proper usage: Displaying a brief message to the user. * Many are exact duplicates where users copied a script instead of importing it, so they likely know every little (if anything) about how javascript works and the author of the script may or may not be aware of the fact that users copied it. That is the mess we are dealing with as a result of ~ 7 years of crappy undocumented legacy scripts and there is a point were we started over with many of them. Most of that happened in 2010 with ResourceLoader, jQuery etc. in MediaWiki 1.17 and now with jsMessage. I'm more than willing to help anyone find a good alternative while at the same time making other improvements. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
