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

remove invisible entry from drop down list #262

Merged
merged 1 commit into from
Jan 14, 2020

Conversation

car-roll
Copy link
Contributor

  • JENKINS issue(s):
  • Description:
    • When adding a github source, the API endpoint drop down list is partially visible when the Repository Scan radio button is selected.

Screen Shot 2020-01-09 at 11 57 41 PM

The problem appears to be in the GithubSCMSource jelly (config-detail.jelly). If there are no API Endpoints, an invisibleEntry is added to the radioBlock. However, it looks like there is a bug that invisibleEntries are still partially visible in a radioBlock.
(Technically, the list of API Endpoints is never empty as it always has a "Github" title as the first entry. I confirmed that the bug was still present when the list was truly empty.)

Since there is no reason to store an empty list of API Endpoints in an invisible entry, I completely removed the logic and the issue went away.
Screen Shot 2020-01-09 at 11 55 30 PM

  • Documentation changes:
    • bugfix, no documentation changes
  • Users/aliases to notify:
    • See reviewers list

Copy link
Member

@dwnusbaum dwnusbaum left a comment

Choose a reason for hiding this comment

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

Ok, I guess this works because apiUri is always set to something in GitHubScmSource's constructor as of #236? Did you manually test in a scenario where there are some options in the dropdown to make sure everything still works correctly? (I think it should be fine)

@car-roll car-roll changed the title [NGPIPELINE-775] remove invisible entry from drop down list remove invisible entry from drop down list Jan 14, 2020
@car-roll
Copy link
Contributor Author

car-roll commented Jan 14, 2020

@dwnusbaum technically there are always options in the drop down because the add the title Github in the drop down here.
I've tested with the drop down completely empty as well as the API endpoint always visible. Did you mean testing it with some valid endpoints? I didn't know of any enterprise servers to test it with.

@dwnusbaum
Copy link
Member

@car-roll Yeah, I mean testing a scenario where you select a GitHub Enterprise server from the dropdown to make sure that still works correctly.

Copy link
Collaborator

@kshultzCB kshultzCB left a comment

Choose a reason for hiding this comment

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

Approved, pending a quick verification that >1 endpoint displays correctly.

This will be a nice change. I've always hated that little fragment of a dropdown. :)

@car-roll
Copy link
Contributor Author

tested adding a github enterprise server. Was able to connect successfully and scan an empty test repo with two branches.

@car-roll car-roll merged commit 9ede80e into jenkinsci:master Jan 14, 2020
@car-roll car-roll deleted the invisible-api-endpoint branch January 14, 2020 22:27
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