backdrop / backdrop-issues

Issue tracker for Backdrop core.
144 stars 40 forks source link

[DX] Introduce a new, optional property in .info files, to allow contrib projects to specify minimum jQuery version requirement #6533

Open klonos opened 4 months ago

klonos commented 4 months ago

This is a follow-up to #3106 and #6404.

I don't think that we should be necessarily blocking the installation of these projects (should we?) - we could be adding a warning in the status page instead, and/or perhaps to the module configuration form if it provides one.

PS: We should update the list of properties in https://docs.backdropcms.org/creating-modules when this is added.

indigoxela commented 4 months ago

...minimum jQuery version requirement

Shouldn't that have been "maximum"? :wink:

From a maintainer perspective: If I knew, that my project isn't compatible with jQuery 3 (or 4), I'd rather fix that, than adding a new property, that just indicates, that my project needs work. Both, figuring out compatibility and fixing compatibility is effort. An IMO the effort's better spent on fixing. But that's just my 2c.

The current situation is, that most module maintainers probably aren't aware of (or unsure about) the jQuery version, their project is (in-)compatible with.

klonos commented 4 months ago

Shouldn't that have been "maximum"? 😉

Both actually I think. Same as with the dependencies[] property. You might have modules that are not built to work with functions/features introduced only in newer versions of jQuery, and others that are not supporting the use of deprecated functions/features that only existed in older versions of jQuery.

... I'd rather fix that, than adding a new property, that just indicates, that my project needs work. Both, figuring out compatibility and fixing compatibility is effort. An IMO the effort's better spent on fixing.

That can be said about everything, including compatibility with PHP versions, other module versions etc. Yet, we have properties like dependencies[] and php. Fixing things usually takes way longer than adding a line in a .info file and creating a release, and in the meantime you don't want to allow people to run code that you know will break their sites.

indigoxela commented 4 months ago

I don't think, it's the same as dependencies or php in the info file.

The jQuery version is an admin setting via UI and can change any time. I don't think we could or should handle that like a dependency. I get what you're trying to achieve, but I doubt, it can be achieved that way.

klonos commented 4 months ago

... I get what you're trying to achieve, but I doubt, it can be achieved that way.

Any suggestions for alternatives then?

indigoxela commented 4 months ago

Any suggestions for alternatives then?

Not actually, but I didn't open this issue. :wink: Just wanted to point out some culprits.

What I can offer is to report and provide PRs to contrib projects, whenever I find a compatibility problem. But that has nothing to do with core and is best practice in Open Source, anyway. :grinning:

avpaderno commented 4 months ago

IMO, a property that allows to define the jQuery version with which a module is compatible is not different from the existing property for the PHP version. The only difference is that the latter is a property that Backdrop supported by the beginning, while the property proposed here has never been used before. It could take time before modules start to use it.

avpaderno commented 4 months ago

Knowing how much sites use jQuery 3 could probably help in taking a decision here, even if the decision would be to postpone this issue.

klonos commented 4 months ago

Knowing how much sites use jQuery 3 could probably help in taking a decision here...

6537 😉