Skip to content
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

[JENKINS-43786] More compatible adaptation #179

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

recena
Copy link
Contributor

@recena recena commented Oct 29, 2017

JENKINS-43786

Downstream of jenkinsci/jenkins#2857

@KostyaSha, @lanwen, What do you think?


This change is Reviewable

form(method: 'post', action: "${rootURL}/${my?.url}/act", name: my?.id) {
f.submit(name: 'yes', value: _('view'))
f.submit(name: 'no', value: _('dismiss'))
if (Jenkins.getVersion().isNewerThan(new VersionNumber("2.88"))) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.88 is only a tentative version, I'm waiting for getting this jenkinsci/jenkins#2857 already merged

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need to wait that?
alert and alert-warning is available in Jenkins 1.633 (jenkinsci/ssh-agents-plugin#70 (review))

Copy link
Member

@lanwen lanwen Oct 30, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if it will be lts? Are side effects worse it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lanwen I don't think so. With this approach if the plugin is running on Jenkins version < 2.88 we see the current appearance, but if the plugin is running on Jenkins > 2.88 we see the new design.

Copy link
Member

@ikedam ikedam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't get why this is related to JENKINS-43786 .

form(method: 'post', action: "${rootURL}/${my?.url}/act", name: my?.id) {
f.submit(name: 'yes', value: _('view'))
f.submit(name: 'no', value: _('dismiss'))
if (Jenkins.getVersion().isNewerThan(new VersionNumber("2.88"))) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need to wait that?
alert and alert-warning is available in Jenkins 1.633 (jenkinsci/ssh-agents-plugin#70 (review))

text(_('hook.registering.problem'))
f.submit(name: 'yes', value: _('view'))
f.submit(name: 'no', value: _('dismiss'))
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you want to put text to form?
(and not for Jenkins >= 2.88?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally text(_('hook.registering.problem')) was invoked after the form clause. It should be restored if there is no specific reason to do that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oleg-nenashev No, there is an important reason for that. The DOM generated should be synced with the proposal on jenkinsci/jenkins#2857

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This else block is for Jenkins <= 2.88, that is, without jenkinsci/jenkins#2857 .
Do you mean this DOM should be fixed regardless of jenkinsci/jenkins#2857 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ikedam Yes, jenkinsci/jenkins#2857 provides a new re-styling and if a maintainer wants to use it, needs to perform a small change like this. But we want to keep backward compatibility in the UI.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oleg-nenashev Please, could you update your review?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@recena
I'm afraid you didn't get the point I asked.
I suppose this PR contains 2 changes:

You haven't mentioned the prior one, and it makes me wonder whether that change is expected one, or the one by mistake.

Attaching screenshot might clarify the fix by this PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, there is an important reason for that. The DOM generated should be synced with the proposal on ...

It is for the legacy branch. Why does it need to be synced?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oleg-nenashev I don't know what you are not understanding. There are two blocks, one with the original implementation and other with the new one. And yes, the order on how the elements are rendered is important.

}
text(_('hook.registering.problem'))
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a line break.
Though no line break is almost harmless for text editors, text files must end with line breaks for the POSIX definition.

@ikedam
Copy link
Member

ikedam commented Oct 29, 2017

@recena
Actually I can't get why you mentioned me as I haven't participate github-plugin nor JENKINS-43786.
You might have mistaken me for someone else to invite.

@recena
Copy link
Contributor Author

recena commented Oct 30, 2017

@ikedam My apologies, I meant @lanwen.

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

text(_('hook.registering.problem')) seems to be misplaced in the old UI

text(_('hook.registering.problem'))
f.submit(name: 'yes', value: _('view'))
f.submit(name: 'no', value: _('dismiss'))
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally text(_('hook.registering.problem')) was invoked after the form clause. It should be restored if there is no specific reason to do that

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