Tryton - Issues

 

Issue5925

Title Update sao to work with jquery3
Priority feature Status resolved
Superseder Implicit tbody, Missing callback bind in One2Many._set_value, current_record not defined in Wizard.update
View: 7209, 7206, 7210
Nosy List Timitos, ced, pokoli, reviewbot, roundup-bot, yangoon
Type feature request Components sao
Assigned To ced Keywords review
Reviews 36011002
View: 36011002

Created on 2016-10-03.16:09:27 by yangoon, last changed by roundup-bot.

Messages
New changeset 8cd22cf6d0d5 by Cédric Krier in branch 'default':
Update to jQuery 3
http://hg.tryton.org/sao/rev/8cd22cf6d0d5
review36011002 updated at https://codereview.tryton.org/36011002/#ps20001
msg38883 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-03-09.09:22:14
> There are some changes needed. I'm thinking about creating separate issue for each one because some are indeed issue which are not detected with jQuery2.

If some of this issues are bugs and should be backported to older versions I think we must create a separate issue and fix the issue for released versions.
review36011002 updated at https://codereview.tryton.org/36011002/#ps1
msg38881 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-03-09.02:11:44
Here is review36011002 which should allow to use jQuery3.
There are some changes needed. I'm thinking about creating separate issue for each one because some are indeed issue which are not detected with jQuery2.
msg38389 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-02-15.23:25:34
I forgot to put the link to Bootstrap 3 supporting jQuery 3: https://github.com/twbs/bootstrap/issues/16834
msg38388 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-02-15.23:16:20
jQuery 2.x is no more supported now. I could not find the announce but it is stated on the website: https://jquery.com/
I also found that latest Bootstrap v3 release have been fixed to work with jQuery 3.x
So I guess it is time to upgrade.
msg30175 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2016-11-03.17:54:11
Even if bootstrap-3.3.7 works with jQuery-3, it does not mean that sao will work with jQuery-3. I strongly discourage to package sao with dependencies that does not respect the declaration. In such case, we will have to reject any issue submitted which uses the wrong dependencies.
msg30167 (view) Author: [hidden] (yangoon) Date: 2016-11-03.17:35:42
Hi Sergi, thanks a lot for having a look at it!

> Sergi Almacellas Abellana <sergi@koolpi.com> added the comment:
> 
> I just give a quick test on the jQuery migrate plugin and jQuery3. After
> loading the login page I get the following error on the console: 
> 
> Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but
> lower than version 3
> 
> So current bootstrap version is not compatible with jQuery3 and for what I
> see in [1] bootstrap won't support jQuery3 until version 4, so we must
> migrate the botstrap library to version4 which is still in alpha [2]

I followed up on Debian and was told, that bootstrap 3.3.7 (which is for some days in testing [1]) supports jquery3.

As the versioned dependencies just were changed in sao trunk to disregard minor versions, bootstrap should upgrade anyway to at least that version. Could you perhaps run your quick test with upgraded bootstrap again?

Thanks,
Mathias


[1] https://tracker.debian.org/pkg/twitter-bootstrap3
msg30147 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2016-11-02.15:41:42
@yangoon as you were asking for advice, I suggest you to create a Debian package jquery2 that will install jquery-2.* in /usr/share/javascript/jquery-2/
msg30146 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2016-11-02.15:31:50
I just give a quick test on the jQuery migrate plugin and jQuery3. After loading the login page I get the following error on the console: 

Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3

So current bootstrap version is not compatible with jQuery3 and for what I see in [1] bootstrap won't support jQuery3 until version 4, so we must migrate the botstrap library to version4 which is still in alpha [2]

So for me, we should not do anything until all the libraries have stable support of jQuery3. 



[1] https://github.com/twbs/bootstrap/issues/19433
[2] http://blog.getbootstrap.com/2016/10/19/bootstrap-4-alpha-5/
msg30145 (view) Author: [hidden] (yangoon) Date: 2016-11-02.14:43:01
> Korbinian Preisler <Timitos@virtual-things.biz> added the comment:
> 
> there is already an issue about that:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680282
> 
> But it does not look like there is much interest in solving this issue

Call it interest or call it manpower. As usual everyone is invited to contribute.
msg30144 (view) Author: [hidden] (yangoon) Date: 2016-11-02.14:38:53
* Cédric Krier: " [issue5925] Please update sao to work with jquery3" (Wed, 02
  Nov 2016 13:48:33 +0100):

> Cédric Krier <cedric.krier@b2ck.com> added the comment:
> 
> Ask Debian to support multiple versions of library. This is crazy for a
> distribution to require softwares to migrate to a new major library in few
> months.

Debian has limited resources and the support of multiple versions of jquery so
far seems not to be an option.

NB: Debian tries to support releases security-wise for at least 5 years [0],
which is quite a challenging task.

Reading the relevant threads gives me the impression, that there could be evtl.
quite few changes to be done in sao. At least it seems that the removed APIs
are deprecated since quite a long time. So it would rather be a move to a
more sane code...


From [1]:

> jQuery 3.x is supposed to be mostly backwards compatible with 1.x,
> however there a few breaking changes such as removal of APIs that were
> already marked as deprecated in 1.x, and change of behaviour on edge
> cases.
> 
> jQuery 3.0 was release back in June, so in principle affected upstreams
> had at least a few months to deal with any fallout. If that's not the
> case, you can refer upstream to this upgrade guide, which documents the
> details:
>
> https://jquery.com/upgrade-guide/3.0/

and from [2]:

> Despite the 3.0 version number, we anticipate that these releases shouldn’t
> be too much trouble when it comes to upgrading existing code. Yes, there are
> a few “breaking changes” that justified the major version bump, but we’re
> hopeful the breakage doesn’t actually affect that many people.
> 
> To assist with upgrading, we have a brand new 3.0 Upgrade Guide. And the
> jQuery Migrate 3.0 plugin will help you to identify compatibility issues in
> your code. Your feedback on the changes will help us greatly, so please try
> it out on your existing code and plugins!


[0] https://wiki.debian.org/LTS
[1]
http://lists.alioth.debian.org/pipermail/pkg-javascript-devel/2016-October/014470.html
[2] https://blog.jquery.com/2016/06/09/jquery-3-0-final-released/



-- 

    Mathias Behrle
    MBSolutions
    Gilgenmatten 10 A
    D-79114 Freiburg

    Tel: +49(761)471023
    Fax: +49(761)4770816
    http://www.m9s.biz
    UStIdNr: DE 142009020
    PGP/GnuPG key availabable from any keyserver, ID: 0xD6D09BE48405BBF6
    AC29 7E5C 46B9 D0B6 1C71  7681 D6D0 9BE4 8405 BBF6
msg30142 (view) Author: [hidden] (Timitos) Date: 2016-11-02.14:03:14
there is already an issue about that:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680282

But it does not look like there is much interest in solving this issue
msg30141 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2016-11-02.13:48:33
Ask Debian to support multiple versions of library. This is crazy for a distribution to require softwares to migrate to a new major library in few months.
msg30140 (view) Author: [hidden] (yangoon) Date: 2016-11-02.13:40:45
JFTR: jquery3 just hit Debian testing (https://packages.qa.debian.org/j/jquery.html) and thus will be part of stretch (next stable with freeze beginning 2016-12-05).

As a consequence (wrt Debian) sao can only be part of next stable if it supports jquery3 (or if there is a maintainable, not too complicated patchset). Otherwise I will have to remove the current package in NEW (https://ftp-master.debian.org/new/tryton-sao_4.0.5-1.html).

Please give advice on how to proceed.
msg29150 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2016-10-03.16:42:23
I think it is a little bit too early to think about jQuery-3, it was released only 4 months ago and jQuery-2 is still well maintained (jQuery-1 is even still).
msg29149 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2016-10-03.16:13:50
Here is the upgrade guide: 

https://jquery.com/upgrade-guide/3.0/
msg29148 (view) Author: [hidden] (yangoon) Date: 2016-10-03.16:13:29
https://bugs.tryton.org/issue5925
msg29147 (view) Author: [hidden] (yangoon) Date: 2016-10-03.16:09:27
Currently sao doesn't work with jquery3, i.e. the initial Database selection box doesn't show.
History
Date User Action Args
2018-03-19 16:09:11roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg39094
2018-03-15 10:28:54cedsettitle: Please update sao to work with jquery3 -> Update sao to work with jquery3
2018-03-15 01:22:44reviewbotsetmessages: + msg39012
2018-03-09 19:06:10cedsetsuperseder: + current_record not defined in Wizard.update
2018-03-09 19:01:24cedsetsuperseder: + Implicit tbody
2018-03-09 18:47:37cedsetsuperseder: + Missing callback bind in One2Many._set_value
2018-03-09 09:22:14pokolisetmessages: + msg38883
2018-03-09 02:18:55reviewbotsetnosy: + reviewbot
messages: + msg38882
2018-03-09 02:11:44cedsetstatus: chatting -> testing
reviews: 36011002
messages: + msg38881
keyword: + review
assignedto: ced
2018-02-15 23:25:35cedsetmessages: + msg38389

Showing 10 items. Show all history (warning: this could be VERY long)