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

Move parameter data types to the top #180

Merged
merged 3 commits into from
Jul 5, 2022

Conversation

vihaanthora
Copy link
Contributor

This PR moves the data types associated with each parameter (or further nested choices) to the top where the title of each is mentioned. This will allow users to view the data types without having to click the expand button or scroll through the help content.

The imports are organized so that there are no conflicts after merging #177.

Tagging the mentors: @kwhetstone @arpoch

attrHelp.append("<ul>").append(typeDesc).append("</ul>");
}
} catch (RuntimeException | Error ex) {
LOG.log(Level.WARNING, "Restricted description of attribute "
Copy link
Member

Choose a reason for hiding this comment

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

Capturing all errors always feels like a code smell to me. Which ones are ignorable and which ones are actually bad? This will mean that'll "randomly" have empty help and you'll have to go look at the logs to see why.

Its easier to maintain when you handle very specific errors so you know what kind of bad data it can expect

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, if you have a definite failure, maybe there's some parsing problem with the data that we can figure out here. I think this is a copy of what we have done for this sort of help before. So I'm sort of fine with skipping for no. But if we could find an example of a failure, that would be really interesting to look at to try to troubleshoot together.

@halkeye
Copy link
Member

halkeye commented Jun 28, 2022

I don't know the code base and am mobile but gave a few random feedback. Feel free to ignore.

@vihaanthora
Copy link
Contributor Author

Thanks for the feedback @halkeye 😄

@vihaanthora
Copy link
Contributor Author

@kwhetstone I checked the logs and was able to locate the error. I committed some changes to the same and the build is successful now.

@kwhetstone
Copy link
Contributor

Just as something we should note here: let's make sure that we reference the JIRA ticket here in the comments of the PR.

@vihaanthora
Copy link
Contributor Author

Sure thing, was doing the opposite till now 😅
JIRA Ticket link: https://issues.jenkins.io/browse/WEBSITE-801

Copy link
Contributor

@kwhetstone kwhetstone left a comment

Choose a reason for hiding this comment

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

I think this makes sense, and looks a lot nicer on the page, so I'm going to approve. The error message is something we're going to try to reproduce while testing to see if we can find a better message for this.

@@ -1,6 +1,18 @@
package org.jenkinsci.pipeline_steps_doc_generator;

import hudson.model.Descriptor;
import java.io.IOException;
Copy link
Contributor

Choose a reason for hiding this comment

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

Also wanted to reiterate here because of the same movements: normally when editing code, you don't want to move around dependency imports. A lot of projects will have a standard of imports which make it easier to quickly look at what's included in a project. I looked at Jenkins and didn't see anything

@kwhetstone kwhetstone merged commit 8e5e539 into jenkins-infra:master Jul 5, 2022
@vihaanthora vihaanthora deleted the param-details branch July 5, 2022 16:52
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.

3 participants