https://bugzilla.wikimedia.org/show_bug.cgi?id=45574

--- Comment #2 from MZMcBride <[email protected]> ---
From bug 27488 comment 75:

---
Um, gadgets used to load from the head. This is a feature we had before, and it
was then removed. Gadgets (and scripts in general) being moved to a position
where everything done is delayed caused many significant problems. I assume
that the benefits of these actions made them make sense overall, but gadgets
are rather important to many wikis, and I'm not sure that inadvertently
impairing them and then generally ending maintaining/fixing resulting issues
because of a possible distant-future replacement is completely appropriate. I
suppose if no one has the time to devote to this bug in particular to due more
pressing/important issues, all the resulting problems will just have to wait
however many months or years until 2.0 is ready, but I don't agree that
"feature requests" like this on lost features should just be ignored as a rule,
hm?
---

From bug 27488 comment 76 and bug 27488 comment 77:

---
Yair, it won't be years until Gadgets 2.0 is out.  Like Krinkle, I don't know a
clean way (without breaking backwards compatibility) to do this in the current
implementation.  When 2.0 comes out, it should be up to the gadget, like it is
for regular ResourceLoader modules
(https://www.mediawiki.org/wiki/Manual:$wgResourceModules).

In the meantime, I don't see why TabbedLanguages *has* to be loaded from the
top.  The DOM, CSS, and cookies all provide full read-write access at the
bottom.  The only thing you can't do is document.write.

You may get certain UX benefits from doing it at the top, but it's not
impossible to make a working gadget now.

Also, I forgot to note, the version at
https://en.wiktionary.org/wiki/MediaWiki:Gadget-TabbedLanguages.js does not use
document.write.
---

From bug 27488 comment 78:

---
The gadget needs to have the styles run before the body starts loading, and it
needs to be disableable for non-logged-in users. The only way to do that is to
have the script itself check for a cookie, and set up styles depending on its
contents.
---

From bug 27488 comment 79:

---
Are you trying to load the styles before the body to avoid a flash of unstyled
content?  I agree that's annoying, but the flash should be brief, so that's not
necessarily a blocker.

There is nothing position-related about the cookies.  They can be manipulated
from either place.
---

From bug 27488 comment 80:

---
The unstyled content means that the entire page is essentially unusable, until
the script runs. The community has made it clear that that is not acceptable,
which is why we've been waiting until this bug is fixed.
---

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to