-
Notifications
You must be signed in to change notification settings - Fork 396
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-33228] Misc global config page improvements #112
Conversation
But it occupies the precious real estate and pushes all the form controls to the right. Given the way global configuration page works, this affects all the form controls of the global config page, not just this plugin.
... especially so if this plugin is meant to be a common configuration point for all GitHub related plugins, ala JENKINS-33228.
... as this plugin is used to configure GitHub instances that other plugins will also use. description for repeatableHeteroProperty isn't all that useful anyway, because when multiple instances are configured, the description gets pushed far down and it's not clear where that text is associated with.
There's no nested structure in GitHubServerConfig, so the added descriptiveness is not being useful.
And "custom API URL" is a poor wording when it really refers to GitHub Enterprise
It's also API endpoint.
@reviewbybees |
This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation. |
780988d
to
96c8426
Compare
…t after And if someone is testing a setting, cache can be only harmful, so might as well disable that. This also prevents garbage from accumulating
Thank you for this pull request! Please check this document for how the Jenkins project handles pull requests. |
@@ -171,7 +171,7 @@ public boolean configure(StaplerRequest req, JSONObject json) throws FormExcepti | |||
|
|||
@Override | |||
public String getDisplayName() { | |||
return "GitHub Plugin Configuration"; | |||
return "GitHub Configuration"; |
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.
When you maintain different production installations with many plugins it extremely critical to know what plugin contributes what configuration 👎
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.
And yes, i know about help buttons, but they may be broken by core like in different plugins today.
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.
they may be broken by core
What is this referring to?
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.
it [is] extremely critical to know what plugin contributes what configuration
But it is precisely the point of this PR to make this configuration be more readily applicable to multiple plugins, regardless of which plugin contributes it.
From the user perspective, they are configuring GitHub settings in Jenkins. If they need to troubleshoot why something is not working as expected, there are multiple techniques for doing that, such as enabling logging, searching known bug reports, etc. The link in help text may indeed be used to determine which plugin is defining a given configuration fragment, but this is not necessarily the source of a problem anyway.
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.
Github plugin provides connection for plugins, it has own documentation that guides on how configure this connection. I.e. in pullrequest-plugin i have reference: 1) configure github-plugin 2) configure PR plugin.
Please remember that non enterprise usage it's not marketing feature where you want mask everything and resolve all issues via support. FOSS users should understand what and where should be configured.
I think we can review and bit update github-plugin documentation to indicate that it could be used by other plugins.Technically it has connection API + ancient push->GitSCM.poll() parts. Other plugins should also reference to github-plugin (i.e. if configured user should have additional permissions).
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.
I'd also point out that most other plugins do not put "Plugin" nor "Configuration" in it. In fact I should have further removed "Configuration" from the subject line.
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.
Yeah, "configuration" sounds bit redundant. Would it be possible to place some UI element that would show that this section comes from gh plugin, then i would be ok to remove "plugin" word?
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 ok for me (it was here for historical reason)
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.
At all, would it render help button if we place somewhere help.html?
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.
👍
@kohsuke please do PRs from your forked repository, jenkinsci is full of your stalled branches (example https://github.com/jenkinsci/jenkins/branches/stale) and commits creating comments in JIRA. Also for UI improvements please attach screenshot before and after. This changes seems what i said before to @lanwen, but he decided to target on easier default UI. Let's wait his review. |
.doVerifyCredentials(github.serverConfig().getApiUrl(), credsId, 1); | ||
GitHubServerConfig config = new GitHubServerConfig(credsId); | ||
config.setApiUrl(github.serverConfig().getApiUrl()); | ||
config.setClientCacheSize(1); |
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.
@kohsuke maybe it would be easy for you to implement this https://issues.jenkins-ci.org/browse/JENKINS-32503 ?
Agreed, origin PRs should be reserved for cases where collaboration is expected. |
As far as I can see, no other plugins put 'Configuration' either
@@ -5,15 +5,12 @@ import com.cloudbees.jenkins.GitHubPushTrigger | |||
def f = namespace(lib.FormTagLib); | |||
|
|||
f.section(title: descriptor.displayName) { | |||
f.entry(title: _("Servers configs with credentials to manage GitHub integrations"), | |||
description: _("List of GitHub Servers to manage hooks, set commit statuses etc."), |
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.
think description is useful, as of some users confused what is this section for
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.
In the interest of getting other changes in, if this is something you feel strongly I'm happy to give up, but you should see it when you have one or two GitHubServerConfig
instances. This text will really look out of place. Existing help file should explain what this field does. In addition, if this plugin is to be better reused from elsewhere, the wording is incorrect, too.
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.
Yes, github servers configuration part should be generified in UI and docs. But clicking help buttons is also not always convenient. Try open all collapsed items in configuration page to get review of configurations - you will tire clicking.
@kohsuke thanks for screenshots
I think it would make sense place test button under |
help: descriptor.getHelpFile()) { | ||
|
||
f.repeatableHeteroProperty( | ||
field: "configs", | ||
hasHeader: "true", | ||
addCaption: _("Add GitHub Server Config"), |
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.
Maybe just set to Add GitHub Server? As of its better for end-users than simple "Add" (it adds a userfriendly context)
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.
I also don't like default "add" "delete" as they are not very useful on what they really do because of pure jelly form selection (it visible, but with all not aligned checkboxes not very convenient).
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.
(Small reminder: verify documentation and screenshots if this changes would be merged.)
When the plugin actually develops the capability to check it, please make that change. This is out of scope of this PR. |
According to commits description you reordering items. Changing later would require redoing screenshots. Placing now probably would also exclude bad aligned help buttons. |
help: descriptor.getHelpFile()) { | ||
|
||
f.repeatableHeteroProperty( | ||
field: "configs", | ||
hasHeader: "true", | ||
addCaption: _("Add GitHub Server Config"), | ||
deleteCaption: _("Delete GitHub Server Config")) |
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.
Restore deleteCaption
if you restored addCaption
?
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.
think add caption is enought
so, ok for me 👍 |
[JENKINS-33228] Misc global config page improvements
Will release it as |
* @param customApiUrl true if optional block "Custom GH Api Url" checked in UI | ||
*/ | ||
@DataBoundSetter | ||
public void setCustomApiUrl(boolean customApiUrl) { |
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 change broke backward compatibility, for example 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.
Exactly!
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.
See description of the field. This was used only for UI because of pure jelly form.
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 was used only for UI because of pure jelly form.
It doesn't matter, it's public API.
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.
hmmm, thanks for the report, will return that in a few hours.
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.
…t public api see details in jenkinsci#112
See JENKINS-33228 for the context of this discussion.
This PR consists of a number of small changes to slightly improve the global configuration page.
GitHubServerConfig
and especially its help text is still not really adequate for reuse by other plugins, but those requires further work.