Famously, in computer science there are only two hard problems:

1. Cache invalidation
2. Naming things
3. Off-by-one counting bugs

In the GitHub Branch Source and Bitbucket Branch Source plugins I am
currently trying to refactor the UI with a number of goals:

1. Make it easier for users to understand what the different configuration
options do
2. Make it easier for plugin developers to enhance the functionality and
provide more complex variants.
3. Add some configuration aspects that are currently not possible.

In terms of the code structure for this refactoring I have a good idea as
to the shape of the solution that will work *within the constraints of the
Jenkins Classic UI paradimes*.

Here is an animated GIF showing the approximate shape of the solution.



What I now need to solve, while also refactoring this UI to share
commonality between Bitbucket and GitHub (as well as allowing e.g. Gogs and
GitLab to leverage this same commonality) is *the naming of things*. This
is where you can come in.

I need good names for things.

   - There are a pile of things that will be able to be attached to a
   branch source. In the code I am calling these Traits. That name does not
   make good sense for users. In the above animation I call them Behaviours.

   The list of ones will also include a subset of the Git SCM "Additional
   Behaviours" such as clean before/after checkout, etc

   *Can you suggest a better UI name for traits than Behaviors?*

   - Currently the GitHub Branch Source has two check-boxes to control
   whether it discovers branches on the repository. If you check one of these
   two boxes then either you will get all the branches that are not also a PR
   or all the branches that are also a PR (this second one seems nuts but
   backwards compatibility). If you check both of the boxes you get all the
   branches.

   I have replaced these two checkboxes with a trait. The trait has a drop
   down configuration that lets you select the three combinations of which
   branches to build. The 4th combination (corresponding to not checking
   either of the checkboxes in the current UI) is to just remove the trait.

   *Can you suggest a better UI name for this trait than "Discover
   branches"?*
   *Does "Discover branches" scream out what it does?*
   *Can you suggest a better UI name for the "Strategy" field in "Discover
   branches"?*
   *Can you suggest better names for any of the 3 strategy options?*

   - Currently the GitHub Branch Source has two check boxes to control both
   whether it discovers pull requests originating from the repository itself
   and how to build those pull requests.

   I have replaced these two checkboxes with a trait. The trait has a
   drop-down configuration. Selecting either the 1st or the 2nd of these
   options will build either the merge or the head commit and will call the
   branches PR-xxx. Selecting the 3rd of these options will build two branches
   for every PR one called PR-xxx-merge and one called PR-xxx-head.

   *Can you suggest a better UI name for this trait than "Discover pull
   requests from origin"?*
   *Does "Discover pull requests from origin" scream out what it does?*
   *Can you suggest a better UI name for the "Strategy" field in "Discover
   pull requests from origin"?*
   *Can you suggest better names for any of the 3 strategy options?*

   - Currently the GitHub Branch Source has two check boxes to control both
   whether it discovers pull requests originating from forks of the repository
   and how to build those pull requests

   I have replaced these two checkboxes with a trait.

   The trait has a drop-down configuration for selecting what to build.
   Selecting either the 1st or the 2nd of these options will build either the
   merge or the head commit and will call the branches PR-xxx. Selecting the
   3rd of these options will build two branches for every PR one called
   PR-xxx-merge and one called PR-xxx-head.

   The trait also has a drop down configuration for selecting how to
   "trust" pull requests from forks. *New feature*. Currently only pull
   requests from collaborators are trusted. This new feature will enable
   control on how a pull request gets trusted. Along with additional features
   - such as being able to block automatic builds of non-trusted pull requests
   - this should enable a lot more control (e.g. an extension plugin could
   only trust pull requests where a collaborator had added a comment with a
   magic string or assigned a label)

   *Can you suggest a better UI name for this trait than "Discover pull
   requests from forks"?*
   *Does "Discover pull requests from forks" scream out what it does?*
   *Can you suggest a better UI name for the "Strategy" field in "Discover
   pull requests from forks"?*
   *Can you suggest better names for any of the 3 strategy options?*
   *Can you suggest a better UI name for the "Trust" field in "Discover
   pull requests from forks"?*
   *Can you suggest better names for any of the current base default 3
   strategy options: "Collaborators", "None" and "Everyone"?*

   - Currently, hidden in the advanced box there is an Includes/Excludes
   option. There are a lot of requests for different syntaxes of specifying
   includes / excludes. Due to backwards compatibility we cannot change the
   syntax, so my solution is to allow plugins to extend and add traits for the
   different syntaxes.

   To retain backwards compatibility of existing configurations, we need to
   provide one that uses the current wildcard (without globs) matching.

   *Can you suggest a better UI name for this trait than "Filter by name
   (with wildcards)"?*
   *Does "Filter by name (with wildcards)" scream out what it does?*

   - Currently there is some confusion about the difference between Scan
   credentials and Checkout credentials. After some analysis, the conclusion I
   reached is that Checkout credentials are used when you want to checkout
   over SSH. As such I think it is simpler for users to just present one set
   of credentials and when a user wants to force the checkout over SSH let
   them add a trait to switch the checkout to SSH.

   *Can you suggest a better UI name for this trait than "Checkout over
   SSH"?*
   *Does "Checkout over SSH" scream out what it does?*


Thanks in advance for your assistance. Any suggestions are welcome, even if
we do not use them as is, they may provide inspiration

-Stephen

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CA%2BnPnMzEViJLxmoYBLQzM_DFAxEn3%3Dta4jx5Y0J2TnQ%3D63V7_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to