gwtproject / gwt

GWT Open Source Project
http://www.gwtproject.org
1.51k stars 373 forks source link

Element.hasClassName conflicts with XElement.hasClassName in Sencha GXT #8201

Closed dankurka closed 9 years ago

dankurka commented 9 years ago

Originally reported on Google Code with ID 8211

On trunk we recently added [1] Element.hasClassName which is final and conflicts with
Sencha's XElement.hasClassName(). We fixed this at Google by patching GXT. We should
probably talk to Sencha about how to handle this for the GWT 2.6 release.

[1] https://gwt-review.googlesource.com/#/c/3070/

Reported by skybrian@google.com on 2013-06-19 19:47:54

dankurka commented 9 years ago

Reported by goktug@google.com on 2013-06-19 20:06:12

dankurka commented 9 years ago
We have a patch being reviewed that will remove both XElement.hasClassName and XElement.toggleClassName
(another new final method to be added in Element that is also in XElement). The hasClassName
has been moved to a static method so that internal code can still use it until a new
official GWT release is cut that we can build against, while all toggleElement callsites
have been removed.

The hasClassName is in use in about a dozen places across the library, and both are
public methods, so they can't simply be removed in 3.0 without causing breaking changes
in downstream code. The 3.0 release is explicitly compatible with GWT 2.4 - GXT 3.1
will move the minimum version to at least GWT 2.5.1 if 2.6 hasn't been released by
the time 3.1 is ready. If 2.6 has been released by then, we'll move to that as the
minimum GWT version, and remove the static method.

In the meantime, while the implementation in Element differs from that in XElement,
they should be compatible, so for projects affected by this, modifying either Element
or XElement should be a valid workaround. That's about the best we can do with breaking
changes like this without introducing our own breakage for users still using GWT 2.4.0-2.5.1.

Reported by niloc132 on 2013-06-19 20:56:12

dankurka commented 9 years ago

Reported by t.broyer on 2013-06-19 22:16:40

dankurka commented 9 years ago
Change (toggleClassName only) is noted in release notes, and Sencha has a (pre?)release
with the fix.

Reported by t.broyer on 2014-04-06 22:29:03