-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move (most) javascript out of jelly files #76
Conversation
pom.xml
Outdated
<groupId>com.github.eirslett</groupId> | ||
<artifactId>frontend-maven-plugin</artifactId> | ||
<version>1.12.1</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This configuration is already provided in the parent POM if you check in a blank .mvn_exec_node
file:
You don't have to switch to NPM, either: the plugin parent POM has a corresponding |
Core uses Yarn, but for individual plugins it is up to the maintainer. |
(sorry, other merges caused some conflicts here) |
NP. I'll clean this up after #75 is merged. |
We're limited in what we can do in jelly files. There are tests that use HtmlUnit and it does not support enough modern JS features. This change will allow us to use modern JS to write code, and transpile it to something that all the older browsers support and HtmlUnit does not error out.
66862ae
to
fe12cfd
Compare
@kinow This is now ready for review. Thanks! |
@@ -363,7 +363,7 @@ var UnoChoice = UnoChoice || ($ => { | |||
$(".behavior-loading").show(); | |||
// start updating in separate async function so browser will be able to repaint and show 'loading' animation , see JENKINS-34487 | |||
setTimeout(() => { | |||
_self.cascadeParameter.update(); | |||
_self.cascadeParameter.update(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other changes were easier to review. This one is the only one I didn't understand straight away. Could you explain why the false
added here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that. The default value was undefined
which was interpreted as false
. This makes it explicit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to apologize! I suspected you would have a reason for doing that. Thanks for the explanation. LGTM! 💥
@@ -363,7 +363,7 @@ var UnoChoice = UnoChoice || ($ => { | |||
$(".behavior-loading").show(); | |||
// start updating in separate async function so browser will be able to repaint and show 'loading' animation , see JENKINS-34487 | |||
setTimeout(() => { | |||
_self.cascadeParameter.update(); | |||
_self.cascadeParameter.update(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to apologize! I suspected you would have a reason for doing that. Thanks for the explanation. LGTM! 💥
@rahulsom thank you for your recent contributions. I think we got all your pull requests reviewed and merged, right? Shall I cut a new release with all the current changes in |
Thanks @kinow ! I'm working on one last PR to remove the dependency on prototype. That should get this plugin ready for the next LTS. |
Brilliant! Thanks heaps, I have a meeting with @imoutsatsos tomorrow to chat about Jenkins and about this plug-in -- he's the person who had the idea and initial design of how this plug-in should work, as well as designer of most of the functionality that he uses at his $job. Great timing for a new release soon before summer starts over here. The next PR's are a lot easier to review now that we have a lot more (and better) tests. Bruno. |
@rahulsom @kinow Could it be that this change has introduced JENKINS-71706 and JENKINS-71724? Experiencing
Function:
|
JENKINS-71706 claims to be on 2.6.5. This change made it into 2.7. |
I have attached a minimal pipeline over at JENKINS-71724 that constantly works on 2.6.5 and mostly fails on 2.7. Something about the parameters is strange, sometimes i see
(note two Sometimes I see
(note Going into Configure - Save toggles it between a working and non-working state on 2.7. |
We're limited in what we can do in jelly files.
There are tests that use HtmlUnit and it does not support enough modern JS features.
This change will allow us to use modern JS to write code, and transpile it to something that all the older browsers support and HtmlUnit does not error out.
This is built on top of #75
Testing done
This is a pure refactor. No new functionality is added. All existing tests pass.
The code that was moved from jelly to js has a lot of dependencies.
We'll need more refactoring before we can test it independently.
Submitter checklist