Skip to content

Conversation

@andruhon
Copy link
Contributor

Continuing discussion about converting wicket-ajax-jquery.js into TypeScript.

Finally I reached the stage when all tests passing and I can run ajax section in wicket examples, so I decided to create a proper PR to continue discussion.

I created some utility objects as "modules" which which means they may not be mutated on runtime (transpiled with Object.freeze):
Wicket.Class
Wicket.DOM
Wicket.Xml
Wicket.Form
Wicket.Head
Wicket.Head.Contributor

I'm not sure if it's correct, please let me know if you think that these modules should be converted into classes with static methods or simply into JS objects.

@martin-g
Copy link
Member

I am +1 to make these changes!
But we should apply the changes from #359

@andruhon
Copy link
Contributor Author

Another important point to discuss is a format. The IIFE is currently configured is good to make it compatible with Wicket 8 stuff. Essentially what I have here supposed to be a drop in replacement of existing wicket-modal-jquery, and could potentially be backported to Wicket 8.

I think for future Wicket releases we can consider other options such as AMD, UMD or CommonJS, or make to have a few JS files built in and allow end developers to pick whichever is more convenient for them.

@martin-g
Copy link
Member

I think for future Wicket releases we can consider other options such as AMD, UMD or CommonJS

I do not see a reason for this. No one ever asked for any of those. Let's not over-engineer it for no reason.

P.S. ... and I believe the future is in ESM. Even Node.js added support for it in v12

@andruhon
Copy link
Contributor Author

It seems to work pretty well. Should I continue and try adding a WICKET-6667 #359 into this one?

@martin-g
Copy link
Member

martin-g commented May 17, 2019 via email

@andruhon
Copy link
Contributor Author

dev@

@martin-g do you refer to the dev@wicket.apache.org mail list?

@ivaynberg
Copy link
Contributor

i am +1 on this as long as it is committed in such a way that git log --follow will stick pick up the history of the old js files..

@andreikondratev
Copy link
Contributor

@ivaynberg It's achevable.

I can do it with moving and merging back which will lead to a bunch of commits for each ts file in the history. Please let me know if you think it's going to be a problem or you know a better way.

Split history wicket-ajax-jquery.js to Event.ts Andrew Kondratev 17/05/2019 14:33
Split history wicket-ajax-jquery.js to Event.ts Andrew Kondratev 17/05/2019 14:33
Split history wicket-ajax-jquery.js to Event.ts Andrew Kondratev 17/05/2019 14:33
Split history wicket-ajax-jquery.js to Event.ts Andrew Kondratev 17/05/2019 14:33
Split history wicket-ajax-jquery.js to Ajax.ts Andrew Kondratev 17/05/2019 14:33
Split history wicket-ajax-jquery.js to Ajax.ts Andrew Kondratev 17/05/2019 14:33
Split history wicket-ajax-jquery.js to Ajax.ts Andrew Kondratev 17/05/2019 14:33
Split history wicket-ajax-jquery.js to Ajax.ts Andrew Kondratev 17/05/2019 14:33
Split history wicket-ajax-jquery.js to Wicket.ts Andrew Kondratev 17/05/2019 14:33
Split history wicket-ajax-jquery.js to Wicket.ts Andrew Kondratev 17/05/2019 14:33
Split history wicket-ajax-jquery.js to Wicket.ts Andrew Kondratev 17/05/2019 14:33
Split history wicket-ajax-jquery.js to Wicket.ts Andrew Kondratev 17/05/2019 14:33

@martin-g
Copy link
Member

@martin-g do you refer to the dev@wicket.apache.org mail list?

Yes.

@andruhon
Copy link
Contributor Author

Closing this PR because it has been decided to not proceed with these changes.
A permalink to mail list discussion as a reference.
https://lists.apache.org/thread.html/0b5b1fff59b1a448987c1da7f5a91e8942a6cd4ef2386674e7505df8@%3Cdev.wicket.apache.org%3E

@andruhon andruhon closed this May 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants